You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The terraform validate command behavior seems to have changed since version 0.15.2 and do not fail anymore for unknown attributes in a dynamic block that depends from a variable.
$ terraform version
Terraform v0.15.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.66.0
Your version of Terraform is out of date! The latest version
is 1.0.1. You can update by downloading from https://www.terraform.io/downloads.html
$ terraform validate
╷
│ Error: Unsupported argument
│
│ on test2.tf line 21, in resource "azurerm_app_service_plan" "example":
│ 21: unknown_attribute = "foobar"
│
│ An argument named "unknown_attribute" is not expected here.
╵
Actual Behavior
Test with Terraform 0.15.2
$ terraform version
Terraform v0.15.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.66.0
Your version of Terraform is out of date! The latest version
is 1.0.1. You can update by downloading from https://www.terraform.io/downloads.html
$ terraform validate
Success! The configuration is valid.
Same with Terraform 1.0.1
$ terraform version
Terraform v1.0.1
on linux_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.66.0
$ terraform validate
Success! The configuration is valid.
Steps to Reproduce
1. `terraform init`
2. `terraform validate`
The text was updated successfully, but these errors were encountered:
Hi @BzSpi, thanks for filing the issue. The change @pdecat pointed to is the change which would have caused this. While the use of dynamic will effectively create a block which only expects for_each, iterator and content, I suspect there is still a way to validate the structure earlier.
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.
The
terraform validate
command behavior seems to have changed since version 0.15.2 and do not fail anymore for unknown attributes in a dynamic block that depends from a variable.Terraform Version
Terraform Configuration Files
Expected Behavior
Test with Terraform 0.15.1
Actual Behavior
Test with Terraform 0.15.2
Same with Terraform 1.0.1
Steps to Reproduce
The text was updated successfully, but these errors were encountered: