Difference between revisions of "Terraform validate"
Jump to navigation
Jump to search
↑ https://www.terraform.io/docs/cli/commands/validate.html
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
− | <code>[[terraform]] validate</code> | + | <code>[[terraform]] validate</code> <ref>https://www.terraform.io/docs/cli/commands/validate.html</ref> validates the configuration files in a directory. |
− | |||
* <code>terraform validate</code> | * <code>terraform validate</code> | ||
Line 13: | Line 12: | ||
== Examples with errors == | == Examples with errors == | ||
− | * [[Error: Could not load plugin]] | + | * <code>[[Error: Could not load plugin]]</code> |
+ | * <code>[[Error: Unsupported argument ... An argument named "XXX" is not expected here.]]</code> | ||
== Related == | == Related == | ||
Line 23: | Line 23: | ||
* [[Test mode]] | * [[Test mode]] | ||
* <code>[[aws cloudformation validate-template]]</code> | * <code>[[aws cloudformation validate-template]]</code> | ||
− | * K8s [[datree]] | + | * K8s [[datree]] [[plugin]] |
* <code>[[terragrunt validate]]</code> | * <code>[[terragrunt validate]]</code> | ||
* <code>[[tflint]]</code> | * <code>[[tflint]]</code> |
Latest revision as of 10:45, 29 February 2024
terraform validate
[1] validates the configuration files in a directory.
terraform validate
terraform validate && terraform plan
terraform validate
requires an initialized working directory with any referenced plugins and modules installed. Execute: terraform init -backend=false
Example[edit]
terraform validate Success! The configuration is valid.
Examples with errors[edit]
Error: Could not load plugin
Error: Unsupported argument ... An argument named "XXX" is not expected here.
Related[edit]
terraform init -backend=false
terraform fmt
terraform fmt -check
terraform plan
terraform state
,terraform state show
- Test mode
aws cloudformation validate-template
- K8s datree plugin
terragrunt validate
tflint
.pre-commit-config.yaml
See also[edit]
terraform fmt [ -diff | -check | validate | --help ]
Advertising: