File tree 3 files changed +15
-0
lines changed
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" {
47
47
region = var. region
48
48
49
49
cloudbuild_trigger_name = " gcp-python-fastapi"
50
+ service_name = " gcp-python-fastapi-service"
50
51
description = " Cloud Build Trigger for GCP Python FastAPI"
51
52
github_repo_name = " gcp-python-fastapi"
52
53
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" {
21
21
member = " serviceAccount:${ google_service_account . cloudbuild_service_account . email } "
22
22
}
23
23
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
+
24
33
resource "google_secret_manager_secret_iam_binding" "secret_manager_binding" {
25
34
for_each = toset ([
26
35
" roles/secretmanager.secretAccessor" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ variable "cloudbuild_trigger_name" {
3
3
type = string
4
4
}
5
5
6
+ variable "service_name" {
7
+ description = " Name of the Cloud Run service"
8
+ type = string
9
+ }
10
+
6
11
variable "description" {
7
12
description = " Description of the Cloud Build trigger"
8
13
type = string
You can’t perform that action at this time.
0 commit comments