Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Aug 16, 2024
1 parent 54ac72e commit a6036cd
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions deployment/modules/example-gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,16 @@ 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" {
project = var.project_id
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}"
Expand All @@ -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",
]
Expand All @@ -80,13 +75,10 @@ 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,
]
}

Expand Down

0 comments on commit a6036cd

Please sign in to comment.