diff --git a/README.md b/README.md index 379c1c3a..32438d37 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,14 @@ Basic usage of this module is as follows: ```hcl module "cloud_run" { - source = "terraform-google-modules/terraform-google-cloud-run/google" - version = "~> 0.1.0" + source = "GoogleCloudPlatform/cloud-run/google" + version = "~> 0.1.1" + # Required variables service_name = "" project_id = "" location = "" - - requests = { - cpu = "500m" - memory = "128Mi" - } + image = "gcr.io/cloudrun/hello" } ``` @@ -59,7 +56,7 @@ module "cloud_run" { | ports | Port which the container listens to (http1 or h2c) |
object({
name = string
port = number
})
|
{
"name": "http1",
"port": 8080
}
| no | | project\_id | The project ID to deploy to | `string` | n/a | yes | | requests | Resource requests to the container | `map(string)` | `{}` | no | -| service\_account\_email | Service Account email needed for the service | `string` | `null` | no | +| service\_account\_email | Service Account email needed for the service | `string` | `""` | no | | service\_annotations | Annotations to the service. Acceptable values all, internal, internal-and-cloud-load-balancing | `map(string)` |
{
"run.googleapis.com/ingress": "all"
}
| no | | service\_labels | A set of key/value label pairs to assign to the service | `map(string)` | `{}` | no | | service\_name | The name of the Cloud Run service to create | `string` | n/a | yes | @@ -67,7 +64,7 @@ module "cloud_run" { | 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 | -| verified\_domain\_name | Custom Domain Name | `string` | `null` | no | +| verified\_domain\_name | Custom Domain Name | `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/README.md b/examples/cloud_run_vpc_connector/README.md index bc0dd5d5..f675a19b 100644 --- a/examples/cloud_run_vpc_connector/README.md +++ b/examples/cloud_run_vpc_connector/README.md @@ -24,15 +24,15 @@ This example assumes that below mentioend prerequisites are in place before cons | Name | Description | |------|-------------| -| connector\_id | n/a | +| connector\_id | VPC Connector ID | | revision | Deployed revision for the service | | service\_id | Unique Identifier for the created service | | service\_location | Location in which the Cloud Run service was created | | service\_name | Name of the created service | | service\_status | Status of the created service | | service\_url | The URL on which the deployed service is available | -| subnets | n/a | -| vpc\_name | VPC created for serverless | +| subnets | VPC Subnets | +| vpc\_name | VPC created for serverless connector | diff --git a/examples/cloud_run_vpc_connector/outputs.tf b/examples/cloud_run_vpc_connector/outputs.tf index 7b1e1df3..22ffafd7 100644 --- a/examples/cloud_run_vpc_connector/outputs.tf +++ b/examples/cloud_run_vpc_connector/outputs.tf @@ -46,13 +46,15 @@ output "service_location" { output "vpc_name" { value = module.vpc.network_name - description = "VPC created for serverless" + description = "VPC created for serverless connector" } output "subnets" { - value = module.vpc.subnets + value = module.vpc.subnets + description = "VPC Subnets" } output "connector_id" { - value = module.serverless_connector.connector_ids + value = module.serverless_connector.connector_ids + description = "VPC Connector ID" } diff --git a/main.tf b/main.tf index ffbcd24c..20051440 100644 --- a/main.tf +++ b/main.tf @@ -118,7 +118,7 @@ resource "google_cloud_run_service" "main" { } resource "google_cloud_run_domain_mapping" "domain_map" { - count = var.verified_domain_name != null ? 1 : 0 + count = var.verified_domain_name != "" ? 1 : 0 provider = google-beta location = google_cloud_run_service.main.location name = var.verified_domain_name diff --git a/variables.tf b/variables.tf index a3411c0f..b05ca009 100644 --- a/variables.tf +++ b/variables.tf @@ -103,7 +103,7 @@ variable "timeout_seconds" { variable "service_account_email" { type = string description = "Service Account email needed for the service" - default = null + default = "" } variable "volumes" { @@ -190,7 +190,7 @@ variable "volume_mounts" { variable "verified_domain_name" { type = string description = "Custom Domain Name" - default = null + default = "" } variable "force_override" {