Skip to content

Commit

Permalink
fix(acm): Allow to enable config_sync or policy_controller standalone (
Browse files Browse the repository at this point in the history
  • Loading branch information
foosinn authored Sep 28, 2023
1 parent dbb57a2 commit abdba8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/acm/creds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ locals {
# GCP service account ids must be <= 30 chars matching regex ^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$
service_account_name = trimsuffix(substr(var.metrics_gcp_sa_name, 0, 30), "-")

iam_ksa_binding_members = var.create_metrics_gcp_sa ? [
var.enable_config_sync ? "config-management-monitoring/default" : null,
var.enable_policy_controller ? "gatekeeper-system/gatekeeper-admin" : null,
] : []
iam_ksa_binding_members = var.create_metrics_gcp_sa ? concat(
var.enable_config_sync ? ["config-management-monitoring/default"] : [],
var.enable_policy_controller ? ["gatekeeper-system/gatekeeper-admin"] : [],
) : []
}

resource "tls_private_key" "k8sop_creds" {
Expand Down

0 comments on commit abdba8c

Please sign in to comment.