Skip to content

Commit e851e8f

Browse files
committed
fix: support custom service account for autopilot
1 parent d59542c commit e851e8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ resource "google_container_cluster" "primary" {
7171

7272
cluster_autoscaling {
7373
dynamic "auto_provisioning_defaults" {
74-
for_each = var.create_service_account ? [1] : []
74+
for_each = (var.create_service_account || var.service_account != "") ? [1] : []
7575

7676
content {
7777
service_account = local.service_account

modules/beta-autopilot-public-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ resource "google_container_cluster" "primary" {
7171

7272
cluster_autoscaling {
7373
dynamic "auto_provisioning_defaults" {
74-
for_each = var.create_service_account ? [1] : []
74+
for_each = (var.create_service_account || var.service_account != "") ? [1] : []
7575

7676
content {
7777
service_account = local.service_account

0 commit comments

Comments
 (0)