fixing workloadidentity for anthos service mesh - authority was not created

This commit is contained in:
Valerio Ponza
2023-02-27 14:17:16 +00:00
parent b4ce1250ee
commit cbe85e0605

View File

@@ -41,12 +41,12 @@ resource "google_gke_hub_membership" "default" {
membership_id = each.key membership_id = each.key
endpoint { endpoint {
gke_cluster { gke_cluster {
resource_link = each.value resource_link = "//container.googleapis.com/${each.value}"
} }
} }
dynamic "authority" { dynamic "authority" {
for_each = ( for_each = (
contains(var.workload_identity_clusters, each.key) ? {} : { 1 = 1 } contains(var.workload_identity_clusters, each.key) ? { 1 = 1 } : {}
) )
content { content {
issuer = "https://container.googleapis.com/v1/${var.clusters[each.key]}" issuer = "https://container.googleapis.com/v1/${var.clusters[each.key]}"