Difference between revisions of "Terraform validate"
Jump to navigation
Jump to search
↑ https://www.terraform.io/docs/cli/commands/validate.html
Line 13: | Line 13: | ||
== Examples with errors == | == Examples with errors == | ||
* <code>[[Error: Could not load plugin]]</code> | * <code>[[Error: Could not load plugin]]</code> | ||
+ | |||
+ | |||
+ | [[Error: Unsupported argument]] | ||
+ | 14│ | ||
+ | 15│ on main.tf line 39, in module "xxx": | ||
+ | 16│ 39: install-aqua-gateway-lb = false | ||
+ | 17│ | ||
+ | 18│ An argument named "[[install-aqua-gateway-lb]]" is not expected here. | ||
== Related == | == Related == |
Revision as of 10:24, 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
terraform validate Success! The configuration is valid.
Examples with errors
Error: Unsupported argument 14│ 15│ on main.tf line 39, in module "xxx": 16│ 39: install-aqua-gateway-lb = false 17│ 18│ An argument named "install-aqua-gateway-lb" is not expected here.
Related
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
terraform fmt [ -diff | -check | validate | --help ]
Advertising: