»Google Cloud Run

»Builders

Google Cloud Run uses Docker images for building, which are generated by these builders:

»google-cloud-run (platform)

Deploy a container to Google Cloud Run.

»Interface

»Variables

»auto_scaling

Configuration to control the auto scaling parameters for Cloud Run.

  • Type: *cloudrun.AutoScaling

»auto_scaling.max

Maximum number of Cloud Run instances. When the maximum requests per container is exceeded, Cloud Run will create an additional container instance to handle load. This parameter controls the maximum number of instances that can be created.

»capacity

CPU, Memory, and resource limits for each Cloud Run instance.

  • Type: *cloudrun.Capacity

»capacity.cpu_count

Number of CPUs to allocate the Cloud Run instance, min 1, max 2.

»capacity.max_requests_per_container

Maximum number of concurrent requests each instance can handle. When the maximum requests are exceeded, Cloud Run will create an additional instance.

»capacity.memory

Memory to allocate the Cloud Run instance specified in MB, min 128, max 4096.

»capacity.request_timeout

Maximum time a request can take before timing out, max 900.

»location

GCP location, e.g. europe-north-1.

  • Type: string

»port

The port your application listens on.

  • Type: int
  • Optional

»project

GCP project ID where the Cloud Run instance will be deployed.

  • Type: string

»static_environment

Additional environment variables to be added to the Cloud Run instance.

  • Type: map[string]string
  • Optional

»unauthenticated

Is public unauthenticated access allowed for the Cloud Run instance?.

  • Type: *bool
  • Optional

»Examples


project = "wpmini"

app "wpmini" {
  labels = {
    "service" = "wpmini",
    "env"     = "dev"
  }

  build {
    use "pack" {}

    registry {
      use "docker" {
        image = "gcr.io/waypoint-project-id/wpmini"
        tag   = "latest"
      }
    }
  }

  deploy {
    use "google-cloud-run" {
      project  = "waypoint-project-id"
      location = "europe-north1"

      port = 5000

      static_environment = {
        "NAME" : "World"
      }

      capacity {
        memory                     = 128
        cpu_count                  = 2
        max_requests_per_container = 10
        request_timeout            = 300
      }

      auto_scaling {
        max = 10
      }
    }
  }

  release {
    use "google-cloud-run" {}
  }
}

»google-cloud-run (releasemanager)

Manipulates the Cloud Run APIs to make deployments active.

»Interface

»Variables