File tree 1 file changed +12
-5
lines changed
deployment/modules/gcp/cloudbuild
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,17 @@ resource "google_project_iam_member" "logging_log_writer" {
56
56
}
57
57
58
58
resource "google_artifact_registry_repository_iam_member" "artifactregistry_writer" {
59
- project = google_artifact_registry_repository. docker . project
60
- location = google_artifact_registry_repository. docker . location
59
+ project = google_artifact_registry_repository. docker . project
60
+ location = google_artifact_registry_repository. docker . location
61
61
repository = google_artifact_registry_repository. docker . name
62
- role = " roles/artifactregistry.writer"
62
+ role = " roles/artifactregistry.writer"
63
+ member = " serviceAccount:${ google_service_account . cloudbuild_service_account . email } "
64
+ }
65
+
66
+ # TODO: Use google_cloud_run_service_iam_member to limit the service scope.
67
+ resource "google_project_iam_member" "run_developer" {
68
+ project = var. project_id
69
+ role = " roles/run.developer"
63
70
member = " serviceAccount:${ google_service_account . cloudbuild_service_account . email } "
64
71
}
65
72
@@ -123,8 +130,8 @@ resource "google_cloudbuild_trigger" "build_trigger" {
123
130
# # Deploy container image to Cloud Run.
124
131
# # TODO: Remove this as the `terragrunt apply` will bring up the Cloud Run.
125
132
step {
126
- id = " cloud_run_deploy"
127
- name = " gcr.io/google.com/cloudsdktool/cloud-sdk"
133
+ id = " cloud_run_deploy"
134
+ name = " gcr.io/google.com/cloudsdktool/cloud-sdk"
128
135
entrypoint = " gcloud"
129
136
args = [
130
137
" run" ,
You can’t perform that action at this time.
0 commit comments