Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updates to README and descriptions #19

Merged
merged 3 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<SERVICE NAME>"
project_id = "<PROJECT ID>"
location = "<LOCATION>"

requests = {
cpu = "500m"
memory = "128Mi"
}
image = "<GCE_HOSTED_IMAGE_URL>"
prabhu34 marked this conversation as resolved.
Show resolved Hide resolved
}
```

Expand All @@ -59,15 +56,15 @@ module "cloud_run" {
| ports | Port which the container listens to (http1 or h2c) | <pre>object({<br> name = string<br> port = number<br> })</pre> | <pre>{<br> "name": "http1",<br> "port": 8080<br>}</pre> | 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)` | <pre>{<br> "run.googleapis.com/ingress": "all"<br>}</pre> | 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 |
| 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)` | <pre>{<br> "autoscaling.knative.dev/maxScale": 2,<br> "autoscaling.knative.dev/minScale": 1,<br> "generated-by": "terraform",<br> "run.googleapis.com/client-name": "terraform"<br>}</pre> | 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 | <pre>list(object({<br> latest_revision = bool<br> percent = number<br> revision_name = string<br> }))</pre> | <pre>[<br> {<br> "latest_revision": true,<br> "percent": 100,<br> "revision_name": "v1-0-0"<br> }<br>]</pre> | 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) | <pre>list(object({<br> mount_path = string<br> name = string<br> }))</pre> | `[]` | no |
| volumes | [Beta] Volumes needed for environment variables (when using secret) | <pre>list(object({<br> name = string<br> secret = set(object({<br> secret_name = string<br> items = map(string)<br> }))<br> }))</pre> | `[]` | no |

Expand Down
6 changes: 3 additions & 3 deletions examples/cloud_run_vpc_connector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Expand Down
8 changes: 5 additions & 3 deletions examples/cloud_run_vpc_connector/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ variable "timeout_seconds" {
variable "service_account_email" {
type = string
description = "Service Account email needed for the service"
default = null
default = ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From our offline conversation, the reason for this change is because the registry identifies these as required inputs although they are not.
image

}

variable "volumes" {
Expand Down Expand Up @@ -190,7 +190,7 @@ variable "volume_mounts" {
variable "verified_domain_name" {
type = string
description = "Custom Domain Name"
default = null
default = ""
}

variable "force_override" {
Expand Down