cloud-run

GoogleCloudPlatform/cloud-run/google

Terraform Module HCL GOOGLE

Deploys apps to Cloud Run, along with option to map custom domain

Install
module "cloud-run" {
source = "GoogleCloudPlatform/cloud-run/google"
version = "0.25.0"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform Cloud Run Module This module handles the basic deployment of containerized applications on Cloud Run, along with domain mapping and IAM policy for the service. The resources/services/activations/deletions that this module will create/trigger are: Creates a Cloud Run service with provided name and container Creates Domain mapping for the deployed service Applies Cloud Run Invoker role to members Mapping custom domains and subdomains You can map multiple custom domains and subdomains to the same Cloud Run service. If you want to register a domain with Cloud Domains, see Registering a domain with Cloud Domains within the Cloud Run console. To add a custom domain or subdomain to your Cloud Run service, you need to add the values to the verified_domain_name variable. Before you've map

Inputs (31)
NameTypeDescriptionDefault
service_namestringThe name of the Cloud Run service to create required
project_idstringThe project ID to deploy to required
imagestringGCR hosted image URL to deploy required
locationstringCloud Run service deployment location required
requestsmap(string)Resource requests to the container{}
volume_mountslist(object({ mount_path =[Beta] Volume Mounts to be attached to the container (when using secret)[]
force_overrideboolOption to force override existing mappingfalse
generate_revision_nameboolOption to enable revision name generationtrue
service_account_emailstringService Account email needed for the service""
startup_probeobject({ failure_thresholdStartup probe of application within the container. All other probes are disablednull
service_labelsmap(string)A set of key/value label pairs to assign to the service{}
traffic_splitlist(object({ latest_revisManaging traffic routing to the service[ { "latest_revision": true, "
service_annotationsmap(string)Annotations to the service. Acceptable values all, internal, internal-and-cloud-{ "run.googleapis.com/ingress": "all"
timeout_secondsnumberTimeout for each request120
volumeslist(object({ name = strin[Beta] Volumes needed for environment variables (when using secret)[]
liveness_probeobject({ failure_thresholdPeriodic probe of container liveness. Container will be restarted if the probe fnull
certificate_modestringThe mode of the certificate (NONE or AUTOMATIC)"NONE"
template_labelsmap(string)A set of key/value label pairs to assign to the container metadata{}
template_annotationsmap(string)Annotations to the container metadata including VPC Connector and SQL. See [more{ "autoscaling.knative.dev/maxScale":
argumentlist(string)Arguments passed to the ENTRYPOINT command, include these only if image entrypoi[]
env_varslist(object({ value = striEnvironment variables (cleartext)[]
verified_domain_namelist(string)List of Custom Domain Name[]
domain_map_labelsmap(string)A set of key/value label pairs to assign to the Domain mapping{}
encryption_keystringCMEK encryption key self-link expected in the format projects/PROJECT/locations/null
Outputs (11)
service_name — Name of the created service
service_url — The URL on which the deployed service is available
project_id — Google Cloud project in which the service was created
location — Location in which the Cloud Run service was created
service_status — Status of the created service
domain_map_status — Status of Domain mapping
apphub_service_uri — Service URI in CAIS style to be used by Apphub.
revision — Deployed revision for the service
service_id — Unique Identifier for the created service
domain_map_id — Unique Identifier for the created domain map
verified_domain_name — List of Custom Domain Name
Resources (3)
google_cloud_run_domain_mappinggoogle_cloud_run_servicegoogle_cloud_run_service_iam_member
Details
FrameworkTerraform Module
LanguageHCL
Version0.25.0
Cloud GOOGLE
★ Stars200
Forks150
Total downloads1.1M
Inputs31
Outputs11
Resources3
Examples11
Submodules8
LicenseApache-2.0
NamespaceGoogleCloudPlatform
Updated