Skip to content

Commit abdba8c

Browse files
authored
fix(acm): Allow to enable config_sync or policy_controller standalone (#1752)
1 parent dbb57a2 commit abdba8c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/acm/creds.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ locals {
1818
# GCP service account ids must be <= 30 chars matching regex ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$
1919
service_account_name = trimsuffix(substr(var.metrics_gcp_sa_name, 0, 30), "-")
2020

21-
iam_ksa_binding_members = var.create_metrics_gcp_sa ? [
22-
var.enable_config_sync ? "config-management-monitoring/default" : null,
23-
var.enable_policy_controller ? "gatekeeper-system/gatekeeper-admin" : null,
24-
] : []
21+
iam_ksa_binding_members = var.create_metrics_gcp_sa ? concat(
22+
var.enable_config_sync ? ["config-management-monitoring/default"] : [],
23+
var.enable_policy_controller ? ["gatekeeper-system/gatekeeper-admin"] : [],
24+
) : []
2525
}
2626

2727
resource "tls_private_key" "k8sop_creds" {

0 commit comments

Comments
 (0)