From 941cbac85e46dc6fca90a67949be2c6021a072fb Mon Sep 17 00:00:00 2001 From: Al Cutter Date: Fri, 16 Aug 2024 11:43:25 +0100 Subject: [PATCH] fixes --- deployment/modules/example-gcp/main.tf | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/deployment/modules/example-gcp/main.tf b/deployment/modules/example-gcp/main.tf index c0fbbba3f..589225737 100644 --- a/deployment/modules/example-gcp/main.tf +++ b/deployment/modules/example-gcp/main.tf @@ -24,9 +24,9 @@ resource "google_project_iam_member" "iam_metrics_writer" { role = "roles/monitoring.metricWriter" member = "serviceAccount:${google_service_account.cloudrun_service_account.email}" } -resource "google_project_iam_member" "iam_sql_client" { +resource "google_project_iam_member" "iam_spanner_client" { project = var.project_id - role = "roles/cloudsql.client" + role = "roles/spanner.client" member = "serviceAccount:${google_service_account.cloudrun_service_account.email}" } resource "google_project_iam_member" "iam_service_agent" { @@ -34,11 +34,6 @@ resource "google_project_iam_member" "iam_service_agent" { role = "roles/run.serviceAgent" member = "serviceAccount:${google_service_account.cloudrun_service_account.email}" } -resource "google_project_iam_member" "iam_secret_accessor" { - project = var.project_id - role = "roles/secretmanager.secretAccessor" - member = "serviceAccount:${google_service_account.cloudrun_service_account.email}" -} resource "google_cloud_run_v2_service" "default" { name = "example-service-${var.env}" @@ -53,8 +48,8 @@ resource "google_cloud_run_v2_service" "default" { args = [ "--logtostderr", "--v=1", - "--bucket=${modules.infra.outputs.log_bucket}", - "--spanner=${modules.infra.outputs.log_spanner}", + "--bucket=${module.gcp.log_bucket}", + "--spanner=${module.gcp.log_spanner}", "--project=${var.project_id}", "--signer=./testgcp.sec", ] @@ -80,13 +75,11 @@ resource "google_cloud_run_v2_service" "default" { } client = "terraform" depends_on = [ - google_project_service.secretmanager_api, google_project_service.spanner_api, google_project_iam_member.iam_act_as, google_project_iam_member.iam_metrics_writer, google_project_iam_member.iam_spanner_client, google_project_iam_member.iam_service_agent, - google_project_iam_member.iam_secret_accessor, ] }