Terraform v0.10.0
main.tf
variable "test" {}
main.auto.tfvars
test = "test"
terraform validate returns * Required variable not set: test
terraform plan returns No changes. Infrastructure is up-to-date. as expected.
I expect that terraform validate would pick up on anything matching *.auto.tfvars.
The feature as described in the 0.10.0 changelog is Files in the config directory ending in .auto.tfvars are now loaded automatically..., which implies that the validate command should pick up on these. My guess is that the validate command was overlooked, but maybe this behavior is intentional?
The documentation does match the behavior, although validate isn't explicitly excluded.
https://www.terraform.io/intro/getting-started/variables.html
https://www.terraform.io/docs/commands/apply.html
https://www.terraform.io/docs/commands/validate.html
Hi @dmikalova,
Thanks for filing the issue.
I'm going to combine this with #15733, so we can take care of them with the same fix.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hi @dmikalova,
Thanks for filing the issue.
I'm going to combine this with #15733, so we can take care of them with the same fix.