README.md

June 10, 2026 ยท View on GitHub

Description

This module deploys a Google Cloud Run (v2) service.

Example usage

- id: cloud_run
  source: modules/compute/cloud-run
  settings:
    project_id: $(vars.project_id)
    region: us-central1
    service_name: my-service
    image: us-docker.pkg.dev/cloudrun/container/hello
    container_port: 8080
    env_vars:
      KEY: "VALUE"
    allow_unauthenticated: true

License

Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Requirements

NameVersion
terraform>= 1.12.2
google>= 4.48.0

Providers

NameVersion
google>= 4.48.0

Modules

No modules.

Resources

NameType
google_cloud_run_v2_service.defaultresource
google_cloud_run_v2_service_iam_member.public_accessresource

Inputs

NameDescriptionTypeDefaultRequired
allow_unauthenticatedWhether to allow unauthenticated accessboolfalseno
container_portPort the container listens onnumber8080no
deletion_protectionWhether to enable deletion protection for the Cloud Run servicebooltrueno
env_varsEnvironment variables for the containermap(string){}no
imageContainer Image URLstringn/ayes
ingressIngress traffic allowed for the service. Possible values: INGRESS_TRAFFIC_ALL, INGRESS_TRAFFIC_INTERNAL_ONLY, INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER.string"INGRESS_TRAFFIC_ALL"no
labelsLabels to apply to the Cloud Run serviceany{}no
project_idGCP Project IDstringn/ayes
regionGCP Regionstringn/ayes
service_nameCloud Run Service Namestringn/ayes

Outputs

NameDescription
service_nameThe Name of the Cloud Run service
service_urlThe URL of the Cloud Run service