diff --git a/README.md b/README.md index 218f87f4..82c9fbbd 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ module "cloud_run" { | template\_annotations | Annotations to the container metadata including VPC Connector and SQL. See [more details](https://cloud.google.com/run/docs/reference/rpc/google.cloud.run.v1#revisiontemplate) | `map(string)` |
{
"autoscaling.knative.dev/maxScale": 2,
"autoscaling.knative.dev/minScale": 1,
"generated-by": "terraform",
"run.googleapis.com/client-name": "terraform"
}
| no | | 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
}))
|
[
{
"latest_revision": true,
"percent": 100,
"revision_name": "v1-0-0"
}
]
| 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)` | `[]` | no | | 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/examples/cloud_run_vpc_connector/versions.tf b/examples/cloud_run_vpc_connector/versions.tf index f2bddf39..94c42fe0 100644 --- a/examples/cloud_run_vpc_connector/versions.tf +++ b/examples/cloud_run_vpc_connector/versions.tf @@ -20,11 +20,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = "~> 4.0" + version = "< 5.0" } google-beta = { source = "hashicorp/google-beta" - version = "~> 4.0" + version = "< 5.0" } } } diff --git a/examples/simple_cloud_run/versions.tf b/examples/simple_cloud_run/versions.tf index 116dcffb..94c42fe0 100644 --- a/examples/simple_cloud_run/versions.tf +++ b/examples/simple_cloud_run/versions.tf @@ -20,11 +20,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = "~> 3.53" + version = "< 5.0" } google-beta = { source = "hashicorp/google-beta" - version = "~> 3.53" + version = "< 5.0" } } } diff --git a/examples/simple_cloud_run_with_cmek/versions.tf b/examples/simple_cloud_run_with_cmek/versions.tf index b6fc3183..ff745330 100644 --- a/examples/simple_cloud_run_with_cmek/versions.tf +++ b/examples/simple_cloud_run_with_cmek/versions.tf @@ -20,11 +20,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = "~> 4.0" + version = "< 5.0" } google-beta = { source = "hashicorp/google-beta" - version = "~> 4.0" + version = "< 5.0" } } } diff --git a/main.tf b/main.tf index 12cdeaef..45f5f767 100644 --- a/main.tf +++ b/main.tf @@ -118,6 +118,7 @@ resource "google_cloud_run_service" "main" { percent = lookup(traffic.value, "percent", 100) latest_revision = lookup(traffic.value, "latest_revision", null) revision_name = lookup(traffic.value, "latest_revision") ? null : lookup(traffic.value, "revision_name") + tag = lookup(traffic.value, "tag", null) } } } diff --git a/modules/secure-cloud-run-core/README.md b/modules/secure-cloud-run-core/README.md index 6980cf7f..dbf3895b 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
}))
|
[
{
"latest_revision": true,
"percent": 100,
"revision_name": "v1-0-0"
}
]
| 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 | | 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 505b7797..751f78b9 100644 --- a/modules/secure-cloud-run-core/variables.tf +++ b/modules/secure-cloud-run-core/variables.tf @@ -159,11 +159,13 @@ variable "traffic_split" { latest_revision = bool percent = number revision_name = string + tag = string })) default = [{ latest_revision = true percent = 100 revision_name = "v1-0-0" + tag = "dedicatedurl" }] } diff --git a/variables.tf b/variables.tf index 2b19e3a6..ec71c374 100644 --- a/variables.tf +++ b/variables.tf @@ -46,12 +46,14 @@ variable "traffic_split" { latest_revision = bool percent = number revision_name = string + tag = string })) description = "Managing traffic routing to the service" default = [{ latest_revision = true percent = 100 revision_name = "v1-0-0" + tag = null }] } diff --git a/versions.tf b/versions.tf index 47761808..c1db0b47 100644 --- a/versions.tf +++ b/versions.tf @@ -20,11 +20,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = ">= 3.53, < 5.0" + version = "< 5.0" } google-beta = { source = "hashicorp/google-beta" - version = ">= 3.53, < 5.0" + version = "< 5.0" } }