Skip to content

Commit

Permalink
fix: allow ACM module to work w/o metrics sa (#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmymy authored May 16, 2023
1 parent ea3e374 commit 83a8be2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/acm/creds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ resource "google_service_account" "acm_metrics_writer_sa" {
}

resource "google_project_iam_member" "acm_metrics_writer_sa_role" {
count = var.create_metrics_gcp_sa ? 1 : 0
project = var.project_id
role = "roles/monitoring.metricWriter"
member = "serviceAccount:${google_service_account.acm_metrics_writer_sa[0].email}"
Expand Down
2 changes: 1 addition & 1 deletion modules/acm/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ output "wait" {

output "acm_metrics_writer_sa" {
description = "The ACM metrics writer Service Account"
value = google_service_account.acm_metrics_writer_sa[0].email
value = var.create_metrics_gcp_sa ? google_service_account.acm_metrics_writer_sa[0].email : null
}

0 comments on commit 83a8be2

Please sign in to comment.