Skip to content

googleCloudRunService

Service acts as a top-level container that manages a set of Routes and Configurations which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership. Service acts only as an orchestrator of the underlying Routes and Configurations (much as a kubernetes Deployment orchestrates ReplicaSets).

The Service's controller will track the statuses of its owned Configuration and Route, reflecting their statuses and conditions as its own.

See also: https://github.com/knative/specs/blob/main/specs/serving/overview.md

To get more information about Service, see:

\~> Warning: googleCloudrunService creates a Managed Google Cloud Run Service. If you need to create a Cloud Run Service on Anthos(GKE/VMWare) then you will need to create it using the kubernetes alpha provider. Have a look at the Cloud Run Anthos example below.

Example Usage - Cloud Run Service Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.cloudRunService.CloudRunService(this, "default", {
  location: "us-central1",
  name: "cloudrun-srv",
  template: [
    {
      spec: [
        {
          containers: [
            {
              image: "us-docker.pkg.dev/cloudrun/container/hello",
            },
          ],
        },
      ],
    },
  ],
  traffic: [
    {
      latest_revision: true,
      percent: 100,
    },
  ],
});

Example Usage - Cloud Run Service Sql

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleSqlDatabaseInstanceInstance =
  new google.sqlDatabaseInstance.SqlDatabaseInstance(this, "instance", {
    database_version: "MYSQL_5_7",
    deletion_protection: "true",
    name: "cloudrun-sql",
    region: "us-east1",
    settings: [
      {
        tier: "db-f1-micro",
      },
    ],
  });
new google.cloudRunService.CloudRunService(this, "default", {
  autogenerate_revision_name: true,
  location: "us-central1",
  name: "cloudrun-srv",
  template: [
    {
      metadata: [
        {
          annotations: [
            {
              "autoscaling.knative.dev/maxScale": "1000",
              "run.googleapis.com/client-name": "terraform",
              "run.googleapis.com/cloudsql-instances":
                googleSqlDatabaseInstanceInstance.connectionName,
            },
          ],
        },
      ],
      spec: [
        {
          containers: [
            {
              image: "us-docker.pkg.dev/cloudrun/container/hello",
            },
          ],
        },
      ],
    },
  ],
});

Example Usage - Cloud Run Service Noauth

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleCloudRunServiceDefault = new google.cloudRunService.CloudRunService(
  this,
  "default",
  {
    location: "us-central1",
    name: "cloudrun-srv",
    template: [
      {
        spec: [
          {
            containers: [
              {
                image: "us-docker.pkg.dev/cloudrun/container/hello",
              },
            ],
          },
        ],
      },
    ],
  }
);
const dataGoogleIamPolicyNoauth =
  new google.dataGoogleIamPolicy.DataGoogleIamPolicy(this, "noauth", {
    binding: [
      {
        members: ["allUsers"],
        role: "roles/run.invoker",
      },
    ],
  });
const googleCloudRunServiceIamPolicyNoauth =
  new google.cloudRunServiceIamPolicy.CloudRunServiceIamPolicy(
    this,
    "noauth_2",
    {
      location: googleCloudRunServiceDefault.location,
      policy_data: dataGoogleIamPolicyNoauth.policyData,
      project: googleCloudRunServiceDefault.project,
      service: googleCloudRunServiceDefault.name,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleCloudRunServiceIamPolicyNoauth.overrideLogicalId("noauth");

Example Usage - Cloud Run Service Probes

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleCloudRunServiceDefault = new google.cloudRunService.CloudRunService(
  this,
  "default",
  {
    location: "us-central1",
    metadata: [
      {
        annotations: [
          {
            "run.googleapis.com/launch-stage": "BETA",
          },
        ],
      },
    ],
    name: "cloudrun-srv",
    provider: "${google-beta}",
    template: [
      {
        spec: [
          {
            containers: [
              {
                image: "us-docker.pkg.dev/cloudrun/container/hello",
                liveness_probe: [
                  {
                    http_get: [
                      {
                        path: "/",
                      },
                    ],
                  },
                ],
                startup_probe: [
                  {
                    failure_threshold: 1,
                    initial_delay_seconds: 0,
                    period_seconds: 3,
                    tcp_socket: [
                      {
                        port: 8080,
                      },
                    ],
                    timeout_seconds: 1,
                  },
                ],
              },
            ],
          },
        ],
      },
    ],
    traffic: [
      {
        latest_revision: true,
        percent: 100,
      },
    ],
  }
);
googleCloudRunServiceDefault.addOverride("lifecycle", [
  {
    ignore_changes: ["${metadata.0.annotations}"],
  },
]);

Argument Reference

The following arguments are supported:

  • name - (Required) Name must be unique within a namespace, within a Cloud Run region. Is required when creating resources. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names

  • location - (Required) The location of the cloud run instance. eg us-central1

The traffic block supports:

  • revisionName - (Optional) RevisionName of a specific revision to which to send this portion of traffic.

  • percent - (Required) Percent specifies percent of the traffic to this Revision or Configuration.

  • tag - (Optional) Tag is optionally used to expose a dedicated url for referencing this target exclusively.

  • latestRevision - (Optional) LatestRevision may be optionally provided to indicate that the latest ready Revision of the Configuration should be used for this traffic target. When provided LatestRevision must be true if RevisionName is empty; it must be false when RevisionName is non-empty.

  • url - (Output) URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)

The template block supports:

  • metadata - (Optional) Optional metadata for this Revision, including labels and annotations. Name will be generated by the Configuration. To set minimum instances for this revision, use the "autoscaling.knative.dev/minScale" annotation key. To set maximum instances for this revision, use the "autoscaling.knative.dev/maxScale" annotation key. To set Cloud SQL connections for the revision, use the "run.googleapis.com/cloudsql-instances" annotation key. Structure is documented below.

  • spec - (Required) RevisionSpec holds the desired state of the Revision (from the client). Structure is documented below.

The metadata block supports:

  • labels - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labels

  • generation - (Output) A sequence number representing a specific generation of the desired state.

  • resourceVersion - (Output) An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency

  • selfLink - (Output) SelfLink is a URL representing this object.

  • uid - (Output) UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

  • namespace - (Optional) In Cloud Run the namespace must be equal to either the project ID or project number. It will default to the resource's project.

  • annotations - (Optional) Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations Note: The Cloud Run API may add additional annotations that were not provided in your config. If terraform plan shows a diff where a server-side annotation is added, you can add it to your config or apply the lifecycle.ignore_changes rule to the metadata.0.annotations field.

  • name - (Optional) Name must be unique within a namespace, within a Cloud Run region. Is required when creating resources. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names

The spec block supports:

  • containers - (Required) Container defines the unit of execution for this Revision. In the context of a Revision, we disallow a number of the fields of this Container, including: name, ports, and volumeMounts. The runtime contract is documented here: https://github.com/knative/serving/blob/main/docs/runtime-contract.md Structure is documented below.

  • containerConcurrency - (Optional) ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Values are:

    • 0 thread-safe, the system should manage the max concurrency. This is the default value.
    • 1 not-thread-safe. Single concurrency
    • 2N thread-safe, max concurrency of N
  • timeoutSeconds - (Optional) TimeoutSeconds holds the max duration the instance is allowed for responding to a request.

  • serviceAccountName - (Optional) Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project's default service account.

  • volumes - (Optional) Volume represents a named volume in a container. Structure is documented below.

  • servingState - (Output, Deprecated) ServingState holds a value describing the state the resources are in for this Revision. It is expected that the system will manipulate this based on routability and load.

The containers block supports:

  • workingDir - (Optional, Deprecated) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

  • args - (Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

  • envFrom - (Optional, Deprecated) List of sources to populate environment variables in the container. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Structure is documented below.

  • image - (Required) Docker image name. This is most often a reference to a container located in the container registry, such as gcr.io/cloudrun/hello More info: https://kubernetes.io/docs/concepts/containers/images

  • command - (Optional) Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

  • env - (Optional) List of environment variables to set in the container. Structure is documented below.

  • ports - (Optional) List of open ports in the container. More Info: https://cloud.google.com/run/docs/reference/rest/v1/RevisionSpec#ContainerPort Structure is documented below.

  • resources - (Optional) Compute Resources required by this container. Used to set values such as max memory More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits Structure is documented below.

  • volumeMounts - (Optional) Volume to mount into the container's filesystem. Only supports SecretVolumeSources. Structure is documented below.

  • startupProbe - (Optional, Beta) Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes Structure is documented below.

  • livenessProbe - (Optional, Beta) Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes Structure is documented below.

The envFrom block supports:

  • prefix - (Optional) An optional identifier to prepend to each key in the ConfigMap.

  • configMapRef - (Optional) The ConfigMap to select from. Structure is documented below.

  • secretRef - (Optional) The Secret to select from. Structure is documented below.

The configMapRef block supports:

  • optional - (Optional) Specify whether the ConfigMap must be defined

  • localObjectReference - (Optional) The ConfigMap to select from. Structure is documented below.

The localObjectReference block supports:

  • name - (Required) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

The secretRef block supports:

  • localObjectReference - (Optional) The Secret to select from. Structure is documented below.

  • optional - (Optional) Specify whether the Secret must be defined

The localObjectReference block supports:

  • name - (Required) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

The env block supports:

  • name - (Optional) Name of the environment variable.

  • value - (Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

  • valueFrom - (Optional) Source for the environment variable's value. Only supports secret_key_ref. Structure is documented below.

The valueFrom block supports:

  • secretKeyRef - (Required) Selects a key (version) of a secret in Secret Manager. Structure is documented below.

The secretKeyRef block supports:

  • key - (Required) A Cloud Secret Manager secret version. Must be 'latest' for the latest version or an integer for a specific version.

  • name - (Required) The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project. If the secret is in another project, you must define an alias. An alias definition has the form: :projects/{project-id|project-number}/secrets/. If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation.

The ports block supports:

  • name - (Optional) If specified, used to specify which protocol to use. Allowed values are "http1" (HTTP/1) and "h2c" (HTTP/2 end-to-end). Defaults to "http1".

  • protocol - (Optional) Protocol for port. Must be "TCP". Defaults to "TCP".

  • containerPort - (Optional) Port number the container listens on. This must be a valid port number (between 1 and 65535). Defaults to "8080".

The resources block supports:

  • limits - (Optional) Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

  • requests - (Optional) Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

The volumeMounts block supports:

  • mountPath - (Required) Path within the container at which the volume should be mounted. Must not contain ':'.

  • name - (Required) This must match the Name of a Volume.

The startupProbe block supports:

  • initialDelaySeconds - (Optional) Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value is 240.

  • timeoutSeconds - (Optional) Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than periodSeconds.

  • periodSeconds - (Optional) How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240.

  • failureThreshold - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

  • tcpSocket - (Optional) TcpSocket specifies an action involving a TCP port. Structure is documented below.

  • httpGet - (Optional) HttpGet specifies the http request to perform. Structure is documented below.

  • grpc - (Optional) GRPC specifies an action involving a GRPC port. Structure is documented below.

The tcpSocket block supports:

  • port - (Optional) Port number to access on the container. Number must be in the range 1 to 65535.

The httpGet block supports:

  • path - (Optional) Path to access on the HTTP server. If set, it should not be empty string.

  • httpHeaders - (Optional) Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.

The httpHeaders block supports:

  • name - (Required) The header field name.

  • value - (Optional) The header field value.

The grpc block supports:

  • port - (Optional) Port number to access on the container. Number must be in the range 1 to 65535.

  • service - (Optional) The name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC.

The livenessProbe block supports:

  • initialDelaySeconds - (Optional) Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value is 3600.

  • timeoutSeconds - (Optional) Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds.

  • periodSeconds - (Optional) How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 3600.

  • failureThreshold - (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

  • httpGet - (Optional) HttpGet specifies the http request to perform. Structure is documented below.

  • grpc - (Optional) GRPC specifies an action involving a GRPC port. Structure is documented below.

The httpGet block supports:

  • path - (Optional) Path to access on the HTTP server. If set, it should not be empty string.

  • httpHeaders - (Optional) Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.

The httpHeaders block supports:

  • name - (Required) The header field name.

  • value - (Optional) The header field value.

The grpc block supports:

  • port - (Optional) Port number to access on the container. Number must be in the range 1 to 65535.

  • service - (Optional) The name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC.

The volumes block supports:

  • name - (Required) Volume's name.

  • secret - (Required) The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret_name. Structure is documented below.

The secret block supports:

  • secretName - (Required) The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project. If the secret is in another project, you must define an alias. An alias definition has the form: {alias}:projects/{project-id|project-number}/secrets/{secret-name}. If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation.

  • defaultMode - (Optional) Mode bits to use on created files by default. Must be a value between 0000 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

  • items - (Optional) If unspecified, the volume will expose a file whose name is the secret_name. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a key and a path. Structure is documented below.

The items block supports:

  • key - (Required) The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version.

  • path - (Required) The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.

  • mode - (Optional) Mode bits to use on this file, must be a value between 0000 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.


  • traffic - (Optional) Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations Structure is documented below.

  • template - (Optional) template holds the latest specification for the Revision to be stamped out. The template references the container image, and may also include labels and annotations that should be attached to the Revision. To correlate a Revision, and/or to force a Revision to be created when the spec doesn't otherwise change, a nonce label may be provided in the template metadata. For more details, see: https://github.com/knative/serving/blob/main/docs/client-conventions.md#associate-modifications-with-revisions Cloud Run does not currently support referencing a build that is responsible for materializing the container image from source. Structure is documented below.

  • metadata - (Optional) Metadata associated with this Service, including name, namespace, labels, and annotations. Structure is documented below.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • autogenerateRevisionName - (Optional) If set to true, the revision name (template.metadata.name) will be omitted and autogenerated by Cloud Run. This cannot be set to true while templateMetadataName is also set. (For legacy support, if templateMetadataName is unset in state while this field is set to false, the revision name will still autogenerate.)

The metadata block supports:

  • labels - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labels

  • generation - (Output) A sequence number representing a specific generation of the desired state.

  • resourceVersion - (Output) An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. They may only be valid for a particular resource or set of resources. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency

  • selfLink - (Output) SelfLink is a URL representing this object.

  • uid - (Output) UID is a unique id generated by the server on successful creation of a resource and is not allowed to change on PUT operations. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

  • namespace - (Optional) In Cloud Run the namespace must be equal to either the project ID or project number.

  • annotations - (Optional) Annotations is a key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations Note: The Cloud Run API may add additional annotations that were not provided in your config. If terraform plan shows a diff where a server-side annotation is added, you can add it to your config or apply the lifecycle.ignore_changes rule to the metadata.0.annotations field. Cloud Run (fully managed) uses the following annotation keys to configure features on a Service:

    • runGoogleapisCom/ingress sets the ingress settings for the Service. For example, "runGoogleapisCom/ingress" = "all".

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format locations/{{location}}/namespaces/{{project}}/services/{{name}}

  • status - The current status of the Service. Structure is documented below.

The status block contains:

  • conditions - (Output) Array of observed Service Conditions, indicating the current ready state of the service. Structure is documented below.

  • url - (Output) From RouteStatus. URL holds the url that will distribute traffic over the provided traffic targets. It generally has the form https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app

  • observedGeneration - (Output) ObservedGeneration is the 'Generation' of the Route that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False.

  • latestCreatedRevisionName - (Output) From ConfigurationStatus. LatestCreatedRevisionName is the last revision that was created from this Service's Configuration. It might not be ready yet, for that use LatestReadyRevisionName.

  • latestReadyRevisionName - (Output) From ConfigurationStatus. LatestReadyRevisionName holds the name of the latest Revision stamped out from this Service's Configuration that has had its "Ready" condition become "True".

The conditions block contains:

  • message - (Output) Human readable message indicating details about the current status.

  • status - (Output) Status of the condition, one of True, False, Unknown.

  • reason - (Output) One-word CamelCase reason for the condition's current status.

  • type - (Output) Type of domain mapping condition.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Service can be imported using any of these accepted formats:

$ terraform import google_cloud_run_service.default locations/{{location}}/namespaces/{{project}}/services/{{name}}
$ terraform import google_cloud_run_service.default {{location}}/{{project}}/{{name}}
$ terraform import google_cloud_run_service.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.