File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ module "gcp_python_fastapi_pipeline" {
4747 region = var. region
4848
4949 cloudbuild_trigger_name = " gcp-python-fastapi"
50+ service_name = " gcp-python-fastapi-service"
5051 description = " Cloud Build Trigger for GCP Python FastAPI"
5152 github_repo_name = " gcp-python-fastapi"
5253 secret_id = google_secret_manager_secret. snyk_token . secret_id
Original file line number Diff line number Diff line change @@ -21,6 +21,15 @@ resource "google_project_iam_member" "cloud_build_roles" {
2121 member = " serviceAccount:${ google_service_account . cloudbuild_service_account . email } "
2222}
2323
24+ resource "google_cloud_run_service_iam_member" "all_users_invoker" {
25+ project = var. project_id
26+ location = var. region
27+ service = var. service_name
28+
29+ role = " roles/run.invoker"
30+ member = " allUsers"
31+ }
32+
2433resource "google_secret_manager_secret_iam_binding" "secret_manager_binding" {
2534 for_each = toset ([
2635 " roles/secretmanager.secretAccessor" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ variable "cloudbuild_trigger_name" {
33 type = string
44}
55
6+ variable "service_name" {
7+ description = " Name of the Cloud Run service"
8+ type = string
9+ }
10+
611variable "description" {
712 description = " Description of the Cloud Build trigger"
813 type = string
You can’t perform that action at this time.
0 commit comments