modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.
Terraform v0.12.20
Terraform v0.13.3
data "google_container_cluster" "cluster" {
name = var.cluster_name
zone = var.cluster_zone
}
Error: Unsupported argument
on main.tf line 20, in data "google_container_cluster" "cluster":
20: zone = var.cluster_zone
An argument named "zone" is not expected here.
No error
Error: Unsupported argument
on main.tf line 20, in data "google_container_cluster" "cluster":
20: zone = var.cluster_zone
An argument named "zone" is not expected here.
terraform validate/planWorks with v3.29.0
I have checked changelogs in the range of [v3.29.0:v3.41.0] and did not find any change that could cause this.
Am I missing something?
similar problem only with 3.41 version
Error: Invalid resource instance data in state
on .terraform/modules/ecom-gke-green/data.tf line 2:
2: data "google_container_engine_versions" "gke-version-euw1" {
data could not be decoded from the state: unsupported attribute "region".
I think there are two different issues here.
One, similar to https://github.com/hashicorp/terraform-provider-google/issues/7379 is an error when a field exists in state that the new provider version 3.41.0 does not expect. This should be solved by upgrading the version of Terraform you are running to at least 0.13.1.
The other is causing the error message: An argument named "zone" is not expected here. on the container cluster datasource. This is due to the argument zone being renamed to location during the 3.0.0 release of the google provider. This field was marked as Removed in 3.0.0 until 3.41.0 when it was actually removed from the provider. I don't believe the provider would accept the zone field on that datasource from 3.0.0 -> 3.40.0, but it would have displayed a more helpful error.
The solution here is to rename zone -> location. Unfortunately due to an upgrade we made in the Terraform SDK, we cannot display removed fields and messages anymore.
Closing as I believe this is not a provider bug. Please reopen this if upgrading Terraform to 0.13.1+ and changing from zone to location does not fix this issue for you
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!