Skip to content

Commit

Permalink
Merge branch 'main' into statefulMigMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
msampathkumar authored Oct 24, 2023
2 parents 32e6927 + b4affee commit 1adbdd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bigquery/biglake/bigquery_create_object_table/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# [START bigquery_create_object_table]

# This queries the provider for project information.
data "google_project" "main" {}
data "google_project" "default" {}

# This creates a connection in the US region named "my-connection-id".
# This connection is used to access the bucket.
Expand All @@ -38,7 +38,7 @@ resource "google_bigquery_connection" "default" {
# This grants the previous connection IAM role access to the bucket.
resource "google_project_iam_member" "default" {
role = "roles/storage.objectViewer"
project = data.google_project.main.project_id
project = data.google_project.default.project_id
member = "serviceAccount:${google_bigquery_connection.default.cloud_resource[0].service_account_id}"
}

Expand Down
15 changes: 7 additions & 8 deletions run/scheduled/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ resource "google_service_account" "default" {
google_project_service.iam_api
]
}

resource "google_cloud_run_service_iam_member" "default" {
location = google_cloud_run_v2_service.default.location
service = google_cloud_run_v2_service.default.name
role = "roles/run.invoker"
member = "serviceAccount:${google_service_account.default.email}"
}
# [END cloudrun_service_scheduled_sa]

# [START cloudrun_service_scheduled_job]
Expand Down Expand Up @@ -95,12 +102,4 @@ resource "google_cloud_scheduler_job" "default" {
}
# [END cloudrun_service_scheduled_job]

# [START cloudrun_service_scheduled_iam]
resource "google_cloud_run_service_iam_member" "default" {
location = google_cloud_run_v2_service.default.location
service = google_cloud_run_v2_service.default.name
role = "roles/run.invoker"
member = "serviceAccount:${google_service_account.default.email}"
}
# [END cloudrun_service_scheduled_iam]
# [END cloudrun_scheduled_parent_tag]

0 comments on commit 1adbdd5

Please sign in to comment.