Merge branch 'master' into juliodiez-patch-1
This commit is contained in:
commit
5a44baa82f
|
@ -92,7 +92,6 @@ module "cluster-autopilot" {
|
||||||
}
|
}
|
||||||
enable_features = {
|
enable_features = {
|
||||||
autopilot = true
|
autopilot = true
|
||||||
workload_identity = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# tftest modules=1 resources=1 inventory=autopilot.yaml
|
# tftest modules=1 resources=1 inventory=autopilot.yaml
|
||||||
|
@ -162,5 +161,6 @@ module "cluster-1" {
|
||||||
| [name](outputs.tf#L49) | Cluster name. | |
|
| [name](outputs.tf#L49) | Cluster name. | |
|
||||||
| [notifications](outputs.tf#L54) | GKE PubSub notifications topic. | |
|
| [notifications](outputs.tf#L54) | GKE PubSub notifications topic. | |
|
||||||
| [self_link](outputs.tf#L59) | Cluster self link. | ✓ |
|
| [self_link](outputs.tf#L59) | Cluster self link. | ✓ |
|
||||||
|
| [workload_identity_pool](outputs.tf#L65) | Workload identity pool. | |
|
||||||
|
|
||||||
<!-- END TFDOC -->
|
<!-- END TFDOC -->
|
||||||
|
|
|
@ -379,7 +379,7 @@ resource "google_container_cluster" "cluster" {
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamic "workload_identity_config" {
|
dynamic "workload_identity_config" {
|
||||||
for_each = var.enable_features.workload_identity ? [""] : []
|
for_each = (var.enable_features.workload_identity && !var.enable_features.autopilot) ? [""] : []
|
||||||
content {
|
content {
|
||||||
workload_pool = "${var.project_id}.svc.id.goog"
|
workload_pool = "${var.project_id}.svc.id.goog"
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,3 +61,11 @@ output "self_link" {
|
||||||
sensitive = true
|
sensitive = true
|
||||||
value = google_container_cluster.cluster.self_link
|
value = google_container_cluster.cluster.self_link
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "workload_identity_pool" {
|
||||||
|
description = "Workload identity pool."
|
||||||
|
value = "${var.project_id}.svc.id.goog"
|
||||||
|
depends_on = [
|
||||||
|
google_container_cluster.cluster
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue