Module tries to access `gce_zone` field via `availability_type` string field
Closed this issue · 0 comments
SarahFrench commented
Hi all,
I think that this line:
terraform-google-alloy-db/main.tf
Line 147 in 81522e3
Needs to be updated to:
gce_zone = each.value.availability_type == "ZONAL" ? each.value.gce_zone : null
Currently when I try to use the module this error occurs:
╷
│ Error: Unsupported attribute
│
│ on terraform-google-alloy-db/main.tf line 147, in resource "google_alloydb_instance" "read_pool":
│ 147: gce_zone = each.value.availability_type == "ZONAL" ? each.value.availability_type.gce_zone : null
│ ├────────────────
│ │ each.value.availability_type is "ZONAL"
│
│ Can't access attributes on a primitive-typed value (string).
These are the provider versions I'm using:
$ terraform version
Terraform v1.5.7
on darwin_arm64
+ provider registry.terraform.io/hashicorp/google v5.5.0
+ provider registry.terraform.io/hashicorp/google-beta v5.5.0
+ provider registry.terraform.io/hashicorp/random v3.5.1