From d2911a45ba82e21f675450982301ff9ff5ed4be2 Mon Sep 17 00:00:00 2001 From: Julien Reichardt Date: Sun, 23 Apr 2023 22:24:53 +0200 Subject: [PATCH] chore: Use `google_service_account#member` attribute --- autogen/main/sa.tf.tmpl | 8 ++++---- modules/beta-autopilot-private-cluster/sa.tf | 8 ++++---- modules/beta-autopilot-public-cluster/sa.tf | 8 ++++---- modules/beta-private-cluster-update-variant/sa.tf | 8 ++++---- modules/beta-private-cluster/sa.tf | 8 ++++---- modules/beta-public-cluster-update-variant/sa.tf | 8 ++++---- modules/beta-public-cluster/sa.tf | 8 ++++---- modules/private-cluster-update-variant/sa.tf | 8 ++++---- modules/private-cluster/sa.tf | 8 ++++---- sa.tf | 8 ++++---- 10 files changed, 40 insertions(+), 40 deletions(-) diff --git a/autogen/main/sa.tf.tmpl b/autogen/main/sa.tf.tmpl index 16aaf5287f..e7f7bd3b68 100644 --- a/autogen/main/sa.tf.tmpl +++ b/autogen/main/sa.tf.tmpl @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/beta-autopilot-private-cluster/sa.tf b/modules/beta-autopilot-private-cluster/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/beta-autopilot-private-cluster/sa.tf +++ b/modules/beta-autopilot-private-cluster/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/beta-autopilot-public-cluster/sa.tf b/modules/beta-autopilot-public-cluster/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/beta-autopilot-public-cluster/sa.tf +++ b/modules/beta-autopilot-public-cluster/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/beta-private-cluster-update-variant/sa.tf b/modules/beta-private-cluster-update-variant/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/beta-private-cluster-update-variant/sa.tf +++ b/modules/beta-private-cluster-update-variant/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/beta-private-cluster/sa.tf b/modules/beta-private-cluster/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/beta-private-cluster/sa.tf +++ b/modules/beta-private-cluster/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/beta-public-cluster-update-variant/sa.tf b/modules/beta-public-cluster-update-variant/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/beta-public-cluster-update-variant/sa.tf +++ b/modules/beta-public-cluster-update-variant/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/beta-public-cluster/sa.tf b/modules/beta-public-cluster/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/beta-public-cluster/sa.tf +++ b/modules/beta-public-cluster/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/private-cluster-update-variant/sa.tf b/modules/private-cluster-update-variant/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/private-cluster-update-variant/sa.tf +++ b/modules/private-cluster-update-variant/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/modules/private-cluster/sa.tf b/modules/private-cluster/sa.tf index eb63753625..8a68daa192 100644 --- a/modules/private-cluster/sa.tf +++ b/modules/private-cluster/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" { diff --git a/sa.tf b/sa.tf index eb63753625..8a68daa192 100644 --- a/sa.tf +++ b/sa.tf @@ -47,28 +47,28 @@ resource "google_project_iam_member" "cluster_service_account-log_writer" { count = var.create_service_account ? 1 : 0 project = google_service_account.cluster_service_account[0].project role = "roles/logging.logWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-metric_writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-log_writer[0].project role = "roles/monitoring.metricWriter" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-monitoring_viewer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-metric_writer[0].project role = "roles/monitoring.viewer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" { count = var.create_service_account ? 1 : 0 project = google_project_iam_member.cluster_service_account-monitoring_viewer[0].project role = "roles/stackdriver.resourceMetadata.writer" - member = "serviceAccount:${google_service_account.cluster_service_account[0].email}" + member = google_service_account.cluster_service_account[0].member } resource "google_project_iam_member" "cluster_service_account-gcr" {