Terraform
terraform stacks validate reference
Use the terraform stacks validate
command to validate the configuration files in a directory without accessing remote services.
Usage
$ terraform stacks <global-stacks-flags> validate <options>
Description
The terraform stacks validate
command validates the configuration files in a directory, referring only to the configuration and not accessing any remote services such as remote state, provider APIs, etc. You must have called both terraform stacks init
and terraform stacks providers-lock
before running this command.
Options
-json
: Output results in JSON format instead of the default human-readable text format.- Optional.
- Boolean flag.
- Default: false (human-readable text format).
Examples
The following command validates the configuration files in the current directory:
$ terraform stacks validate
The following command validates the configuration and outputs results in JSON format:
$ terraform stacks validate --json
Global flags
Refer to Global flags reference for information about flags you can use with all commands.