diff --git a/modules/secure-cloud-run-core/README.md b/modules/secure-cloud-run-core/README.md index dbf3895b..4ee1c1dd 100644 --- a/modules/secure-cloud-run-core/README.md +++ b/modules/secure-cloud-run-core/README.md @@ -67,7 +67,7 @@ module "cloud_run_core" { | ssl\_certificates | A object with a list of domains to auto-generate SSL certificates or a list of SSL Certificates self-links in the pattern `projects//global/sslCertificates/` to be used by Load Balancer. |
object({
ssl_certificates_self_links = list(string)
generate_certificates_for_domains = list(string)
})
| n/a | yes | | template\_labels | A set of key/value label pairs to assign to the container metadata. | `map(string)` | `{}` | no | | timeout\_seconds | Timeout for each request. | `number` | `120` | no | -| traffic\_split | Managing traffic routing to the service. |
list(object({
latest_revision = bool
percent = number
revision_name = string
tag = string
}))
|
[
{
"latest_revision": true,
"percent": 100,
"revision_name": "v1-0-0",
"tag": "dedicatedurl"
}
]
| no | +| traffic\_split | Managing traffic routing to the service. |
list(object({
latest_revision = bool
percent = number
revision_name = string
tag = string
}))
|
[
{
"latest_revision": true,
"percent": 100,
"revision_name": "v1-0-0",
"tag": null
}
]
| no | | verified\_domain\_name | List of custom Domain Name. | `list(string)` | n/a | yes | | volume\_mounts | [Beta] Volume Mounts to be attached to the container (when using secret). |
list(object({
mount_path = string
name = string
}))
| `[]` | no | | volumes | [Beta] Volumes needed for environment variables (when using secret). |
list(object({
name = string
secret = set(object({
secret_name = string
items = map(string)
}))
}))
| `[]` | no | diff --git a/modules/secure-cloud-run-core/variables.tf b/modules/secure-cloud-run-core/variables.tf index 751f78b9..302d9aa0 100644 --- a/modules/secure-cloud-run-core/variables.tf +++ b/modules/secure-cloud-run-core/variables.tf @@ -165,7 +165,7 @@ variable "traffic_split" { latest_revision = true percent = 100 revision_name = "v1-0-0" - tag = "dedicatedurl" + tag = null }] } diff --git a/modules/secure-cloud-run/main.tf b/modules/secure-cloud-run/main.tf index e337ff6d..03709ebd 100644 --- a/modules/secure-cloud-run/main.tf +++ b/modules/secure-cloud-run/main.tf @@ -116,6 +116,12 @@ module "cloud_run_security" { ] } +resource "google_project_iam_member" "serverless_service_agent" { + project = var.serverless_project_id + role = "roles/run.serviceAgent" + member = "serviceAccount:${google_project_service_identity.serverless_sa.email}" +} + module "cloud_run_core" { source = "../secure-cloud-run-core" @@ -141,6 +147,7 @@ module "cloud_run_core" { depends_on = [ module.serverless_project_apis, google_artifact_registry_repository_iam_member.artifact_registry_iam, - google_service_account_iam_member.identity_service_account_user + google_service_account_iam_member.identity_service_account_user, + google_project_iam_member.serverless_service_agent ] }