1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. cloudrunv2
  5. Service
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.cloudrunv2.Service

Explore with Pulumi AI

Service acts as a top-level container that manages a set of configurations and revision templates 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.

To get more information about Service, see:

Example Usage

Cloudrunv2 Service Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
Copy

Cloudrunv2 Service Limits

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
            resources: {
                limits: {
                    cpu: "2",
                    memory: "1024Mi",
                },
            },
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
            "resources": {
                "limits": {
                    "cpu": "2",
                    "memory": "1024Mi",
                },
            },
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						Resources: &cloudrunv2.ServiceTemplateContainerResourcesArgs{
							Limits: pulumi.StringMap{
								"cpu":    pulumi.String("2"),
								"memory": pulumi.String("1024Mi"),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    Resources = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerResourcesArgs
                    {
                        Limits = 
                        {
                            { "cpu", "2" },
                            { "memory", "1024Mi" },
                        },
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .resources(ServiceTemplateContainerResourcesArgs.builder()
                        .limits(Map.ofEntries(
                            Map.entry("cpu", "2"),
                            Map.entry("memory", "1024Mi")
                        ))
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
            resources:
              limits:
                cpu: '2'
                memory: 1024Mi
Copy

Cloudrunv2 Service Sql

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const secret = new gcp.secretmanager.Secret("secret", {
    secretId: "secret-1",
    replication: {
        auto: {},
    },
});
const secret_version_data = new gcp.secretmanager.SecretVersion("secret-version-data", {
    secret: secret.name,
    secretData: "secret-data",
});
const instance = new gcp.sql.DatabaseInstance("instance", {
    name: "cloudrun-sql",
    region: "us-central1",
    databaseVersion: "MYSQL_5_7",
    settings: {
        tier: "db-f1-micro",
    },
    deletionProtection: true,
});
const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        scaling: {
            maxInstanceCount: 2,
        },
        volumes: [{
            name: "cloudsql",
            cloudSqlInstance: {
                instances: [instance.connectionName],
            },
        }],
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
            envs: [
                {
                    name: "FOO",
                    value: "bar",
                },
                {
                    name: "SECRET_ENV_VAR",
                    valueSource: {
                        secretKeyRef: {
                            secret: secret.secretId,
                            version: "1",
                        },
                    },
                },
            ],
            volumeMounts: [{
                name: "cloudsql",
                mountPath: "/cloudsql",
            }],
        }],
    },
    traffics: [{
        type: "TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST",
        percent: 100,
    }],
}, {
    dependsOn: [secret_version_data],
});
const project = gcp.organizations.getProject({});
const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
    secretId: secret.id,
    role: "roles/secretmanager.secretAccessor",
    member: project.then(project => `serviceAccount:${project.number}-compute@developer.gserviceaccount.com`),
}, {
    dependsOn: [secret],
});
Copy
import pulumi
import pulumi_gcp as gcp

secret = gcp.secretmanager.Secret("secret",
    secret_id="secret-1",
    replication={
        "auto": {},
    })
secret_version_data = gcp.secretmanager.SecretVersion("secret-version-data",
    secret=secret.name,
    secret_data="secret-data")
instance = gcp.sql.DatabaseInstance("instance",
    name="cloudrun-sql",
    region="us-central1",
    database_version="MYSQL_5_7",
    settings={
        "tier": "db-f1-micro",
    },
    deletion_protection=True)
default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "scaling": {
            "max_instance_count": 2,
        },
        "volumes": [{
            "name": "cloudsql",
            "cloud_sql_instance": {
                "instances": [instance.connection_name],
            },
        }],
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
            "envs": [
                {
                    "name": "FOO",
                    "value": "bar",
                },
                {
                    "name": "SECRET_ENV_VAR",
                    "value_source": {
                        "secret_key_ref": {
                            "secret": secret.secret_id,
                            "version": "1",
                        },
                    },
                },
            ],
            "volume_mounts": [{
                "name": "cloudsql",
                "mount_path": "/cloudsql",
            }],
        }],
    },
    traffics=[{
        "type": "TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST",
        "percent": 100,
    }],
    opts = pulumi.ResourceOptions(depends_on=[secret_version_data]))
project = gcp.organizations.get_project()
secret_access = gcp.secretmanager.SecretIamMember("secret-access",
    secret_id=secret.id,
    role="roles/secretmanager.secretAccessor",
    member=f"serviceAccount:{project.number}-compute@developer.gserviceaccount.com",
    opts = pulumi.ResourceOptions(depends_on=[secret]))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/sql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		secret, err := secretmanager.NewSecret(ctx, "secret", &secretmanager.SecretArgs{
			SecretId: pulumi.String("secret-1"),
			Replication: &secretmanager.SecretReplicationArgs{
				Auto: &secretmanager.SecretReplicationAutoArgs{},
			},
		})
		if err != nil {
			return err
		}
		secret_version_data, err := secretmanager.NewSecretVersion(ctx, "secret-version-data", &secretmanager.SecretVersionArgs{
			Secret:     secret.Name,
			SecretData: pulumi.String("secret-data"),
		})
		if err != nil {
			return err
		}
		instance, err := sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
			Name:            pulumi.String("cloudrun-sql"),
			Region:          pulumi.String("us-central1"),
			DatabaseVersion: pulumi.String("MYSQL_5_7"),
			Settings: &sql.DatabaseInstanceSettingsArgs{
				Tier: pulumi.String("db-f1-micro"),
			},
			DeletionProtection: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Scaling: &cloudrunv2.ServiceTemplateScalingArgs{
					MaxInstanceCount: pulumi.Int(2),
				},
				Volumes: cloudrunv2.ServiceTemplateVolumeArray{
					&cloudrunv2.ServiceTemplateVolumeArgs{
						Name: pulumi.String("cloudsql"),
						CloudSqlInstance: &cloudrunv2.ServiceTemplateVolumeCloudSqlInstanceArgs{
							Instances: pulumi.StringArray{
								instance.ConnectionName,
							},
						},
					},
				},
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						Envs: cloudrunv2.ServiceTemplateContainerEnvArray{
							&cloudrunv2.ServiceTemplateContainerEnvArgs{
								Name:  pulumi.String("FOO"),
								Value: pulumi.String("bar"),
							},
							&cloudrunv2.ServiceTemplateContainerEnvArgs{
								Name: pulumi.String("SECRET_ENV_VAR"),
								ValueSource: &cloudrunv2.ServiceTemplateContainerEnvValueSourceArgs{
									SecretKeyRef: &cloudrunv2.ServiceTemplateContainerEnvValueSourceSecretKeyRefArgs{
										Secret:  secret.SecretId,
										Version: pulumi.String("1"),
									},
								},
							},
						},
						VolumeMounts: cloudrunv2.ServiceTemplateContainerVolumeMountArray{
							&cloudrunv2.ServiceTemplateContainerVolumeMountArgs{
								Name:      pulumi.String("cloudsql"),
								MountPath: pulumi.String("/cloudsql"),
							},
						},
					},
				},
			},
			Traffics: cloudrunv2.ServiceTrafficArray{
				&cloudrunv2.ServiceTrafficArgs{
					Type:    pulumi.String("TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST"),
					Percent: pulumi.Int(100),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			secret_version_data,
		}))
		if err != nil {
			return err
		}
		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
			SecretId: secret.ID(),
			Role:     pulumi.String("roles/secretmanager.secretAccessor"),
			Member:   pulumi.Sprintf("serviceAccount:%v-compute@developer.gserviceaccount.com", project.Number),
		}, pulumi.DependsOn([]pulumi.Resource{
			secret,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var secret = new Gcp.SecretManager.Secret("secret", new()
    {
        SecretId = "secret-1",
        Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
        {
            Auto = null,
        },
    });

    var secret_version_data = new Gcp.SecretManager.SecretVersion("secret-version-data", new()
    {
        Secret = secret.Name,
        SecretData = "secret-data",
    });

    var instance = new Gcp.Sql.DatabaseInstance("instance", new()
    {
        Name = "cloudrun-sql",
        Region = "us-central1",
        DatabaseVersion = "MYSQL_5_7",
        Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
        {
            Tier = "db-f1-micro",
        },
        DeletionProtection = true,
    });

    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Scaling = new Gcp.CloudRunV2.Inputs.ServiceTemplateScalingArgs
            {
                MaxInstanceCount = 2,
            },
            Volumes = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeArgs
                {
                    Name = "cloudsql",
                    CloudSqlInstance = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeCloudSqlInstanceArgs
                    {
                        Instances = new[]
                        {
                            instance.ConnectionName,
                        },
                    },
                },
            },
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    Envs = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvArgs
                        {
                            Name = "FOO",
                            Value = "bar",
                        },
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvArgs
                        {
                            Name = "SECRET_ENV_VAR",
                            ValueSource = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvValueSourceArgs
                            {
                                SecretKeyRef = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvValueSourceSecretKeyRefArgs
                                {
                                    Secret = secret.SecretId,
                                    Version = "1",
                                },
                            },
                        },
                    },
                    VolumeMounts = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerVolumeMountArgs
                        {
                            Name = "cloudsql",
                            MountPath = "/cloudsql",
                        },
                    },
                },
            },
        },
        Traffics = new[]
        {
            new Gcp.CloudRunV2.Inputs.ServiceTrafficArgs
            {
                Type = "TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST",
                Percent = 100,
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            secret_version_data,
        },
    });

    var project = Gcp.Organizations.GetProject.Invoke();

    var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
    {
        SecretId = secret.Id,
        Role = "roles/secretmanager.secretAccessor",
        Member = $"serviceAccount:{project.Apply(getProjectResult => getProjectResult.Number)}-compute@developer.gserviceaccount.com",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            secret,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.sql.DatabaseInstance;
import com.pulumi.gcp.sql.DatabaseInstanceArgs;
import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateScalingArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTrafficArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var secret = new Secret("secret", SecretArgs.builder()
            .secretId("secret-1")
            .replication(SecretReplicationArgs.builder()
                .auto(SecretReplicationAutoArgs.builder()
                    .build())
                .build())
            .build());

        var secret_version_data = new SecretVersion("secret-version-data", SecretVersionArgs.builder()
            .secret(secret.name())
            .secretData("secret-data")
            .build());

        var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
            .name("cloudrun-sql")
            .region("us-central1")
            .databaseVersion("MYSQL_5_7")
            .settings(DatabaseInstanceSettingsArgs.builder()
                .tier("db-f1-micro")
                .build())
            .deletionProtection(true)
            .build());

        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .scaling(ServiceTemplateScalingArgs.builder()
                    .maxInstanceCount(2)
                    .build())
                .volumes(ServiceTemplateVolumeArgs.builder()
                    .name("cloudsql")
                    .cloudSqlInstance(ServiceTemplateVolumeCloudSqlInstanceArgs.builder()
                        .instances(instance.connectionName())
                        .build())
                    .build())
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .envs(                    
                        ServiceTemplateContainerEnvArgs.builder()
                            .name("FOO")
                            .value("bar")
                            .build(),
                        ServiceTemplateContainerEnvArgs.builder()
                            .name("SECRET_ENV_VAR")
                            .valueSource(ServiceTemplateContainerEnvValueSourceArgs.builder()
                                .secretKeyRef(ServiceTemplateContainerEnvValueSourceSecretKeyRefArgs.builder()
                                    .secret(secret.secretId())
                                    .version("1")
                                    .build())
                                .build())
                            .build())
                    .volumeMounts(ServiceTemplateContainerVolumeMountArgs.builder()
                        .name("cloudsql")
                        .mountPath("/cloudsql")
                        .build())
                    .build())
                .build())
            .traffics(ServiceTrafficArgs.builder()
                .type("TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST")
                .percent(100)
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(secret_version_data)
                .build());

        final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
            .build());

        var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
            .secretId(secret.id())
            .role("roles/secretmanager.secretAccessor")
            .member(String.format("serviceAccount:%s-compute@developer.gserviceaccount.com", project.number()))
            .build(), CustomResourceOptions.builder()
                .dependsOn(secret)
                .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        scaling:
          maxInstanceCount: 2
        volumes:
          - name: cloudsql
            cloudSqlInstance:
              instances:
                - ${instance.connectionName}
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
            envs:
              - name: FOO
                value: bar
              - name: SECRET_ENV_VAR
                valueSource:
                  secretKeyRef:
                    secret: ${secret.secretId}
                    version: '1'
            volumeMounts:
              - name: cloudsql
                mountPath: /cloudsql
      traffics:
        - type: TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST
          percent: 100
    options:
      dependsOn:
        - ${["secret-version-data"]}
  secret:
    type: gcp:secretmanager:Secret
    properties:
      secretId: secret-1
      replication:
        auto: {}
  secret-version-data:
    type: gcp:secretmanager:SecretVersion
    properties:
      secret: ${secret.name}
      secretData: secret-data
  secret-access:
    type: gcp:secretmanager:SecretIamMember
    properties:
      secretId: ${secret.id}
      role: roles/secretmanager.secretAccessor
      member: serviceAccount:${project.number}-compute@developer.gserviceaccount.com
    options:
      dependsOn:
        - ${secret}
  instance:
    type: gcp:sql:DatabaseInstance
    properties:
      name: cloudrun-sql
      region: us-central1
      databaseVersion: MYSQL_5_7
      settings:
        tier: db-f1-micro
      deletionProtection: true
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
Copy

Cloudrunv2 Service Vpcaccess

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const customTestNetwork = new gcp.compute.Network("custom_test", {
    name: "run-network",
    autoCreateSubnetworks: false,
});
const customTest = new gcp.compute.Subnetwork("custom_test", {
    name: "run-subnetwork",
    ipCidrRange: "10.2.0.0/28",
    region: "us-central1",
    network: customTestNetwork.id,
});
const connector = new gcp.vpcaccess.Connector("connector", {
    name: "run-vpc",
    subnet: {
        name: customTest.name,
    },
    machineType: "e2-standard-4",
    minInstances: 2,
    maxInstances: 3,
    region: "us-central1",
});
const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
        }],
        vpcAccess: {
            connector: connector.id,
            egress: "ALL_TRAFFIC",
        },
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

custom_test_network = gcp.compute.Network("custom_test",
    name="run-network",
    auto_create_subnetworks=False)
custom_test = gcp.compute.Subnetwork("custom_test",
    name="run-subnetwork",
    ip_cidr_range="10.2.0.0/28",
    region="us-central1",
    network=custom_test_network.id)
connector = gcp.vpcaccess.Connector("connector",
    name="run-vpc",
    subnet={
        "name": custom_test.name,
    },
    machine_type="e2-standard-4",
    min_instances=2,
    max_instances=3,
    region="us-central1")
default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
        }],
        "vpc_access": {
            "connector": connector.id,
            "egress": "ALL_TRAFFIC",
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/vpcaccess"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		customTestNetwork, err := compute.NewNetwork(ctx, "custom_test", &compute.NetworkArgs{
			Name:                  pulumi.String("run-network"),
			AutoCreateSubnetworks: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		customTest, err := compute.NewSubnetwork(ctx, "custom_test", &compute.SubnetworkArgs{
			Name:        pulumi.String("run-subnetwork"),
			IpCidrRange: pulumi.String("10.2.0.0/28"),
			Region:      pulumi.String("us-central1"),
			Network:     customTestNetwork.ID(),
		})
		if err != nil {
			return err
		}
		connector, err := vpcaccess.NewConnector(ctx, "connector", &vpcaccess.ConnectorArgs{
			Name: pulumi.String("run-vpc"),
			Subnet: &vpcaccess.ConnectorSubnetArgs{
				Name: customTest.Name,
			},
			MachineType:  pulumi.String("e2-standard-4"),
			MinInstances: pulumi.Int(2),
			MaxInstances: pulumi.Int(3),
			Region:       pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		_, err = cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
					},
				},
				VpcAccess: &cloudrunv2.ServiceTemplateVpcAccessArgs{
					Connector: connector.ID(),
					Egress:    pulumi.String("ALL_TRAFFIC"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var customTestNetwork = new Gcp.Compute.Network("custom_test", new()
    {
        Name = "run-network",
        AutoCreateSubnetworks = false,
    });

    var customTest = new Gcp.Compute.Subnetwork("custom_test", new()
    {
        Name = "run-subnetwork",
        IpCidrRange = "10.2.0.0/28",
        Region = "us-central1",
        Network = customTestNetwork.Id,
    });

    var connector = new Gcp.VpcAccess.Connector("connector", new()
    {
        Name = "run-vpc",
        Subnet = new Gcp.VpcAccess.Inputs.ConnectorSubnetArgs
        {
            Name = customTest.Name,
        },
        MachineType = "e2-standard-4",
        MinInstances = 2,
        MaxInstances = 3,
        Region = "us-central1",
    });

    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                },
            },
            VpcAccess = new Gcp.CloudRunV2.Inputs.ServiceTemplateVpcAccessArgs
            {
                Connector = connector.Id,
                Egress = "ALL_TRAFFIC",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.vpcaccess.Connector;
import com.pulumi.gcp.vpcaccess.ConnectorArgs;
import com.pulumi.gcp.vpcaccess.inputs.ConnectorSubnetArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateVpcAccessArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var customTestNetwork = new Network("customTestNetwork", NetworkArgs.builder()
            .name("run-network")
            .autoCreateSubnetworks(false)
            .build());

        var customTest = new Subnetwork("customTest", SubnetworkArgs.builder()
            .name("run-subnetwork")
            .ipCidrRange("10.2.0.0/28")
            .region("us-central1")
            .network(customTestNetwork.id())
            .build());

        var connector = new Connector("connector", ConnectorArgs.builder()
            .name("run-vpc")
            .subnet(ConnectorSubnetArgs.builder()
                .name(customTest.name())
                .build())
            .machineType("e2-standard-4")
            .minInstances(2)
            .maxInstances(3)
            .region("us-central1")
            .build());

        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .build())
                .vpcAccess(ServiceTemplateVpcAccessArgs.builder()
                    .connector(connector.id())
                    .egress("ALL_TRAFFIC")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
        vpcAccess:
          connector: ${connector.id}
          egress: ALL_TRAFFIC
  connector:
    type: gcp:vpcaccess:Connector
    properties:
      name: run-vpc
      subnet:
        name: ${customTest.name}
      machineType: e2-standard-4
      minInstances: 2
      maxInstances: 3
      region: us-central1
  customTest:
    type: gcp:compute:Subnetwork
    name: custom_test
    properties:
      name: run-subnetwork
      ipCidrRange: 10.2.0.0/28
      region: us-central1
      network: ${customTestNetwork.id}
  customTestNetwork:
    type: gcp:compute:Network
    name: custom_test
    properties:
      name: run-network
      autoCreateSubnetworks: false
Copy

Cloudrunv2 Service Directvpc

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    launchStage: "GA",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
        }],
        vpcAccess: {
            networkInterfaces: [{
                network: "default",
                subnetwork: "default",
                tags: [
                    "tag1",
                    "tag2",
                    "tag3",
                ],
            }],
        },
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    launch_stage="GA",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
        }],
        "vpc_access": {
            "network_interfaces": [{
                "network": "default",
                "subnetwork": "default",
                "tags": [
                    "tag1",
                    "tag2",
                    "tag3",
                ],
            }],
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			LaunchStage:        pulumi.String("GA"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
					},
				},
				VpcAccess: &cloudrunv2.ServiceTemplateVpcAccessArgs{
					NetworkInterfaces: cloudrunv2.ServiceTemplateVpcAccessNetworkInterfaceArray{
						&cloudrunv2.ServiceTemplateVpcAccessNetworkInterfaceArgs{
							Network:    pulumi.String("default"),
							Subnetwork: pulumi.String("default"),
							Tags: pulumi.StringArray{
								pulumi.String("tag1"),
								pulumi.String("tag2"),
								pulumi.String("tag3"),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        LaunchStage = "GA",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                },
            },
            VpcAccess = new Gcp.CloudRunV2.Inputs.ServiceTemplateVpcAccessArgs
            {
                NetworkInterfaces = new[]
                {
                    new Gcp.CloudRunV2.Inputs.ServiceTemplateVpcAccessNetworkInterfaceArgs
                    {
                        Network = "default",
                        Subnetwork = "default",
                        Tags = new[]
                        {
                            "tag1",
                            "tag2",
                            "tag3",
                        },
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateVpcAccessArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .launchStage("GA")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .build())
                .vpcAccess(ServiceTemplateVpcAccessArgs.builder()
                    .networkInterfaces(ServiceTemplateVpcAccessNetworkInterfaceArgs.builder()
                        .network("default")
                        .subnetwork("default")
                        .tags(                        
                            "tag1",
                            "tag2",
                            "tag3")
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      launchStage: GA
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
        vpcAccess:
          networkInterfaces:
            - network: default
              subnetwork: default
              tags:
                - tag1
                - tag2
                - tag3
Copy

Cloudrunv2 Service Gpu

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
            resources: {
                limits: {
                    cpu: "4",
                    memory: "16Gi",
                    "nvidia.com/gpu": "1",
                },
                startupCpuBoost: true,
            },
        }],
        nodeSelector: {
            accelerator: "nvidia-l4",
        },
        gpuZonalRedundancyDisabled: true,
        scaling: {
            maxInstanceCount: 1,
        },
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
            "resources": {
                "limits": {
                    "cpu": "4",
                    "memory": "16Gi",
                    "nvidia.com/gpu": "1",
                },
                "startup_cpu_boost": True,
            },
        }],
        "node_selector": {
            "accelerator": "nvidia-l4",
        },
        "gpu_zonal_redundancy_disabled": True,
        "scaling": {
            "max_instance_count": 1,
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						Resources: &cloudrunv2.ServiceTemplateContainerResourcesArgs{
							Limits: pulumi.StringMap{
								"cpu":            pulumi.String("4"),
								"memory":         pulumi.String("16Gi"),
								"nvidia.com/gpu": pulumi.String("1"),
							},
							StartupCpuBoost: pulumi.Bool(true),
						},
					},
				},
				NodeSelector: &cloudrunv2.ServiceTemplateNodeSelectorArgs{
					Accelerator: pulumi.String("nvidia-l4"),
				},
				GpuZonalRedundancyDisabled: pulumi.Bool(true),
				Scaling: &cloudrunv2.ServiceTemplateScalingArgs{
					MaxInstanceCount: pulumi.Int(1),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    Resources = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerResourcesArgs
                    {
                        Limits = 
                        {
                            { "cpu", "4" },
                            { "memory", "16Gi" },
                            { "nvidia.com/gpu", "1" },
                        },
                        StartupCpuBoost = true,
                    },
                },
            },
            NodeSelector = new Gcp.CloudRunV2.Inputs.ServiceTemplateNodeSelectorArgs
            {
                Accelerator = "nvidia-l4",
            },
            GpuZonalRedundancyDisabled = true,
            Scaling = new Gcp.CloudRunV2.Inputs.ServiceTemplateScalingArgs
            {
                MaxInstanceCount = 1,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateNodeSelectorArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateScalingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .resources(ServiceTemplateContainerResourcesArgs.builder()
                        .limits(Map.ofEntries(
                            Map.entry("cpu", "4"),
                            Map.entry("memory", "16Gi"),
                            Map.entry("nvidia.com/gpu", "1")
                        ))
                        .startupCpuBoost(true)
                        .build())
                    .build())
                .nodeSelector(ServiceTemplateNodeSelectorArgs.builder()
                    .accelerator("nvidia-l4")
                    .build())
                .gpuZonalRedundancyDisabled(true)
                .scaling(ServiceTemplateScalingArgs.builder()
                    .maxInstanceCount(1)
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
            resources:
              limits:
                cpu: '4'
                memory: 16Gi
                nvidia.com/gpu: '1'
              startupCpuBoost: true
        nodeSelector:
          accelerator: nvidia-l4
        gpuZonalRedundancyDisabled: true
        scaling:
          maxInstanceCount: 1
Copy

Cloudrunv2 Service Probes

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
            startupProbe: {
                initialDelaySeconds: 0,
                timeoutSeconds: 1,
                periodSeconds: 3,
                failureThreshold: 1,
                tcpSocket: {
                    port: 8080,
                },
            },
            livenessProbe: {
                httpGet: {
                    path: "/",
                },
            },
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
            "startup_probe": {
                "initial_delay_seconds": 0,
                "timeout_seconds": 1,
                "period_seconds": 3,
                "failure_threshold": 1,
                "tcp_socket": {
                    "port": 8080,
                },
            },
            "liveness_probe": {
                "http_get": {
                    "path": "/",
                },
            },
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						StartupProbe: &cloudrunv2.ServiceTemplateContainerStartupProbeArgs{
							InitialDelaySeconds: pulumi.Int(0),
							TimeoutSeconds:      pulumi.Int(1),
							PeriodSeconds:       pulumi.Int(3),
							FailureThreshold:    pulumi.Int(1),
							TcpSocket: &cloudrunv2.ServiceTemplateContainerStartupProbeTcpSocketArgs{
								Port: pulumi.Int(8080),
							},
						},
						LivenessProbe: &cloudrunv2.ServiceTemplateContainerLivenessProbeArgs{
							HttpGet: &cloudrunv2.ServiceTemplateContainerLivenessProbeHttpGetArgs{
								Path: pulumi.String("/"),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    StartupProbe = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeArgs
                    {
                        InitialDelaySeconds = 0,
                        TimeoutSeconds = 1,
                        PeriodSeconds = 3,
                        FailureThreshold = 1,
                        TcpSocket = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeTcpSocketArgs
                        {
                            Port = 8080,
                        },
                    },
                    LivenessProbe = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerLivenessProbeArgs
                    {
                        HttpGet = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerLivenessProbeHttpGetArgs
                        {
                            Path = "/",
                        },
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .startupProbe(ServiceTemplateContainerStartupProbeArgs.builder()
                        .initialDelaySeconds(0)
                        .timeoutSeconds(1)
                        .periodSeconds(3)
                        .failureThreshold(1)
                        .tcpSocket(ServiceTemplateContainerStartupProbeTcpSocketArgs.builder()
                            .port(8080)
                            .build())
                        .build())
                    .livenessProbe(ServiceTemplateContainerLivenessProbeArgs.builder()
                        .httpGet(ServiceTemplateContainerLivenessProbeHttpGetArgs.builder()
                            .path("/")
                            .build())
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
            startupProbe:
              initialDelaySeconds: 0
              timeoutSeconds: 1
              periodSeconds: 3
              failureThreshold: 1
              tcpSocket:
                port: 8080
            livenessProbe:
              httpGet:
                path: /
Copy

Cloudrunv2 Service Secret

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const secret = new gcp.secretmanager.Secret("secret", {
    secretId: "secret-1",
    replication: {
        auto: {},
    },
});
const secret_version_data = new gcp.secretmanager.SecretVersion("secret-version-data", {
    secret: secret.name,
    secretData: "secret-data",
});
const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        volumes: [{
            name: "a-volume",
            secret: {
                secret: secret.secretId,
                defaultMode: 292,
                items: [{
                    version: "1",
                    path: "my-secret",
                }],
            },
        }],
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
            volumeMounts: [{
                name: "a-volume",
                mountPath: "/secrets",
            }],
        }],
    },
}, {
    dependsOn: [secret_version_data],
});
const project = gcp.organizations.getProject({});
const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
    secretId: secret.id,
    role: "roles/secretmanager.secretAccessor",
    member: project.then(project => `serviceAccount:${project.number}-compute@developer.gserviceaccount.com`),
}, {
    dependsOn: [secret],
});
Copy
import pulumi
import pulumi_gcp as gcp

secret = gcp.secretmanager.Secret("secret",
    secret_id="secret-1",
    replication={
        "auto": {},
    })
secret_version_data = gcp.secretmanager.SecretVersion("secret-version-data",
    secret=secret.name,
    secret_data="secret-data")
default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "volumes": [{
            "name": "a-volume",
            "secret": {
                "secret": secret.secret_id,
                "default_mode": 292,
                "items": [{
                    "version": "1",
                    "path": "my-secret",
                }],
            },
        }],
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
            "volume_mounts": [{
                "name": "a-volume",
                "mount_path": "/secrets",
            }],
        }],
    },
    opts = pulumi.ResourceOptions(depends_on=[secret_version_data]))
project = gcp.organizations.get_project()
secret_access = gcp.secretmanager.SecretIamMember("secret-access",
    secret_id=secret.id,
    role="roles/secretmanager.secretAccessor",
    member=f"serviceAccount:{project.number}-compute@developer.gserviceaccount.com",
    opts = pulumi.ResourceOptions(depends_on=[secret]))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		secret, err := secretmanager.NewSecret(ctx, "secret", &secretmanager.SecretArgs{
			SecretId: pulumi.String("secret-1"),
			Replication: &secretmanager.SecretReplicationArgs{
				Auto: &secretmanager.SecretReplicationAutoArgs{},
			},
		})
		if err != nil {
			return err
		}
		secret_version_data, err := secretmanager.NewSecretVersion(ctx, "secret-version-data", &secretmanager.SecretVersionArgs{
			Secret:     secret.Name,
			SecretData: pulumi.String("secret-data"),
		})
		if err != nil {
			return err
		}
		_, err = cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Volumes: cloudrunv2.ServiceTemplateVolumeArray{
					&cloudrunv2.ServiceTemplateVolumeArgs{
						Name: pulumi.String("a-volume"),
						Secret: &cloudrunv2.ServiceTemplateVolumeSecretArgs{
							Secret:      secret.SecretId,
							DefaultMode: pulumi.Int(292),
							Items: cloudrunv2.ServiceTemplateVolumeSecretItemArray{
								&cloudrunv2.ServiceTemplateVolumeSecretItemArgs{
									Version: pulumi.String("1"),
									Path:    pulumi.String("my-secret"),
								},
							},
						},
					},
				},
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						VolumeMounts: cloudrunv2.ServiceTemplateContainerVolumeMountArray{
							&cloudrunv2.ServiceTemplateContainerVolumeMountArgs{
								Name:      pulumi.String("a-volume"),
								MountPath: pulumi.String("/secrets"),
							},
						},
					},
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			secret_version_data,
		}))
		if err != nil {
			return err
		}
		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
			SecretId: secret.ID(),
			Role:     pulumi.String("roles/secretmanager.secretAccessor"),
			Member:   pulumi.Sprintf("serviceAccount:%v-compute@developer.gserviceaccount.com", project.Number),
		}, pulumi.DependsOn([]pulumi.Resource{
			secret,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var secret = new Gcp.SecretManager.Secret("secret", new()
    {
        SecretId = "secret-1",
        Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
        {
            Auto = null,
        },
    });

    var secret_version_data = new Gcp.SecretManager.SecretVersion("secret-version-data", new()
    {
        Secret = secret.Name,
        SecretData = "secret-data",
    });

    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Volumes = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeArgs
                {
                    Name = "a-volume",
                    Secret = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeSecretArgs
                    {
                        Secret = secret.SecretId,
                        DefaultMode = 292,
                        Items = new[]
                        {
                            new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeSecretItemArgs
                            {
                                Version = "1",
                                Path = "my-secret",
                            },
                        },
                    },
                },
            },
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    VolumeMounts = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerVolumeMountArgs
                        {
                            Name = "a-volume",
                            MountPath = "/secrets",
                        },
                    },
                },
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            secret_version_data,
        },
    });

    var project = Gcp.Organizations.GetProject.Invoke();

    var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
    {
        SecretId = secret.Id,
        Role = "roles/secretmanager.secretAccessor",
        Member = $"serviceAccount:{project.Apply(getProjectResult => getProjectResult.Number)}-compute@developer.gserviceaccount.com",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            secret,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var secret = new Secret("secret", SecretArgs.builder()
            .secretId("secret-1")
            .replication(SecretReplicationArgs.builder()
                .auto(SecretReplicationAutoArgs.builder()
                    .build())
                .build())
            .build());

        var secret_version_data = new SecretVersion("secret-version-data", SecretVersionArgs.builder()
            .secret(secret.name())
            .secretData("secret-data")
            .build());

        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .volumes(ServiceTemplateVolumeArgs.builder()
                    .name("a-volume")
                    .secret(ServiceTemplateVolumeSecretArgs.builder()
                        .secret(secret.secretId())
                        .defaultMode(292)
                        .items(ServiceTemplateVolumeSecretItemArgs.builder()
                            .version("1")
                            .path("my-secret")
                            .build())
                        .build())
                    .build())
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .volumeMounts(ServiceTemplateContainerVolumeMountArgs.builder()
                        .name("a-volume")
                        .mountPath("/secrets")
                        .build())
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(secret_version_data)
                .build());

        final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
            .build());

        var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
            .secretId(secret.id())
            .role("roles/secretmanager.secretAccessor")
            .member(String.format("serviceAccount:%s-compute@developer.gserviceaccount.com", project.number()))
            .build(), CustomResourceOptions.builder()
                .dependsOn(secret)
                .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        volumes:
          - name: a-volume
            secret:
              secret: ${secret.secretId}
              defaultMode: 292
              items:
                - version: '1'
                  path: my-secret
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
            volumeMounts:
              - name: a-volume
                mountPath: /secrets
    options:
      dependsOn:
        - ${["secret-version-data"]}
  secret:
    type: gcp:secretmanager:Secret
    properties:
      secretId: secret-1
      replication:
        auto: {}
  secret-version-data:
    type: gcp:secretmanager:SecretVersion
    properties:
      secret: ${secret.name}
      secretData: secret-data
  secret-access:
    type: gcp:secretmanager:SecretIamMember
    properties:
      secretId: ${secret.id}
      role: roles/secretmanager.secretAccessor
      member: serviceAccount:${project.number}-compute@developer.gserviceaccount.com
    options:
      dependsOn:
        - ${secret}
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
Copy

Cloudrunv2 Service Multicontainer

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        containers: [
            {
                name: "hello-1",
                ports: {
                    containerPort: 8080,
                },
                image: "us-docker.pkg.dev/cloudrun/container/hello",
                dependsOns: ["hello-2"],
                volumeMounts: [{
                    name: "empty-dir-volume",
                    mountPath: "/mnt",
                }],
            },
            {
                name: "hello-2",
                image: "us-docker.pkg.dev/cloudrun/container/hello",
                envs: [{
                    name: "PORT",
                    value: "8081",
                }],
                startupProbe: {
                    httpGet: {
                        port: 8081,
                    },
                },
            },
        ],
        volumes: [{
            name: "empty-dir-volume",
            emptyDir: {
                medium: "MEMORY",
                sizeLimit: "256Mi",
            },
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "containers": [
            {
                "name": "hello-1",
                "ports": {
                    "container_port": 8080,
                },
                "image": "us-docker.pkg.dev/cloudrun/container/hello",
                "depends_ons": ["hello-2"],
                "volume_mounts": [{
                    "name": "empty-dir-volume",
                    "mount_path": "/mnt",
                }],
            },
            {
                "name": "hello-2",
                "image": "us-docker.pkg.dev/cloudrun/container/hello",
                "envs": [{
                    "name": "PORT",
                    "value": "8081",
                }],
                "startup_probe": {
                    "http_get": {
                        "port": 8081,
                    },
                },
            },
        ],
        "volumes": [{
            "name": "empty-dir-volume",
            "empty_dir": {
                "medium": "MEMORY",
                "size_limit": "256Mi",
            },
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Name: pulumi.String("hello-1"),
						Ports: &cloudrunv2.ServiceTemplateContainerPortsArgs{
							ContainerPort: pulumi.Int(8080),
						},
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						DependsOns: pulumi.StringArray{
							pulumi.String("hello-2"),
						},
						VolumeMounts: cloudrunv2.ServiceTemplateContainerVolumeMountArray{
							&cloudrunv2.ServiceTemplateContainerVolumeMountArgs{
								Name:      pulumi.String("empty-dir-volume"),
								MountPath: pulumi.String("/mnt"),
							},
						},
					},
					&cloudrunv2.ServiceTemplateContainerArgs{
						Name:  pulumi.String("hello-2"),
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						Envs: cloudrunv2.ServiceTemplateContainerEnvArray{
							&cloudrunv2.ServiceTemplateContainerEnvArgs{
								Name:  pulumi.String("PORT"),
								Value: pulumi.String("8081"),
							},
						},
						StartupProbe: &cloudrunv2.ServiceTemplateContainerStartupProbeArgs{
							HttpGet: &cloudrunv2.ServiceTemplateContainerStartupProbeHttpGetArgs{
								Port: pulumi.Int(8081),
							},
						},
					},
				},
				Volumes: cloudrunv2.ServiceTemplateVolumeArray{
					&cloudrunv2.ServiceTemplateVolumeArgs{
						Name: pulumi.String("empty-dir-volume"),
						EmptyDir: &cloudrunv2.ServiceTemplateVolumeEmptyDirArgs{
							Medium:    pulumi.String("MEMORY"),
							SizeLimit: pulumi.String("256Mi"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Name = "hello-1",
                    Ports = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerPortsArgs
                    {
                        ContainerPort = 8080,
                    },
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    DependsOns = new[]
                    {
                        "hello-2",
                    },
                    VolumeMounts = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerVolumeMountArgs
                        {
                            Name = "empty-dir-volume",
                            MountPath = "/mnt",
                        },
                    },
                },
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Name = "hello-2",
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    Envs = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvArgs
                        {
                            Name = "PORT",
                            Value = "8081",
                        },
                    },
                    StartupProbe = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeArgs
                    {
                        HttpGet = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeHttpGetArgs
                        {
                            Port = 8081,
                        },
                    },
                },
            },
            Volumes = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeArgs
                {
                    Name = "empty-dir-volume",
                    EmptyDir = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeEmptyDirArgs
                    {
                        Medium = "MEMORY",
                        SizeLimit = "256Mi",
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .containers(                
                    ServiceTemplateContainerArgs.builder()
                        .name("hello-1")
                        .ports(ServiceTemplateContainerPortsArgs.builder()
                            .containerPort(8080)
                            .build())
                        .image("us-docker.pkg.dev/cloudrun/container/hello")
                        .dependsOns("hello-2")
                        .volumeMounts(ServiceTemplateContainerVolumeMountArgs.builder()
                            .name("empty-dir-volume")
                            .mountPath("/mnt")
                            .build())
                        .build(),
                    ServiceTemplateContainerArgs.builder()
                        .name("hello-2")
                        .image("us-docker.pkg.dev/cloudrun/container/hello")
                        .envs(ServiceTemplateContainerEnvArgs.builder()
                            .name("PORT")
                            .value("8081")
                            .build())
                        .startupProbe(ServiceTemplateContainerStartupProbeArgs.builder()
                            .httpGet(ServiceTemplateContainerStartupProbeHttpGetArgs.builder()
                                .port(8081)
                                .build())
                            .build())
                        .build())
                .volumes(ServiceTemplateVolumeArgs.builder()
                    .name("empty-dir-volume")
                    .emptyDir(ServiceTemplateVolumeEmptyDirArgs.builder()
                        .medium("MEMORY")
                        .sizeLimit("256Mi")
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        containers:
          - name: hello-1
            ports:
              containerPort: 8080
            image: us-docker.pkg.dev/cloudrun/container/hello
            dependsOns:
              - hello-2
            volumeMounts:
              - name: empty-dir-volume
                mountPath: /mnt
          - name: hello-2
            image: us-docker.pkg.dev/cloudrun/container/hello
            envs:
              - name: PORT
                value: '8081'
            startupProbe:
              httpGet:
                port: 8081
        volumes:
          - name: empty-dir-volume
            emptyDir:
              medium: MEMORY
              sizeLimit: 256Mi
Copy

Cloudrunv2 Service Mount Gcs

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultBucket = new gcp.storage.Bucket("default", {
    name: "cloudrun-service",
    location: "US",
});
const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    template: {
        executionEnvironment: "EXECUTION_ENVIRONMENT_GEN2",
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
            volumeMounts: [{
                name: "bucket",
                mountPath: "/var/www",
            }],
        }],
        volumes: [{
            name: "bucket",
            gcs: {
                bucket: defaultBucket.name,
                readOnly: false,
            },
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default_bucket = gcp.storage.Bucket("default",
    name="cloudrun-service",
    location="US")
default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    template={
        "execution_environment": "EXECUTION_ENVIRONMENT_GEN2",
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
            "volume_mounts": [{
                "name": "bucket",
                "mount_path": "/var/www",
            }],
        }],
        "volumes": [{
            "name": "bucket",
            "gcs": {
                "bucket": default_bucket.name,
                "read_only": False,
            },
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultBucket, err := storage.NewBucket(ctx, "default", &storage.BucketArgs{
			Name:     pulumi.String("cloudrun-service"),
			Location: pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		_, err = cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Template: &cloudrunv2.ServiceTemplateArgs{
				ExecutionEnvironment: pulumi.String("EXECUTION_ENVIRONMENT_GEN2"),
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						VolumeMounts: cloudrunv2.ServiceTemplateContainerVolumeMountArray{
							&cloudrunv2.ServiceTemplateContainerVolumeMountArgs{
								Name:      pulumi.String("bucket"),
								MountPath: pulumi.String("/var/www"),
							},
						},
					},
				},
				Volumes: cloudrunv2.ServiceTemplateVolumeArray{
					&cloudrunv2.ServiceTemplateVolumeArgs{
						Name: pulumi.String("bucket"),
						Gcs: &cloudrunv2.ServiceTemplateVolumeGcsArgs{
							Bucket:   defaultBucket.Name,
							ReadOnly: pulumi.Bool(false),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var defaultBucket = new Gcp.Storage.Bucket("default", new()
    {
        Name = "cloudrun-service",
        Location = "US",
    });

    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            ExecutionEnvironment = "EXECUTION_ENVIRONMENT_GEN2",
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    VolumeMounts = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerVolumeMountArgs
                        {
                            Name = "bucket",
                            MountPath = "/var/www",
                        },
                    },
                },
            },
            Volumes = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeArgs
                {
                    Name = "bucket",
                    Gcs = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeGcsArgs
                    {
                        Bucket = defaultBucket.Name,
                        ReadOnly = false,
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var defaultBucket = new Bucket("defaultBucket", BucketArgs.builder()
            .name("cloudrun-service")
            .location("US")
            .build());

        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .template(ServiceTemplateArgs.builder()
                .executionEnvironment("EXECUTION_ENVIRONMENT_GEN2")
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .volumeMounts(ServiceTemplateContainerVolumeMountArgs.builder()
                        .name("bucket")
                        .mountPath("/var/www")
                        .build())
                    .build())
                .volumes(ServiceTemplateVolumeArgs.builder()
                    .name("bucket")
                    .gcs(ServiceTemplateVolumeGcsArgs.builder()
                        .bucket(defaultBucket.name())
                        .readOnly(false)
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      template:
        executionEnvironment: EXECUTION_ENVIRONMENT_GEN2
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
            volumeMounts:
              - name: bucket
                mountPath: /var/www
        volumes:
          - name: bucket
            gcs:
              bucket: ${defaultBucket.name}
              readOnly: false
  defaultBucket:
    type: gcp:storage:Bucket
    name: default
    properties:
      name: cloudrun-service
      location: US
Copy

Cloudrunv2 Service Mount Nfs

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultInstance = new gcp.filestore.Instance("default", {
    name: "cloudrun-service",
    location: "us-central1-b",
    tier: "BASIC_HDD",
    fileShares: {
        capacityGb: 1024,
        name: "share1",
    },
    networks: [{
        network: "default",
        modes: ["MODE_IPV4"],
    }],
});
const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        executionEnvironment: "EXECUTION_ENVIRONMENT_GEN2",
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello:latest",
            volumeMounts: [{
                name: "nfs",
                mountPath: "/mnt/nfs/filestore",
            }],
        }],
        vpcAccess: {
            networkInterfaces: [{
                network: "default",
                subnetwork: "default",
            }],
        },
        volumes: [{
            name: "nfs",
            nfs: {
                server: defaultInstance.networks.apply(networks => networks[0].ipAddresses?.[0]),
                path: "/share1",
                readOnly: false,
            },
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default_instance = gcp.filestore.Instance("default",
    name="cloudrun-service",
    location="us-central1-b",
    tier="BASIC_HDD",
    file_shares={
        "capacity_gb": 1024,
        "name": "share1",
    },
    networks=[{
        "network": "default",
        "modes": ["MODE_IPV4"],
    }])
default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "execution_environment": "EXECUTION_ENVIRONMENT_GEN2",
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello:latest",
            "volume_mounts": [{
                "name": "nfs",
                "mount_path": "/mnt/nfs/filestore",
            }],
        }],
        "vpc_access": {
            "network_interfaces": [{
                "network": "default",
                "subnetwork": "default",
            }],
        },
        "volumes": [{
            "name": "nfs",
            "nfs": {
                "server": default_instance.networks[0].ip_addresses[0],
                "path": "/share1",
                "read_only": False,
            },
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/filestore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultInstance, err := filestore.NewInstance(ctx, "default", &filestore.InstanceArgs{
			Name:     pulumi.String("cloudrun-service"),
			Location: pulumi.String("us-central1-b"),
			Tier:     pulumi.String("BASIC_HDD"),
			FileShares: &filestore.InstanceFileSharesArgs{
				CapacityGb: pulumi.Int(1024),
				Name:       pulumi.String("share1"),
			},
			Networks: filestore.InstanceNetworkArray{
				&filestore.InstanceNetworkArgs{
					Network: pulumi.String("default"),
					Modes: pulumi.StringArray{
						pulumi.String("MODE_IPV4"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				ExecutionEnvironment: pulumi.String("EXECUTION_ENVIRONMENT_GEN2"),
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello:latest"),
						VolumeMounts: cloudrunv2.ServiceTemplateContainerVolumeMountArray{
							&cloudrunv2.ServiceTemplateContainerVolumeMountArgs{
								Name:      pulumi.String("nfs"),
								MountPath: pulumi.String("/mnt/nfs/filestore"),
							},
						},
					},
				},
				VpcAccess: &cloudrunv2.ServiceTemplateVpcAccessArgs{
					NetworkInterfaces: cloudrunv2.ServiceTemplateVpcAccessNetworkInterfaceArray{
						&cloudrunv2.ServiceTemplateVpcAccessNetworkInterfaceArgs{
							Network:    pulumi.String("default"),
							Subnetwork: pulumi.String("default"),
						},
					},
				},
				Volumes: cloudrunv2.ServiceTemplateVolumeArray{
					&cloudrunv2.ServiceTemplateVolumeArgs{
						Name: pulumi.String("nfs"),
						Nfs: &cloudrunv2.ServiceTemplateVolumeNfsArgs{
							Server: defaultInstance.Networks.ApplyT(func(networks []filestore.InstanceNetwork) (*string, error) {
								return &networks[0].IpAddresses[0], nil
							}).(pulumi.StringPtrOutput),
							Path:     pulumi.String("/share1"),
							ReadOnly: pulumi.Bool(false),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var defaultInstance = new Gcp.Filestore.Instance("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1-b",
        Tier = "BASIC_HDD",
        FileShares = new Gcp.Filestore.Inputs.InstanceFileSharesArgs
        {
            CapacityGb = 1024,
            Name = "share1",
        },
        Networks = new[]
        {
            new Gcp.Filestore.Inputs.InstanceNetworkArgs
            {
                Network = "default",
                Modes = new[]
                {
                    "MODE_IPV4",
                },
            },
        },
    });

    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            ExecutionEnvironment = "EXECUTION_ENVIRONMENT_GEN2",
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello:latest",
                    VolumeMounts = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerVolumeMountArgs
                        {
                            Name = "nfs",
                            MountPath = "/mnt/nfs/filestore",
                        },
                    },
                },
            },
            VpcAccess = new Gcp.CloudRunV2.Inputs.ServiceTemplateVpcAccessArgs
            {
                NetworkInterfaces = new[]
                {
                    new Gcp.CloudRunV2.Inputs.ServiceTemplateVpcAccessNetworkInterfaceArgs
                    {
                        Network = "default",
                        Subnetwork = "default",
                    },
                },
            },
            Volumes = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeArgs
                {
                    Name = "nfs",
                    Nfs = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeNfsArgs
                    {
                        Server = defaultInstance.Networks.Apply(networks => networks[0].IpAddresses[0]),
                        Path = "/share1",
                        ReadOnly = false,
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.filestore.Instance;
import com.pulumi.gcp.filestore.InstanceArgs;
import com.pulumi.gcp.filestore.inputs.InstanceFileSharesArgs;
import com.pulumi.gcp.filestore.inputs.InstanceNetworkArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateVpcAccessArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1-b")
            .tier("BASIC_HDD")
            .fileShares(InstanceFileSharesArgs.builder()
                .capacityGb(1024)
                .name("share1")
                .build())
            .networks(InstanceNetworkArgs.builder()
                .network("default")
                .modes("MODE_IPV4")
                .build())
            .build());

        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .executionEnvironment("EXECUTION_ENVIRONMENT_GEN2")
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello:latest")
                    .volumeMounts(ServiceTemplateContainerVolumeMountArgs.builder()
                        .name("nfs")
                        .mountPath("/mnt/nfs/filestore")
                        .build())
                    .build())
                .vpcAccess(ServiceTemplateVpcAccessArgs.builder()
                    .networkInterfaces(ServiceTemplateVpcAccessNetworkInterfaceArgs.builder()
                        .network("default")
                        .subnetwork("default")
                        .build())
                    .build())
                .volumes(ServiceTemplateVolumeArgs.builder()
                    .name("nfs")
                    .nfs(ServiceTemplateVolumeNfsArgs.builder()
                        .server(defaultInstance.networks().applyValue(_networks -> _networks[0].ipAddresses()[0]))
                        .path("/share1")
                        .readOnly(false)
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        executionEnvironment: EXECUTION_ENVIRONMENT_GEN2
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello:latest
            volumeMounts:
              - name: nfs
                mountPath: /mnt/nfs/filestore
        vpcAccess:
          networkInterfaces:
            - network: default
              subnetwork: default
        volumes:
          - name: nfs
            nfs:
              server: ${defaultInstance.networks[0].ipAddresses[0]}
              path: /share1
              readOnly: false
  defaultInstance:
    type: gcp:filestore:Instance
    name: default
    properties:
      name: cloudrun-service
      location: us-central1-b
      tier: BASIC_HDD
      fileShares:
        capacityGb: 1024
        name: share1
      networks:
        - network: default
          modes:
            - MODE_IPV4
Copy

Cloudrunv2 Service Mesh

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumi/time";

const mesh = new gcp.networkservices.Mesh("mesh", {name: "network-services-mesh"});
const waitForMesh = new time.index.Sleep("wait_for_mesh", {createDuration: "1m"}, {
    dependsOn: [mesh],
});
const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    deletionProtection: false,
    location: "us-central1",
    launchStage: "BETA",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
        }],
        serviceMesh: {
            mesh: mesh.id,
        },
    },
}, {
    dependsOn: [waitForMesh],
});
Copy
import pulumi
import pulumi_gcp as gcp
import pulumi_time as time

mesh = gcp.networkservices.Mesh("mesh", name="network-services-mesh")
wait_for_mesh = time.index.Sleep("wait_for_mesh", create_duration=1m,
opts = pulumi.ResourceOptions(depends_on=[mesh]))
default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    deletion_protection=False,
    location="us-central1",
    launch_stage="BETA",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
        }],
        "service_mesh": {
            "mesh": mesh.id,
        },
    },
    opts = pulumi.ResourceOptions(depends_on=[wait_for_mesh]))
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkservices"
	"github.com/pulumi/pulumi-time/sdk/go/time"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mesh, err := networkservices.NewMesh(ctx, "mesh", &networkservices.MeshArgs{
			Name: pulumi.String("network-services-mesh"),
		})
		if err != nil {
			return err
		}
		waitForMesh, err := time.NewSleep(ctx, "wait_for_mesh", &time.SleepArgs{
			CreateDuration: "1m",
		}, pulumi.DependsOn([]pulumi.Resource{
			mesh,
		}))
		if err != nil {
			return err
		}
		_, err = cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			DeletionProtection: pulumi.Bool(false),
			Location:           pulumi.String("us-central1"),
			LaunchStage:        pulumi.String("BETA"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
					},
				},
				ServiceMesh: &cloudrunv2.ServiceTemplateServiceMeshArgs{
					Mesh: mesh.ID(),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			waitForMesh,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumi.Time;

return await Deployment.RunAsync(() => 
{
    var mesh = new Gcp.NetworkServices.Mesh("mesh", new()
    {
        Name = "network-services-mesh",
    });

    var waitForMesh = new Time.Index.Sleep("wait_for_mesh", new()
    {
        CreateDuration = "1m",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            mesh,
        },
    });

    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        DeletionProtection = false,
        Location = "us-central1",
        LaunchStage = "BETA",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                },
            },
            ServiceMesh = new Gcp.CloudRunV2.Inputs.ServiceTemplateServiceMeshArgs
            {
                Mesh = mesh.Id,
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            waitForMesh,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.Mesh;
import com.pulumi.gcp.networkservices.MeshArgs;
import com.pulumi.time.sleep;
import com.pulumi.time.sleepArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateServiceMeshArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var mesh = new Mesh("mesh", MeshArgs.builder()
            .name("network-services-mesh")
            .build());

        var waitForMesh = new Sleep("waitForMesh", SleepArgs.builder()
            .createDuration("1m")
            .build(), CustomResourceOptions.builder()
                .dependsOn(List.of(mesh))
                .build());

        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .deletionProtection(false)
            .location("us-central1")
            .launchStage("BETA")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .build())
                .serviceMesh(ServiceTemplateServiceMeshArgs.builder()
                    .mesh(mesh.id())
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(waitForMesh)
                .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      deletionProtection: false
      location: us-central1
      launchStage: BETA
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
        serviceMesh:
          mesh: ${mesh.id}
    options:
      dependsOn:
        - ${waitForMesh}
  waitForMesh:
    type: time:sleep
    name: wait_for_mesh
    properties:
      createDuration: 1m
    options:
      dependsOn:
        - ${mesh}
  mesh:
    type: gcp:networkservices:Mesh
    properties:
      name: network-services-mesh
Copy

Cloudrunv2 Service Invokeriam

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    invokerIamDisabled: true,
    description: "The serving URL of this service will not perform any IAM check when invoked",
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    invoker_iam_disabled=True,
    description="The serving URL of this service will not perform any IAM check when invoked",
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			InvokerIamDisabled: pulumi.Bool(true),
			Description:        pulumi.String("The serving URL of this service will not perform any IAM check when invoked"),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        InvokerIamDisabled = true,
        Description = "The serving URL of this service will not perform any IAM check when invoked",
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .invokerIamDisabled(true)
            .description("The serving URL of this service will not perform any IAM check when invoked")
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      invokerIamDisabled: true
      description: The serving URL of this service will not perform any IAM check when invoked
      ingress: INGRESS_TRAFFIC_ALL
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
Copy

Cloudrunv2 Service Function

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const project = gcp.organizations.getProject({});
const bucket = new gcp.storage.Bucket("bucket", {
    name: project.then(project => `${project.projectId}-gcf-source`),
    location: "US",
    uniformBucketLevelAccess: true,
});
const object = new gcp.storage.BucketObject("object", {
    name: "function-source.zip",
    bucket: bucket.name,
    source: new pulumi.asset.FileAsset("function_source.zip"),
});
const cloudbuildServiceAccount = new gcp.serviceaccount.Account("cloudbuild_service_account", {accountId: "build-sa"});
const actAs = new gcp.projects.IAMMember("act_as", {
    project: project.then(project => project.projectId),
    role: "roles/iam.serviceAccountUser",
    member: pulumi.interpolate`serviceAccount:${cloudbuildServiceAccount.email}`,
});
const logsWriter = new gcp.projects.IAMMember("logs_writer", {
    project: project.then(project => project.projectId),
    role: "roles/logging.logWriter",
    member: pulumi.interpolate`serviceAccount:${cloudbuildServiceAccount.email}`,
});
const _default = new gcp.cloudrunv2.Service("default", {
    name: "cloudrun-service",
    location: "us-central1",
    deletionProtection: false,
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
            baseImageUri: "us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22",
        }],
    },
    buildConfig: {
        sourceLocation: pulumi.interpolate`gs://${bucket.name}/${object.name}`,
        functionTarget: "helloHttp",
        imageUri: "us-docker.pkg.dev/cloudrun/container/hello",
        baseImage: "us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22",
        enableAutomaticUpdates: true,
        workerPool: "worker-pool",
        environmentVariables: {
            FOO_KEY: "FOO_VALUE",
            BAR_KEY: "BAR_VALUE",
        },
        serviceAccount: cloudbuildServiceAccount.id,
    },
}, {
    dependsOn: [
        actAs,
        logsWriter,
    ],
});
Copy
import pulumi
import pulumi_gcp as gcp

project = gcp.organizations.get_project()
bucket = gcp.storage.Bucket("bucket",
    name=f"{project.project_id}-gcf-source",
    location="US",
    uniform_bucket_level_access=True)
object = gcp.storage.BucketObject("object",
    name="function-source.zip",
    bucket=bucket.name,
    source=pulumi.FileAsset("function_source.zip"))
cloudbuild_service_account = gcp.serviceaccount.Account("cloudbuild_service_account", account_id="build-sa")
act_as = gcp.projects.IAMMember("act_as",
    project=project.project_id,
    role="roles/iam.serviceAccountUser",
    member=cloudbuild_service_account.email.apply(lambda email: f"serviceAccount:{email}"))
logs_writer = gcp.projects.IAMMember("logs_writer",
    project=project.project_id,
    role="roles/logging.logWriter",
    member=cloudbuild_service_account.email.apply(lambda email: f"serviceAccount:{email}"))
default = gcp.cloudrunv2.Service("default",
    name="cloudrun-service",
    location="us-central1",
    deletion_protection=False,
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
            "base_image_uri": "us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22",
        }],
    },
    build_config={
        "source_location": pulumi.Output.all(
            bucketName=bucket.name,
            objectName=object.name
).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucketName']}/{resolved_outputs['objectName']}")
,
        "function_target": "helloHttp",
        "image_uri": "us-docker.pkg.dev/cloudrun/container/hello",
        "base_image": "us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22",
        "enable_automatic_updates": True,
        "worker_pool": "worker-pool",
        "environment_variables": {
            "FOO_KEY": "FOO_VALUE",
            "BAR_KEY": "BAR_VALUE",
        },
        "service_account": cloudbuild_service_account.id,
    },
    opts = pulumi.ResourceOptions(depends_on=[
            act_as,
            logs_writer,
        ]))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
			Name:                     pulumi.Sprintf("%v-gcf-source", project.ProjectId),
			Location:                 pulumi.String("US"),
			UniformBucketLevelAccess: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		object, err := storage.NewBucketObject(ctx, "object", &storage.BucketObjectArgs{
			Name:   pulumi.String("function-source.zip"),
			Bucket: bucket.Name,
			Source: pulumi.NewFileAsset("function_source.zip"),
		})
		if err != nil {
			return err
		}
		cloudbuildServiceAccount, err := serviceaccount.NewAccount(ctx, "cloudbuild_service_account", &serviceaccount.AccountArgs{
			AccountId: pulumi.String("build-sa"),
		})
		if err != nil {
			return err
		}
		actAs, err := projects.NewIAMMember(ctx, "act_as", &projects.IAMMemberArgs{
			Project: pulumi.String(project.ProjectId),
			Role:    pulumi.String("roles/iam.serviceAccountUser"),
			Member: cloudbuildServiceAccount.Email.ApplyT(func(email string) (string, error) {
				return fmt.Sprintf("serviceAccount:%v", email), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		logsWriter, err := projects.NewIAMMember(ctx, "logs_writer", &projects.IAMMemberArgs{
			Project: pulumi.String(project.ProjectId),
			Role:    pulumi.String("roles/logging.logWriter"),
			Member: cloudbuildServiceAccount.Email.ApplyT(func(email string) (string, error) {
				return fmt.Sprintf("serviceAccount:%v", email), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		_, err = cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Name:               pulumi.String("cloudrun-service"),
			Location:           pulumi.String("us-central1"),
			DeletionProtection: pulumi.Bool(false),
			Ingress:            pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image:        pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
						BaseImageUri: pulumi.String("us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22"),
					},
				},
			},
			BuildConfig: &cloudrunv2.ServiceBuildConfigArgs{
				SourceLocation: pulumi.All(bucket.Name, object.Name).ApplyT(func(_args []interface{}) (string, error) {
					bucketName := _args[0].(string)
					objectName := _args[1].(string)
					return fmt.Sprintf("gs://%v/%v", bucketName, objectName), nil
				}).(pulumi.StringOutput),
				FunctionTarget:         pulumi.String("helloHttp"),
				ImageUri:               pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
				BaseImage:              pulumi.String("us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22"),
				EnableAutomaticUpdates: pulumi.Bool(true),
				WorkerPool:             pulumi.String("worker-pool"),
				EnvironmentVariables: pulumi.StringMap{
					"FOO_KEY": pulumi.String("FOO_VALUE"),
					"BAR_KEY": pulumi.String("BAR_VALUE"),
				},
				ServiceAccount: cloudbuildServiceAccount.ID(),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			actAs,
			logsWriter,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var project = Gcp.Organizations.GetProject.Invoke();

    var bucket = new Gcp.Storage.Bucket("bucket", new()
    {
        Name = $"{project.Apply(getProjectResult => getProjectResult.ProjectId)}-gcf-source",
        Location = "US",
        UniformBucketLevelAccess = true,
    });

    var @object = new Gcp.Storage.BucketObject("object", new()
    {
        Name = "function-source.zip",
        Bucket = bucket.Name,
        Source = new FileAsset("function_source.zip"),
    });

    var cloudbuildServiceAccount = new Gcp.ServiceAccount.Account("cloudbuild_service_account", new()
    {
        AccountId = "build-sa",
    });

    var actAs = new Gcp.Projects.IAMMember("act_as", new()
    {
        Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
        Role = "roles/iam.serviceAccountUser",
        Member = cloudbuildServiceAccount.Email.Apply(email => $"serviceAccount:{email}"),
    });

    var logsWriter = new Gcp.Projects.IAMMember("logs_writer", new()
    {
        Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
        Role = "roles/logging.logWriter",
        Member = cloudbuildServiceAccount.Email.Apply(email => $"serviceAccount:{email}"),
    });

    var @default = new Gcp.CloudRunV2.Service("default", new()
    {
        Name = "cloudrun-service",
        Location = "us-central1",
        DeletionProtection = false,
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                    BaseImageUri = "us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22",
                },
            },
        },
        BuildConfig = new Gcp.CloudRunV2.Inputs.ServiceBuildConfigArgs
        {
            SourceLocation = Output.Tuple(bucket.Name, @object.Name).Apply(values =>
            {
                var bucketName = values.Item1;
                var objectName = values.Item2;
                return $"gs://{bucketName}/{objectName}";
            }),
            FunctionTarget = "helloHttp",
            ImageUri = "us-docker.pkg.dev/cloudrun/container/hello",
            BaseImage = "us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22",
            EnableAutomaticUpdates = true,
            WorkerPool = "worker-pool",
            EnvironmentVariables = 
            {
                { "FOO_KEY", "FOO_VALUE" },
                { "BAR_KEY", "BAR_VALUE" },
            },
            ServiceAccount = cloudbuildServiceAccount.Id,
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            actAs,
            logsWriter,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.serviceaccount.Account;
import com.pulumi.gcp.serviceaccount.AccountArgs;
import com.pulumi.gcp.projects.IAMMember;
import com.pulumi.gcp.projects.IAMMemberArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceBuildConfigArgs;
import com.pulumi.asset.FileAsset;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
            .build());

        var bucket = new Bucket("bucket", BucketArgs.builder()
            .name(String.format("%s-gcf-source", project.projectId()))
            .location("US")
            .uniformBucketLevelAccess(true)
            .build());

        var object = new BucketObject("object", BucketObjectArgs.builder()
            .name("function-source.zip")
            .bucket(bucket.name())
            .source(new FileAsset("function_source.zip"))
            .build());

        var cloudbuildServiceAccount = new Account("cloudbuildServiceAccount", AccountArgs.builder()
            .accountId("build-sa")
            .build());

        var actAs = new IAMMember("actAs", IAMMemberArgs.builder()
            .project(project.projectId())
            .role("roles/iam.serviceAccountUser")
            .member(cloudbuildServiceAccount.email().applyValue(_email -> String.format("serviceAccount:%s", _email)))
            .build());

        var logsWriter = new IAMMember("logsWriter", IAMMemberArgs.builder()
            .project(project.projectId())
            .role("roles/logging.logWriter")
            .member(cloudbuildServiceAccount.email().applyValue(_email -> String.format("serviceAccount:%s", _email)))
            .build());

        var default_ = new Service("default", ServiceArgs.builder()
            .name("cloudrun-service")
            .location("us-central1")
            .deletionProtection(false)
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .baseImageUri("us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22")
                    .build())
                .build())
            .buildConfig(ServiceBuildConfigArgs.builder()
                .sourceLocation(Output.tuple(bucket.name(), object.name()).applyValue(values -> {
                    var bucketName = values.t1;
                    var objectName = values.t2;
                    return String.format("gs://%s/%s", bucketName,objectName);
                }))
                .functionTarget("helloHttp")
                .imageUri("us-docker.pkg.dev/cloudrun/container/hello")
                .baseImage("us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22")
                .enableAutomaticUpdates(true)
                .workerPool("worker-pool")
                .environmentVariables(Map.ofEntries(
                    Map.entry("FOO_KEY", "FOO_VALUE"),
                    Map.entry("BAR_KEY", "BAR_VALUE")
                ))
                .serviceAccount(cloudbuildServiceAccount.id())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(                
                    actAs,
                    logsWriter)
                .build());

    }
}
Copy
resources:
  default:
    type: gcp:cloudrunv2:Service
    properties:
      name: cloudrun-service
      location: us-central1
      deletionProtection: false
      ingress: INGRESS_TRAFFIC_ALL
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
            baseImageUri: us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22
      buildConfig:
        sourceLocation: gs://${bucket.name}/${object.name}
        functionTarget: helloHttp
        imageUri: us-docker.pkg.dev/cloudrun/container/hello
        baseImage: us-central1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/nodejs22
        enableAutomaticUpdates: true
        workerPool: worker-pool
        environmentVariables:
          FOO_KEY: FOO_VALUE
          BAR_KEY: BAR_VALUE
        serviceAccount: ${cloudbuildServiceAccount.id}
    options:
      dependsOn:
        - ${actAs}
        - ${logsWriter}
  bucket:
    type: gcp:storage:Bucket
    properties:
      name: ${project.projectId}-gcf-source
      location: US
      uniformBucketLevelAccess: true
  object:
    type: gcp:storage:BucketObject
    properties:
      name: function-source.zip
      bucket: ${bucket.name}
      source:
        fn::FileAsset: function_source.zip
  cloudbuildServiceAccount:
    type: gcp:serviceaccount:Account
    name: cloudbuild_service_account
    properties:
      accountId: build-sa
  actAs:
    type: gcp:projects:IAMMember
    name: act_as
    properties:
      project: ${project.projectId}
      role: roles/iam.serviceAccountUser
      member: serviceAccount:${cloudbuildServiceAccount.email}
  logsWriter:
    type: gcp:projects:IAMMember
    name: logs_writer
    properties:
      project: ${project.projectId}
      role: roles/logging.logWriter
      member: serviceAccount:${cloudbuildServiceAccount.email}
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
Copy

Create Service Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);
@overload
def Service(resource_name: str,
            args: ServiceArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Service(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            location: Optional[str] = None,
            template: Optional[ServiceTemplateArgs] = None,
            description: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            client_version: Optional[str] = None,
            custom_audiences: Optional[Sequence[str]] = None,
            default_uri_disabled: Optional[bool] = None,
            deletion_protection: Optional[bool] = None,
            annotations: Optional[Mapping[str, str]] = None,
            ingress: Optional[str] = None,
            invoker_iam_disabled: Optional[bool] = None,
            client: Optional[str] = None,
            launch_stage: Optional[str] = None,
            build_config: Optional[ServiceBuildConfigArgs] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            scaling: Optional[ServiceScalingArgs] = None,
            binary_authorization: Optional[ServiceBinaryAuthorizationArgs] = None,
            traffics: Optional[Sequence[ServiceTrafficArgs]] = None)
func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)
public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)
public Service(String name, ServiceArgs args)
public Service(String name, ServiceArgs args, CustomResourceOptions options)
type: gcp:cloudrunv2:Service
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var exampleserviceResourceResourceFromCloudrunv2service = new Gcp.CloudRunV2.Service("exampleserviceResourceResourceFromCloudrunv2service", new()
{
    Location = "string",
    Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
    {
        Annotations = 
        {
            { "string", "string" },
        },
        Containers = new[]
        {
            new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
            {
                Image = "string",
                Commands = new[]
                {
                    "string",
                },
                BuildInfos = new[]
                {
                    new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerBuildInfoArgs
                    {
                        FunctionTarget = "string",
                        SourceLocation = "string",
                    },
                },
                Args = new[]
                {
                    "string",
                },
                DependsOns = new[]
                {
                    "string",
                },
                Envs = new[]
                {
                    new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvArgs
                    {
                        Name = "string",
                        Value = "string",
                        ValueSource = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvValueSourceArgs
                        {
                            SecretKeyRef = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerEnvValueSourceSecretKeyRefArgs
                            {
                                Secret = "string",
                                Version = "string",
                            },
                        },
                    },
                },
                BaseImageUri = "string",
                LivenessProbe = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerLivenessProbeArgs
                {
                    FailureThreshold = 0,
                    Grpc = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerLivenessProbeGrpcArgs
                    {
                        Port = 0,
                        Service = "string",
                    },
                    HttpGet = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerLivenessProbeHttpGetArgs
                    {
                        HttpHeaders = new[]
                        {
                            new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerLivenessProbeHttpGetHttpHeaderArgs
                            {
                                Name = "string",
                                Value = "string",
                            },
                        },
                        Path = "string",
                        Port = 0,
                    },
                    InitialDelaySeconds = 0,
                    PeriodSeconds = 0,
                    TcpSocket = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerLivenessProbeTcpSocketArgs
                    {
                        Port = 0,
                    },
                    TimeoutSeconds = 0,
                },
                Name = "string",
                Ports = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerPortsArgs
                {
                    ContainerPort = 0,
                    Name = "string",
                },
                Resources = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerResourcesArgs
                {
                    CpuIdle = false,
                    Limits = 
                    {
                        { "string", "string" },
                    },
                    StartupCpuBoost = false,
                },
                StartupProbe = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeArgs
                {
                    FailureThreshold = 0,
                    Grpc = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeGrpcArgs
                    {
                        Port = 0,
                        Service = "string",
                    },
                    HttpGet = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeHttpGetArgs
                    {
                        HttpHeaders = new[]
                        {
                            new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeHttpGetHttpHeaderArgs
                            {
                                Name = "string",
                                Value = "string",
                            },
                        },
                        Path = "string",
                        Port = 0,
                    },
                    InitialDelaySeconds = 0,
                    PeriodSeconds = 0,
                    TcpSocket = new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerStartupProbeTcpSocketArgs
                    {
                        Port = 0,
                    },
                    TimeoutSeconds = 0,
                },
                VolumeMounts = new[]
                {
                    new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerVolumeMountArgs
                    {
                        MountPath = "string",
                        Name = "string",
                    },
                },
                WorkingDir = "string",
            },
        },
        EncryptionKey = "string",
        ExecutionEnvironment = "string",
        GpuZonalRedundancyDisabled = false,
        Labels = 
        {
            { "string", "string" },
        },
        MaxInstanceRequestConcurrency = 0,
        NodeSelector = new Gcp.CloudRunV2.Inputs.ServiceTemplateNodeSelectorArgs
        {
            Accelerator = "string",
        },
        Revision = "string",
        Scaling = new Gcp.CloudRunV2.Inputs.ServiceTemplateScalingArgs
        {
            MaxInstanceCount = 0,
            MinInstanceCount = 0,
        },
        ServiceAccount = "string",
        ServiceMesh = new Gcp.CloudRunV2.Inputs.ServiceTemplateServiceMeshArgs
        {
            Mesh = "string",
        },
        SessionAffinity = false,
        Timeout = "string",
        Volumes = new[]
        {
            new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeArgs
            {
                Name = "string",
                CloudSqlInstance = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeCloudSqlInstanceArgs
                {
                    Instances = new[]
                    {
                        "string",
                    },
                },
                EmptyDir = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeEmptyDirArgs
                {
                    Medium = "string",
                    SizeLimit = "string",
                },
                Gcs = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeGcsArgs
                {
                    Bucket = "string",
                    MountOptions = new[]
                    {
                        "string",
                    },
                    ReadOnly = false,
                },
                Nfs = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeNfsArgs
                {
                    Path = "string",
                    Server = "string",
                    ReadOnly = false,
                },
                Secret = new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeSecretArgs
                {
                    Secret = "string",
                    DefaultMode = 0,
                    Items = new[]
                    {
                        new Gcp.CloudRunV2.Inputs.ServiceTemplateVolumeSecretItemArgs
                        {
                            Path = "string",
                            Mode = 0,
                            Version = "string",
                        },
                    },
                },
            },
        },
        VpcAccess = new Gcp.CloudRunV2.Inputs.ServiceTemplateVpcAccessArgs
        {
            Connector = "string",
            Egress = "string",
            NetworkInterfaces = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateVpcAccessNetworkInterfaceArgs
                {
                    Network = "string",
                    Subnetwork = "string",
                    Tags = new[]
                    {
                        "string",
                    },
                },
            },
        },
    },
    Description = "string",
    Labels = 
    {
        { "string", "string" },
    },
    ClientVersion = "string",
    CustomAudiences = new[]
    {
        "string",
    },
    DefaultUriDisabled = false,
    DeletionProtection = false,
    Annotations = 
    {
        { "string", "string" },
    },
    Ingress = "string",
    InvokerIamDisabled = false,
    Client = "string",
    LaunchStage = "string",
    BuildConfig = new Gcp.CloudRunV2.Inputs.ServiceBuildConfigArgs
    {
        BaseImage = "string",
        EnableAutomaticUpdates = false,
        EnvironmentVariables = 
        {
            { "string", "string" },
        },
        FunctionTarget = "string",
        ImageUri = "string",
        Name = "string",
        ServiceAccount = "string",
        SourceLocation = "string",
        WorkerPool = "string",
    },
    Name = "string",
    Project = "string",
    Scaling = new Gcp.CloudRunV2.Inputs.ServiceScalingArgs
    {
        MinInstanceCount = 0,
    },
    BinaryAuthorization = new Gcp.CloudRunV2.Inputs.ServiceBinaryAuthorizationArgs
    {
        BreakglassJustification = "string",
        Policy = "string",
        UseDefault = false,
    },
    Traffics = new[]
    {
        new Gcp.CloudRunV2.Inputs.ServiceTrafficArgs
        {
            Percent = 0,
            Revision = "string",
            Tag = "string",
            Type = "string",
        },
    },
});
Copy
example, err := cloudrunv2.NewService(ctx, "exampleserviceResourceResourceFromCloudrunv2service", &cloudrunv2.ServiceArgs{
	Location: pulumi.String("string"),
	Template: &cloudrunv2.ServiceTemplateArgs{
		Annotations: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		Containers: cloudrunv2.ServiceTemplateContainerArray{
			&cloudrunv2.ServiceTemplateContainerArgs{
				Image: pulumi.String("string"),
				Commands: pulumi.StringArray{
					pulumi.String("string"),
				},
				BuildInfos: cloudrunv2.ServiceTemplateContainerBuildInfoArray{
					&cloudrunv2.ServiceTemplateContainerBuildInfoArgs{
						FunctionTarget: pulumi.String("string"),
						SourceLocation: pulumi.String("string"),
					},
				},
				Args: pulumi.StringArray{
					pulumi.String("string"),
				},
				DependsOns: pulumi.StringArray{
					pulumi.String("string"),
				},
				Envs: cloudrunv2.ServiceTemplateContainerEnvArray{
					&cloudrunv2.ServiceTemplateContainerEnvArgs{
						Name:  pulumi.String("string"),
						Value: pulumi.String("string"),
						ValueSource: &cloudrunv2.ServiceTemplateContainerEnvValueSourceArgs{
							SecretKeyRef: &cloudrunv2.ServiceTemplateContainerEnvValueSourceSecretKeyRefArgs{
								Secret:  pulumi.String("string"),
								Version: pulumi.String("string"),
							},
						},
					},
				},
				BaseImageUri: pulumi.String("string"),
				LivenessProbe: &cloudrunv2.ServiceTemplateContainerLivenessProbeArgs{
					FailureThreshold: pulumi.Int(0),
					Grpc: &cloudrunv2.ServiceTemplateContainerLivenessProbeGrpcArgs{
						Port:    pulumi.Int(0),
						Service: pulumi.String("string"),
					},
					HttpGet: &cloudrunv2.ServiceTemplateContainerLivenessProbeHttpGetArgs{
						HttpHeaders: cloudrunv2.ServiceTemplateContainerLivenessProbeHttpGetHttpHeaderArray{
							&cloudrunv2.ServiceTemplateContainerLivenessProbeHttpGetHttpHeaderArgs{
								Name:  pulumi.String("string"),
								Value: pulumi.String("string"),
							},
						},
						Path: pulumi.String("string"),
						Port: pulumi.Int(0),
					},
					InitialDelaySeconds: pulumi.Int(0),
					PeriodSeconds:       pulumi.Int(0),
					TcpSocket: &cloudrunv2.ServiceTemplateContainerLivenessProbeTcpSocketArgs{
						Port: pulumi.Int(0),
					},
					TimeoutSeconds: pulumi.Int(0),
				},
				Name: pulumi.String("string"),
				Ports: &cloudrunv2.ServiceTemplateContainerPortsArgs{
					ContainerPort: pulumi.Int(0),
					Name:          pulumi.String("string"),
				},
				Resources: &cloudrunv2.ServiceTemplateContainerResourcesArgs{
					CpuIdle: pulumi.Bool(false),
					Limits: pulumi.StringMap{
						"string": pulumi.String("string"),
					},
					StartupCpuBoost: pulumi.Bool(false),
				},
				StartupProbe: &cloudrunv2.ServiceTemplateContainerStartupProbeArgs{
					FailureThreshold: pulumi.Int(0),
					Grpc: &cloudrunv2.ServiceTemplateContainerStartupProbeGrpcArgs{
						Port:    pulumi.Int(0),
						Service: pulumi.String("string"),
					},
					HttpGet: &cloudrunv2.ServiceTemplateContainerStartupProbeHttpGetArgs{
						HttpHeaders: cloudrunv2.ServiceTemplateContainerStartupProbeHttpGetHttpHeaderArray{
							&cloudrunv2.ServiceTemplateContainerStartupProbeHttpGetHttpHeaderArgs{
								Name:  pulumi.String("string"),
								Value: pulumi.String("string"),
							},
						},
						Path: pulumi.String("string"),
						Port: pulumi.Int(0),
					},
					InitialDelaySeconds: pulumi.Int(0),
					PeriodSeconds:       pulumi.Int(0),
					TcpSocket: &cloudrunv2.ServiceTemplateContainerStartupProbeTcpSocketArgs{
						Port: pulumi.Int(0),
					},
					TimeoutSeconds: pulumi.Int(0),
				},
				VolumeMounts: cloudrunv2.ServiceTemplateContainerVolumeMountArray{
					&cloudrunv2.ServiceTemplateContainerVolumeMountArgs{
						MountPath: pulumi.String("string"),
						Name:      pulumi.String("string"),
					},
				},
				WorkingDir: pulumi.String("string"),
			},
		},
		EncryptionKey:              pulumi.String("string"),
		ExecutionEnvironment:       pulumi.String("string"),
		GpuZonalRedundancyDisabled: pulumi.Bool(false),
		Labels: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		MaxInstanceRequestConcurrency: pulumi.Int(0),
		NodeSelector: &cloudrunv2.ServiceTemplateNodeSelectorArgs{
			Accelerator: pulumi.String("string"),
		},
		Revision: pulumi.String("string"),
		Scaling: &cloudrunv2.ServiceTemplateScalingArgs{
			MaxInstanceCount: pulumi.Int(0),
			MinInstanceCount: pulumi.Int(0),
		},
		ServiceAccount: pulumi.String("string"),
		ServiceMesh: &cloudrunv2.ServiceTemplateServiceMeshArgs{
			Mesh: pulumi.String("string"),
		},
		SessionAffinity: pulumi.Bool(false),
		Timeout:         pulumi.String("string"),
		Volumes: cloudrunv2.ServiceTemplateVolumeArray{
			&cloudrunv2.ServiceTemplateVolumeArgs{
				Name: pulumi.String("string"),
				CloudSqlInstance: &cloudrunv2.ServiceTemplateVolumeCloudSqlInstanceArgs{
					Instances: pulumi.StringArray{
						pulumi.String("string"),
					},
				},
				EmptyDir: &cloudrunv2.ServiceTemplateVolumeEmptyDirArgs{
					Medium:    pulumi.String("string"),
					SizeLimit: pulumi.String("string"),
				},
				Gcs: &cloudrunv2.ServiceTemplateVolumeGcsArgs{
					Bucket: pulumi.String("string"),
					MountOptions: pulumi.StringArray{
						pulumi.String("string"),
					},
					ReadOnly: pulumi.Bool(false),
				},
				Nfs: &cloudrunv2.ServiceTemplateVolumeNfsArgs{
					Path:     pulumi.String("string"),
					Server:   pulumi.String("string"),
					ReadOnly: pulumi.Bool(false),
				},
				Secret: &cloudrunv2.ServiceTemplateVolumeSecretArgs{
					Secret:      pulumi.String("string"),
					DefaultMode: pulumi.Int(0),
					Items: cloudrunv2.ServiceTemplateVolumeSecretItemArray{
						&cloudrunv2.ServiceTemplateVolumeSecretItemArgs{
							Path:    pulumi.String("string"),
							Mode:    pulumi.Int(0),
							Version: pulumi.String("string"),
						},
					},
				},
			},
		},
		VpcAccess: &cloudrunv2.ServiceTemplateVpcAccessArgs{
			Connector: pulumi.String("string"),
			Egress:    pulumi.String("string"),
			NetworkInterfaces: cloudrunv2.ServiceTemplateVpcAccessNetworkInterfaceArray{
				&cloudrunv2.ServiceTemplateVpcAccessNetworkInterfaceArgs{
					Network:    pulumi.String("string"),
					Subnetwork: pulumi.String("string"),
					Tags: pulumi.StringArray{
						pulumi.String("string"),
					},
				},
			},
		},
	},
	Description: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	ClientVersion: pulumi.String("string"),
	CustomAudiences: pulumi.StringArray{
		pulumi.String("string"),
	},
	DefaultUriDisabled: pulumi.Bool(false),
	DeletionProtection: pulumi.Bool(false),
	Annotations: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Ingress:            pulumi.String("string"),
	InvokerIamDisabled: pulumi.Bool(false),
	Client:             pulumi.String("string"),
	LaunchStage:        pulumi.String("string"),
	BuildConfig: &cloudrunv2.ServiceBuildConfigArgs{
		BaseImage:              pulumi.String("string"),
		EnableAutomaticUpdates: pulumi.Bool(false),
		EnvironmentVariables: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		FunctionTarget: pulumi.String("string"),
		ImageUri:       pulumi.String("string"),
		Name:           pulumi.String("string"),
		ServiceAccount: pulumi.String("string"),
		SourceLocation: pulumi.String("string"),
		WorkerPool:     pulumi.String("string"),
	},
	Name:    pulumi.String("string"),
	Project: pulumi.String("string"),
	Scaling: &cloudrunv2.ServiceScalingArgs{
		MinInstanceCount: pulumi.Int(0),
	},
	BinaryAuthorization: &cloudrunv2.ServiceBinaryAuthorizationArgs{
		BreakglassJustification: pulumi.String("string"),
		Policy:                  pulumi.String("string"),
		UseDefault:              pulumi.Bool(false),
	},
	Traffics: cloudrunv2.ServiceTrafficArray{
		&cloudrunv2.ServiceTrafficArgs{
			Percent:  pulumi.Int(0),
			Revision: pulumi.String("string"),
			Tag:      pulumi.String("string"),
			Type:     pulumi.String("string"),
		},
	},
})
Copy
var exampleserviceResourceResourceFromCloudrunv2service = new Service("exampleserviceResourceResourceFromCloudrunv2service", ServiceArgs.builder()
    .location("string")
    .template(ServiceTemplateArgs.builder()
        .annotations(Map.of("string", "string"))
        .containers(ServiceTemplateContainerArgs.builder()
            .image("string")
            .commands("string")
            .buildInfos(ServiceTemplateContainerBuildInfoArgs.builder()
                .functionTarget("string")
                .sourceLocation("string")
                .build())
            .args("string")
            .dependsOns("string")
            .envs(ServiceTemplateContainerEnvArgs.builder()
                .name("string")
                .value("string")
                .valueSource(ServiceTemplateContainerEnvValueSourceArgs.builder()
                    .secretKeyRef(ServiceTemplateContainerEnvValueSourceSecretKeyRefArgs.builder()
                        .secret("string")
                        .version("string")
                        .build())
                    .build())
                .build())
            .baseImageUri("string")
            .livenessProbe(ServiceTemplateContainerLivenessProbeArgs.builder()
                .failureThreshold(0)
                .grpc(ServiceTemplateContainerLivenessProbeGrpcArgs.builder()
                    .port(0)
                    .service("string")
                    .build())
                .httpGet(ServiceTemplateContainerLivenessProbeHttpGetArgs.builder()
                    .httpHeaders(ServiceTemplateContainerLivenessProbeHttpGetHttpHeaderArgs.builder()
                        .name("string")
                        .value("string")
                        .build())
                    .path("string")
                    .port(0)
                    .build())
                .initialDelaySeconds(0)
                .periodSeconds(0)
                .tcpSocket(ServiceTemplateContainerLivenessProbeTcpSocketArgs.builder()
                    .port(0)
                    .build())
                .timeoutSeconds(0)
                .build())
            .name("string")
            .ports(ServiceTemplateContainerPortsArgs.builder()
                .containerPort(0)
                .name("string")
                .build())
            .resources(ServiceTemplateContainerResourcesArgs.builder()
                .cpuIdle(false)
                .limits(Map.of("string", "string"))
                .startupCpuBoost(false)
                .build())
            .startupProbe(ServiceTemplateContainerStartupProbeArgs.builder()
                .failureThreshold(0)
                .grpc(ServiceTemplateContainerStartupProbeGrpcArgs.builder()
                    .port(0)
                    .service("string")
                    .build())
                .httpGet(ServiceTemplateContainerStartupProbeHttpGetArgs.builder()
                    .httpHeaders(ServiceTemplateContainerStartupProbeHttpGetHttpHeaderArgs.builder()
                        .name("string")
                        .value("string")
                        .build())
                    .path("string")
                    .port(0)
                    .build())
                .initialDelaySeconds(0)
                .periodSeconds(0)
                .tcpSocket(ServiceTemplateContainerStartupProbeTcpSocketArgs.builder()
                    .port(0)
                    .build())
                .timeoutSeconds(0)
                .build())
            .volumeMounts(ServiceTemplateContainerVolumeMountArgs.builder()
                .mountPath("string")
                .name("string")
                .build())
            .workingDir("string")
            .build())
        .encryptionKey("string")
        .executionEnvironment("string")
        .gpuZonalRedundancyDisabled(false)
        .labels(Map.of("string", "string"))
        .maxInstanceRequestConcurrency(0)
        .nodeSelector(ServiceTemplateNodeSelectorArgs.builder()
            .accelerator("string")
            .build())
        .revision("string")
        .scaling(ServiceTemplateScalingArgs.builder()
            .maxInstanceCount(0)
            .minInstanceCount(0)
            .build())
        .serviceAccount("string")
        .serviceMesh(ServiceTemplateServiceMeshArgs.builder()
            .mesh("string")
            .build())
        .sessionAffinity(false)
        .timeout("string")
        .volumes(ServiceTemplateVolumeArgs.builder()
            .name("string")
            .cloudSqlInstance(ServiceTemplateVolumeCloudSqlInstanceArgs.builder()
                .instances("string")
                .build())
            .emptyDir(ServiceTemplateVolumeEmptyDirArgs.builder()
                .medium("string")
                .sizeLimit("string")
                .build())
            .gcs(ServiceTemplateVolumeGcsArgs.builder()
                .bucket("string")
                .mountOptions("string")
                .readOnly(false)
                .build())
            .nfs(ServiceTemplateVolumeNfsArgs.builder()
                .path("string")
                .server("string")
                .readOnly(false)
                .build())
            .secret(ServiceTemplateVolumeSecretArgs.builder()
                .secret("string")
                .defaultMode(0)
                .items(ServiceTemplateVolumeSecretItemArgs.builder()
                    .path("string")
                    .mode(0)
                    .version("string")
                    .build())
                .build())
            .build())
        .vpcAccess(ServiceTemplateVpcAccessArgs.builder()
            .connector("string")
            .egress("string")
            .networkInterfaces(ServiceTemplateVpcAccessNetworkInterfaceArgs.builder()
                .network("string")
                .subnetwork("string")
                .tags("string")
                .build())
            .build())
        .build())
    .description("string")
    .labels(Map.of("string", "string"))
    .clientVersion("string")
    .customAudiences("string")
    .defaultUriDisabled(false)
    .deletionProtection(false)
    .annotations(Map.of("string", "string"))
    .ingress("string")
    .invokerIamDisabled(false)
    .client("string")
    .launchStage("string")
    .buildConfig(ServiceBuildConfigArgs.builder()
        .baseImage("string")
        .enableAutomaticUpdates(false)
        .environmentVariables(Map.of("string", "string"))
        .functionTarget("string")
        .imageUri("string")
        .name("string")
        .serviceAccount("string")
        .sourceLocation("string")
        .workerPool("string")
        .build())
    .name("string")
    .project("string")
    .scaling(ServiceScalingArgs.builder()
        .minInstanceCount(0)
        .build())
    .binaryAuthorization(ServiceBinaryAuthorizationArgs.builder()
        .breakglassJustification("string")
        .policy("string")
        .useDefault(false)
        .build())
    .traffics(ServiceTrafficArgs.builder()
        .percent(0)
        .revision("string")
        .tag("string")
        .type("string")
        .build())
    .build());
Copy
exampleservice_resource_resource_from_cloudrunv2service = gcp.cloudrunv2.Service("exampleserviceResourceResourceFromCloudrunv2service",
    location="string",
    template={
        "annotations": {
            "string": "string",
        },
        "containers": [{
            "image": "string",
            "commands": ["string"],
            "build_infos": [{
                "function_target": "string",
                "source_location": "string",
            }],
            "args": ["string"],
            "depends_ons": ["string"],
            "envs": [{
                "name": "string",
                "value": "string",
                "value_source": {
                    "secret_key_ref": {
                        "secret": "string",
                        "version": "string",
                    },
                },
            }],
            "base_image_uri": "string",
            "liveness_probe": {
                "failure_threshold": 0,
                "grpc": {
                    "port": 0,
                    "service": "string",
                },
                "http_get": {
                    "http_headers": [{
                        "name": "string",
                        "value": "string",
                    }],
                    "path": "string",
                    "port": 0,
                },
                "initial_delay_seconds": 0,
                "period_seconds": 0,
                "tcp_socket": {
                    "port": 0,
                },
                "timeout_seconds": 0,
            },
            "name": "string",
            "ports": {
                "container_port": 0,
                "name": "string",
            },
            "resources": {
                "cpu_idle": False,
                "limits": {
                    "string": "string",
                },
                "startup_cpu_boost": False,
            },
            "startup_probe": {
                "failure_threshold": 0,
                "grpc": {
                    "port": 0,
                    "service": "string",
                },
                "http_get": {
                    "http_headers": [{
                        "name": "string",
                        "value": "string",
                    }],
                    "path": "string",
                    "port": 0,
                },
                "initial_delay_seconds": 0,
                "period_seconds": 0,
                "tcp_socket": {
                    "port": 0,
                },
                "timeout_seconds": 0,
            },
            "volume_mounts": [{
                "mount_path": "string",
                "name": "string",
            }],
            "working_dir": "string",
        }],
        "encryption_key": "string",
        "execution_environment": "string",
        "gpu_zonal_redundancy_disabled": False,
        "labels": {
            "string": "string",
        },
        "max_instance_request_concurrency": 0,
        "node_selector": {
            "accelerator": "string",
        },
        "revision": "string",
        "scaling": {
            "max_instance_count": 0,
            "min_instance_count": 0,
        },
        "service_account": "string",
        "service_mesh": {
            "mesh": "string",
        },
        "session_affinity": False,
        "timeout": "string",
        "volumes": [{
            "name": "string",
            "cloud_sql_instance": {
                "instances": ["string"],
            },
            "empty_dir": {
                "medium": "string",
                "size_limit": "string",
            },
            "gcs": {
                "bucket": "string",
                "mount_options": ["string"],
                "read_only": False,
            },
            "nfs": {
                "path": "string",
                "server": "string",
                "read_only": False,
            },
            "secret": {
                "secret": "string",
                "default_mode": 0,
                "items": [{
                    "path": "string",
                    "mode": 0,
                    "version": "string",
                }],
            },
        }],
        "vpc_access": {
            "connector": "string",
            "egress": "string",
            "network_interfaces": [{
                "network": "string",
                "subnetwork": "string",
                "tags": ["string"],
            }],
        },
    },
    description="string",
    labels={
        "string": "string",
    },
    client_version="string",
    custom_audiences=["string"],
    default_uri_disabled=False,
    deletion_protection=False,
    annotations={
        "string": "string",
    },
    ingress="string",
    invoker_iam_disabled=False,
    client="string",
    launch_stage="string",
    build_config={
        "base_image": "string",
        "enable_automatic_updates": False,
        "environment_variables": {
            "string": "string",
        },
        "function_target": "string",
        "image_uri": "string",
        "name": "string",
        "service_account": "string",
        "source_location": "string",
        "worker_pool": "string",
    },
    name="string",
    project="string",
    scaling={
        "min_instance_count": 0,
    },
    binary_authorization={
        "breakglass_justification": "string",
        "policy": "string",
        "use_default": False,
    },
    traffics=[{
        "percent": 0,
        "revision": "string",
        "tag": "string",
        "type": "string",
    }])
Copy
const exampleserviceResourceResourceFromCloudrunv2service = new gcp.cloudrunv2.Service("exampleserviceResourceResourceFromCloudrunv2service", {
    location: "string",
    template: {
        annotations: {
            string: "string",
        },
        containers: [{
            image: "string",
            commands: ["string"],
            buildInfos: [{
                functionTarget: "string",
                sourceLocation: "string",
            }],
            args: ["string"],
            dependsOns: ["string"],
            envs: [{
                name: "string",
                value: "string",
                valueSource: {
                    secretKeyRef: {
                        secret: "string",
                        version: "string",
                    },
                },
            }],
            baseImageUri: "string",
            livenessProbe: {
                failureThreshold: 0,
                grpc: {
                    port: 0,
                    service: "string",
                },
                httpGet: {
                    httpHeaders: [{
                        name: "string",
                        value: "string",
                    }],
                    path: "string",
                    port: 0,
                },
                initialDelaySeconds: 0,
                periodSeconds: 0,
                tcpSocket: {
                    port: 0,
                },
                timeoutSeconds: 0,
            },
            name: "string",
            ports: {
                containerPort: 0,
                name: "string",
            },
            resources: {
                cpuIdle: false,
                limits: {
                    string: "string",
                },
                startupCpuBoost: false,
            },
            startupProbe: {
                failureThreshold: 0,
                grpc: {
                    port: 0,
                    service: "string",
                },
                httpGet: {
                    httpHeaders: [{
                        name: "string",
                        value: "string",
                    }],
                    path: "string",
                    port: 0,
                },
                initialDelaySeconds: 0,
                periodSeconds: 0,
                tcpSocket: {
                    port: 0,
                },
                timeoutSeconds: 0,
            },
            volumeMounts: [{
                mountPath: "string",
                name: "string",
            }],
            workingDir: "string",
        }],
        encryptionKey: "string",
        executionEnvironment: "string",
        gpuZonalRedundancyDisabled: false,
        labels: {
            string: "string",
        },
        maxInstanceRequestConcurrency: 0,
        nodeSelector: {
            accelerator: "string",
        },
        revision: "string",
        scaling: {
            maxInstanceCount: 0,
            minInstanceCount: 0,
        },
        serviceAccount: "string",
        serviceMesh: {
            mesh: "string",
        },
        sessionAffinity: false,
        timeout: "string",
        volumes: [{
            name: "string",
            cloudSqlInstance: {
                instances: ["string"],
            },
            emptyDir: {
                medium: "string",
                sizeLimit: "string",
            },
            gcs: {
                bucket: "string",
                mountOptions: ["string"],
                readOnly: false,
            },
            nfs: {
                path: "string",
                server: "string",
                readOnly: false,
            },
            secret: {
                secret: "string",
                defaultMode: 0,
                items: [{
                    path: "string",
                    mode: 0,
                    version: "string",
                }],
            },
        }],
        vpcAccess: {
            connector: "string",
            egress: "string",
            networkInterfaces: [{
                network: "string",
                subnetwork: "string",
                tags: ["string"],
            }],
        },
    },
    description: "string",
    labels: {
        string: "string",
    },
    clientVersion: "string",
    customAudiences: ["string"],
    defaultUriDisabled: false,
    deletionProtection: false,
    annotations: {
        string: "string",
    },
    ingress: "string",
    invokerIamDisabled: false,
    client: "string",
    launchStage: "string",
    buildConfig: {
        baseImage: "string",
        enableAutomaticUpdates: false,
        environmentVariables: {
            string: "string",
        },
        functionTarget: "string",
        imageUri: "string",
        name: "string",
        serviceAccount: "string",
        sourceLocation: "string",
        workerPool: "string",
    },
    name: "string",
    project: "string",
    scaling: {
        minInstanceCount: 0,
    },
    binaryAuthorization: {
        breakglassJustification: "string",
        policy: "string",
        useDefault: false,
    },
    traffics: [{
        percent: 0,
        revision: "string",
        tag: "string",
        type: "string",
    }],
});
Copy
type: gcp:cloudrunv2:Service
properties:
    annotations:
        string: string
    binaryAuthorization:
        breakglassJustification: string
        policy: string
        useDefault: false
    buildConfig:
        baseImage: string
        enableAutomaticUpdates: false
        environmentVariables:
            string: string
        functionTarget: string
        imageUri: string
        name: string
        serviceAccount: string
        sourceLocation: string
        workerPool: string
    client: string
    clientVersion: string
    customAudiences:
        - string
    defaultUriDisabled: false
    deletionProtection: false
    description: string
    ingress: string
    invokerIamDisabled: false
    labels:
        string: string
    launchStage: string
    location: string
    name: string
    project: string
    scaling:
        minInstanceCount: 0
    template:
        annotations:
            string: string
        containers:
            - args:
                - string
              baseImageUri: string
              buildInfos:
                - functionTarget: string
                  sourceLocation: string
              commands:
                - string
              dependsOns:
                - string
              envs:
                - name: string
                  value: string
                  valueSource:
                    secretKeyRef:
                        secret: string
                        version: string
              image: string
              livenessProbe:
                failureThreshold: 0
                grpc:
                    port: 0
                    service: string
                httpGet:
                    httpHeaders:
                        - name: string
                          value: string
                    path: string
                    port: 0
                initialDelaySeconds: 0
                periodSeconds: 0
                tcpSocket:
                    port: 0
                timeoutSeconds: 0
              name: string
              ports:
                containerPort: 0
                name: string
              resources:
                cpuIdle: false
                limits:
                    string: string
                startupCpuBoost: false
              startupProbe:
                failureThreshold: 0
                grpc:
                    port: 0
                    service: string
                httpGet:
                    httpHeaders:
                        - name: string
                          value: string
                    path: string
                    port: 0
                initialDelaySeconds: 0
                periodSeconds: 0
                tcpSocket:
                    port: 0
                timeoutSeconds: 0
              volumeMounts:
                - mountPath: string
                  name: string
              workingDir: string
        encryptionKey: string
        executionEnvironment: string
        gpuZonalRedundancyDisabled: false
        labels:
            string: string
        maxInstanceRequestConcurrency: 0
        nodeSelector:
            accelerator: string
        revision: string
        scaling:
            maxInstanceCount: 0
            minInstanceCount: 0
        serviceAccount: string
        serviceMesh:
            mesh: string
        sessionAffinity: false
        timeout: string
        volumes:
            - cloudSqlInstance:
                instances:
                    - string
              emptyDir:
                medium: string
                sizeLimit: string
              gcs:
                bucket: string
                mountOptions:
                    - string
                readOnly: false
              name: string
              nfs:
                path: string
                readOnly: false
                server: string
              secret:
                defaultMode: 0
                items:
                    - mode: 0
                      path: string
                      version: string
                secret: string
        vpcAccess:
            connector: string
            egress: string
            networkInterfaces:
                - network: string
                  subnetwork: string
                  tags:
                    - string
    traffics:
        - percent: 0
          revision: string
          tag: string
          type: string
Copy

Service Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Service resource accepts the following input properties:

Location
This property is required.
Changes to this property will trigger replacement.
string
The location of the cloud run service
Template This property is required. ServiceTemplate
The template used to create revisions for this Service. Structure is documented below.
Annotations Dictionary<string, string>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
BinaryAuthorization ServiceBinaryAuthorization
Settings for the Binary Authorization feature.
BuildConfig ServiceBuildConfig
Configuration for building a Cloud Run function.
Client string
Arbitrary identifier for the API client.
ClientVersion string
Arbitrary version identifier for the API client.
CustomAudiences List<string>
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
DefaultUriDisabled bool
Disables public resolution of the default URI of this service.
DeletionProtection bool
Description string
User-provided description of the Service. This field currently has a 512-character limit.
Ingress string
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
InvokerIamDisabled bool
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
Labels Dictionary<string, string>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
LaunchStage string
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
Name Changes to this property will trigger replacement. string
Name of the Service.
Project Changes to this property will trigger replacement. string
Scaling ServiceScaling
Scaling settings that apply to the whole service
Traffics List<ServiceTraffic>
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
Location
This property is required.
Changes to this property will trigger replacement.
string
The location of the cloud run service
Template This property is required. ServiceTemplateArgs
The template used to create revisions for this Service. Structure is documented below.
Annotations map[string]string
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
BinaryAuthorization ServiceBinaryAuthorizationArgs
Settings for the Binary Authorization feature.
BuildConfig ServiceBuildConfigArgs
Configuration for building a Cloud Run function.
Client string
Arbitrary identifier for the API client.
ClientVersion string
Arbitrary version identifier for the API client.
CustomAudiences []string
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
DefaultUriDisabled bool
Disables public resolution of the default URI of this service.
DeletionProtection bool
Description string
User-provided description of the Service. This field currently has a 512-character limit.
Ingress string
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
InvokerIamDisabled bool
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
Labels map[string]string
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
LaunchStage string
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
Name Changes to this property will trigger replacement. string
Name of the Service.
Project Changes to this property will trigger replacement. string
Scaling ServiceScalingArgs
Scaling settings that apply to the whole service
Traffics []ServiceTrafficArgs
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
location
This property is required.
Changes to this property will trigger replacement.
String
The location of the cloud run service
template This property is required. ServiceTemplate
The template used to create revisions for this Service. Structure is documented below.
annotations Map<String,String>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binaryAuthorization ServiceBinaryAuthorization
Settings for the Binary Authorization feature.
buildConfig ServiceBuildConfig
Configuration for building a Cloud Run function.
client String
Arbitrary identifier for the API client.
clientVersion String
Arbitrary version identifier for the API client.
customAudiences List<String>
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
defaultUriDisabled Boolean
Disables public resolution of the default URI of this service.
deletionProtection Boolean
description String
User-provided description of the Service. This field currently has a 512-character limit.
ingress String
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invokerIamDisabled Boolean
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels Map<String,String>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
launchStage String
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
name Changes to this property will trigger replacement. String
Name of the Service.
project Changes to this property will trigger replacement. String
scaling ServiceScaling
Scaling settings that apply to the whole service
traffics List<ServiceTraffic>
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
location
This property is required.
Changes to this property will trigger replacement.
string
The location of the cloud run service
template This property is required. ServiceTemplate
The template used to create revisions for this Service. Structure is documented below.
annotations {[key: string]: string}
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binaryAuthorization ServiceBinaryAuthorization
Settings for the Binary Authorization feature.
buildConfig ServiceBuildConfig
Configuration for building a Cloud Run function.
client string
Arbitrary identifier for the API client.
clientVersion string
Arbitrary version identifier for the API client.
customAudiences string[]
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
defaultUriDisabled boolean
Disables public resolution of the default URI of this service.
deletionProtection boolean
description string
User-provided description of the Service. This field currently has a 512-character limit.
ingress string
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invokerIamDisabled boolean
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels {[key: string]: string}
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
launchStage string
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
name Changes to this property will trigger replacement. string
Name of the Service.
project Changes to this property will trigger replacement. string
scaling ServiceScaling
Scaling settings that apply to the whole service
traffics ServiceTraffic[]
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
location
This property is required.
Changes to this property will trigger replacement.
str
The location of the cloud run service
template This property is required. ServiceTemplateArgs
The template used to create revisions for this Service. Structure is documented below.
annotations Mapping[str, str]
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binary_authorization ServiceBinaryAuthorizationArgs
Settings for the Binary Authorization feature.
build_config ServiceBuildConfigArgs
Configuration for building a Cloud Run function.
client str
Arbitrary identifier for the API client.
client_version str
Arbitrary version identifier for the API client.
custom_audiences Sequence[str]
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
default_uri_disabled bool
Disables public resolution of the default URI of this service.
deletion_protection bool
description str
User-provided description of the Service. This field currently has a 512-character limit.
ingress str
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invoker_iam_disabled bool
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels Mapping[str, str]
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
launch_stage str
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
name Changes to this property will trigger replacement. str
Name of the Service.
project Changes to this property will trigger replacement. str
scaling ServiceScalingArgs
Scaling settings that apply to the whole service
traffics Sequence[ServiceTrafficArgs]
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
location
This property is required.
Changes to this property will trigger replacement.
String
The location of the cloud run service
template This property is required. Property Map
The template used to create revisions for this Service. Structure is documented below.
annotations Map<String>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binaryAuthorization Property Map
Settings for the Binary Authorization feature.
buildConfig Property Map
Configuration for building a Cloud Run function.
client String
Arbitrary identifier for the API client.
clientVersion String
Arbitrary version identifier for the API client.
customAudiences List<String>
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
defaultUriDisabled Boolean
Disables public resolution of the default URI of this service.
deletionProtection Boolean
description String
User-provided description of the Service. This field currently has a 512-character limit.
ingress String
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invokerIamDisabled Boolean
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels Map<String>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
launchStage String
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
name Changes to this property will trigger replacement. String
Name of the Service.
project Changes to this property will trigger replacement. String
scaling Property Map
Scaling settings that apply to the whole service
traffics List<Property Map>
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

Outputs

All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:

Conditions List<ServiceCondition>
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
CreateTime string
The creation time.
Creator string
Email address of the authenticated creator.
DeleteTime string
The deletion time.
EffectiveAnnotations Dictionary<string, string>
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Etag string
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
ExpireTime string
For a deleted resource, the time after which it will be permanently deleted.
Generation string
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
Id string
The provider-assigned unique ID for this managed resource.
LastModifier string
Email address of the last authenticated modifier.
LatestCreatedRevision string
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
LatestReadyRevision string
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
ObservedGeneration string
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
Reconciling bool
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
TerminalConditions List<ServiceTerminalCondition>
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
TrafficStatuses List<ServiceTrafficStatus>
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
Uid string
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
UpdateTime string
The last-modified time.
Uri string
(Output) Displays the target URI.
Urls List<string>
All URLs serving traffic for this Service.
Conditions []ServiceCondition
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
CreateTime string
The creation time.
Creator string
Email address of the authenticated creator.
DeleteTime string
The deletion time.
EffectiveAnnotations map[string]string
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Etag string
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
ExpireTime string
For a deleted resource, the time after which it will be permanently deleted.
Generation string
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
Id string
The provider-assigned unique ID for this managed resource.
LastModifier string
Email address of the last authenticated modifier.
LatestCreatedRevision string
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
LatestReadyRevision string
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
ObservedGeneration string
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
Reconciling bool
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
TerminalConditions []ServiceTerminalCondition
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
TrafficStatuses []ServiceTrafficStatus
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
Uid string
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
UpdateTime string
The last-modified time.
Uri string
(Output) Displays the target URI.
Urls []string
All URLs serving traffic for this Service.
conditions List<ServiceCondition>
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
createTime String
The creation time.
creator String
Email address of the authenticated creator.
deleteTime String
The deletion time.
effectiveAnnotations Map<String,String>
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag String
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expireTime String
For a deleted resource, the time after which it will be permanently deleted.
generation String
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
id String
The provider-assigned unique ID for this managed resource.
lastModifier String
Email address of the last authenticated modifier.
latestCreatedRevision String
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latestReadyRevision String
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
observedGeneration String
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling Boolean
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
terminalConditions List<ServiceTerminalCondition>
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
trafficStatuses List<ServiceTrafficStatus>
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
uid String
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
updateTime String
The last-modified time.
uri String
(Output) Displays the target URI.
urls List<String>
All URLs serving traffic for this Service.
conditions ServiceCondition[]
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
createTime string
The creation time.
creator string
Email address of the authenticated creator.
deleteTime string
The deletion time.
effectiveAnnotations {[key: string]: string}
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag string
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expireTime string
For a deleted resource, the time after which it will be permanently deleted.
generation string
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
id string
The provider-assigned unique ID for this managed resource.
lastModifier string
Email address of the last authenticated modifier.
latestCreatedRevision string
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latestReadyRevision string
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
observedGeneration string
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling boolean
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
terminalConditions ServiceTerminalCondition[]
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
trafficStatuses ServiceTrafficStatus[]
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
uid string
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
updateTime string
The last-modified time.
uri string
(Output) Displays the target URI.
urls string[]
All URLs serving traffic for this Service.
conditions Sequence[ServiceCondition]
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
create_time str
The creation time.
creator str
Email address of the authenticated creator.
delete_time str
The deletion time.
effective_annotations Mapping[str, str]
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag str
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expire_time str
For a deleted resource, the time after which it will be permanently deleted.
generation str
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
id str
The provider-assigned unique ID for this managed resource.
last_modifier str
Email address of the last authenticated modifier.
latest_created_revision str
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latest_ready_revision str
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
observed_generation str
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling bool
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
terminal_conditions Sequence[ServiceTerminalCondition]
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
traffic_statuses Sequence[ServiceTrafficStatus]
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
uid str
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
update_time str
The last-modified time.
uri str
(Output) Displays the target URI.
urls Sequence[str]
All URLs serving traffic for this Service.
conditions List<Property Map>
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
createTime String
The creation time.
creator String
Email address of the authenticated creator.
deleteTime String
The deletion time.
effectiveAnnotations Map<String>
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag String
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expireTime String
For a deleted resource, the time after which it will be permanently deleted.
generation String
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
id String
The provider-assigned unique ID for this managed resource.
lastModifier String
Email address of the last authenticated modifier.
latestCreatedRevision String
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latestReadyRevision String
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
observedGeneration String
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling Boolean
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
terminalConditions List<Property Map>
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
trafficStatuses List<Property Map>
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
uid String
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
updateTime String
The last-modified time.
uri String
(Output) Displays the target URI.
urls List<String>
All URLs serving traffic for this Service.

Look up Existing Service Resource

Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ServiceState, opts?: CustomResourceOptions): Service
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        annotations: Optional[Mapping[str, str]] = None,
        binary_authorization: Optional[ServiceBinaryAuthorizationArgs] = None,
        build_config: Optional[ServiceBuildConfigArgs] = None,
        client: Optional[str] = None,
        client_version: Optional[str] = None,
        conditions: Optional[Sequence[ServiceConditionArgs]] = None,
        create_time: Optional[str] = None,
        creator: Optional[str] = None,
        custom_audiences: Optional[Sequence[str]] = None,
        default_uri_disabled: Optional[bool] = None,
        delete_time: Optional[str] = None,
        deletion_protection: Optional[bool] = None,
        description: Optional[str] = None,
        effective_annotations: Optional[Mapping[str, str]] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        etag: Optional[str] = None,
        expire_time: Optional[str] = None,
        generation: Optional[str] = None,
        ingress: Optional[str] = None,
        invoker_iam_disabled: Optional[bool] = None,
        labels: Optional[Mapping[str, str]] = None,
        last_modifier: Optional[str] = None,
        latest_created_revision: Optional[str] = None,
        latest_ready_revision: Optional[str] = None,
        launch_stage: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        observed_generation: Optional[str] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        reconciling: Optional[bool] = None,
        scaling: Optional[ServiceScalingArgs] = None,
        template: Optional[ServiceTemplateArgs] = None,
        terminal_conditions: Optional[Sequence[ServiceTerminalConditionArgs]] = None,
        traffic_statuses: Optional[Sequence[ServiceTrafficStatusArgs]] = None,
        traffics: Optional[Sequence[ServiceTrafficArgs]] = None,
        uid: Optional[str] = None,
        update_time: Optional[str] = None,
        uri: Optional[str] = None,
        urls: Optional[Sequence[str]] = None) -> Service
func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
public static Service get(String name, Output<String> id, ServiceState state, CustomResourceOptions options)
resources:  _:    type: gcp:cloudrunv2:Service    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Annotations Dictionary<string, string>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
BinaryAuthorization ServiceBinaryAuthorization
Settings for the Binary Authorization feature.
BuildConfig ServiceBuildConfig
Configuration for building a Cloud Run function.
Client string
Arbitrary identifier for the API client.
ClientVersion string
Arbitrary version identifier for the API client.
Conditions List<ServiceCondition>
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
CreateTime string
The creation time.
Creator string
Email address of the authenticated creator.
CustomAudiences List<string>
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
DefaultUriDisabled bool
Disables public resolution of the default URI of this service.
DeleteTime string
The deletion time.
DeletionProtection bool
Description string
User-provided description of the Service. This field currently has a 512-character limit.
EffectiveAnnotations Dictionary<string, string>
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Etag string
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
ExpireTime string
For a deleted resource, the time after which it will be permanently deleted.
Generation string
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
Ingress string
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
InvokerIamDisabled bool
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
Labels Dictionary<string, string>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
LastModifier string
Email address of the last authenticated modifier.
LatestCreatedRevision string
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
LatestReadyRevision string
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
LaunchStage string
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
Location Changes to this property will trigger replacement. string
The location of the cloud run service
Name Changes to this property will trigger replacement. string
Name of the Service.
ObservedGeneration string
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
Project Changes to this property will trigger replacement. string
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
Reconciling bool
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
Scaling ServiceScaling
Scaling settings that apply to the whole service
Template ServiceTemplate
The template used to create revisions for this Service. Structure is documented below.
TerminalConditions List<ServiceTerminalCondition>
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
TrafficStatuses List<ServiceTrafficStatus>
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
Traffics List<ServiceTraffic>
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
Uid string
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
UpdateTime string
The last-modified time.
Uri string
(Output) Displays the target URI.
Urls List<string>
All URLs serving traffic for this Service.
Annotations map[string]string
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
BinaryAuthorization ServiceBinaryAuthorizationArgs
Settings for the Binary Authorization feature.
BuildConfig ServiceBuildConfigArgs
Configuration for building a Cloud Run function.
Client string
Arbitrary identifier for the API client.
ClientVersion string
Arbitrary version identifier for the API client.
Conditions []ServiceConditionArgs
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
CreateTime string
The creation time.
Creator string
Email address of the authenticated creator.
CustomAudiences []string
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
DefaultUriDisabled bool
Disables public resolution of the default URI of this service.
DeleteTime string
The deletion time.
DeletionProtection bool
Description string
User-provided description of the Service. This field currently has a 512-character limit.
EffectiveAnnotations map[string]string
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Etag string
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
ExpireTime string
For a deleted resource, the time after which it will be permanently deleted.
Generation string
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
Ingress string
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
InvokerIamDisabled bool
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
Labels map[string]string
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
LastModifier string
Email address of the last authenticated modifier.
LatestCreatedRevision string
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
LatestReadyRevision string
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
LaunchStage string
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
Location Changes to this property will trigger replacement. string
The location of the cloud run service
Name Changes to this property will trigger replacement. string
Name of the Service.
ObservedGeneration string
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
Project Changes to this property will trigger replacement. string
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
Reconciling bool
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
Scaling ServiceScalingArgs
Scaling settings that apply to the whole service
Template ServiceTemplateArgs
The template used to create revisions for this Service. Structure is documented below.
TerminalConditions []ServiceTerminalConditionArgs
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
TrafficStatuses []ServiceTrafficStatusArgs
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
Traffics []ServiceTrafficArgs
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
Uid string
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
UpdateTime string
The last-modified time.
Uri string
(Output) Displays the target URI.
Urls []string
All URLs serving traffic for this Service.
annotations Map<String,String>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binaryAuthorization ServiceBinaryAuthorization
Settings for the Binary Authorization feature.
buildConfig ServiceBuildConfig
Configuration for building a Cloud Run function.
client String
Arbitrary identifier for the API client.
clientVersion String
Arbitrary version identifier for the API client.
conditions List<ServiceCondition>
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
createTime String
The creation time.
creator String
Email address of the authenticated creator.
customAudiences List<String>
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
defaultUriDisabled Boolean
Disables public resolution of the default URI of this service.
deleteTime String
The deletion time.
deletionProtection Boolean
description String
User-provided description of the Service. This field currently has a 512-character limit.
effectiveAnnotations Map<String,String>
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag String
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expireTime String
For a deleted resource, the time after which it will be permanently deleted.
generation String
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
ingress String
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invokerIamDisabled Boolean
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels Map<String,String>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
lastModifier String
Email address of the last authenticated modifier.
latestCreatedRevision String
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latestReadyRevision String
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
launchStage String
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
location Changes to this property will trigger replacement. String
The location of the cloud run service
name Changes to this property will trigger replacement. String
Name of the Service.
observedGeneration String
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
project Changes to this property will trigger replacement. String
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling Boolean
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
scaling ServiceScaling
Scaling settings that apply to the whole service
template ServiceTemplate
The template used to create revisions for this Service. Structure is documented below.
terminalConditions List<ServiceTerminalCondition>
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
trafficStatuses List<ServiceTrafficStatus>
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
traffics List<ServiceTraffic>
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
uid String
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
updateTime String
The last-modified time.
uri String
(Output) Displays the target URI.
urls List<String>
All URLs serving traffic for this Service.
annotations {[key: string]: string}
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binaryAuthorization ServiceBinaryAuthorization
Settings for the Binary Authorization feature.
buildConfig ServiceBuildConfig
Configuration for building a Cloud Run function.
client string
Arbitrary identifier for the API client.
clientVersion string
Arbitrary version identifier for the API client.
conditions ServiceCondition[]
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
createTime string
The creation time.
creator string
Email address of the authenticated creator.
customAudiences string[]
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
defaultUriDisabled boolean
Disables public resolution of the default URI of this service.
deleteTime string
The deletion time.
deletionProtection boolean
description string
User-provided description of the Service. This field currently has a 512-character limit.
effectiveAnnotations {[key: string]: string}
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag string
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expireTime string
For a deleted resource, the time after which it will be permanently deleted.
generation string
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
ingress string
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invokerIamDisabled boolean
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels {[key: string]: string}
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
lastModifier string
Email address of the last authenticated modifier.
latestCreatedRevision string
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latestReadyRevision string
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
launchStage string
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
location Changes to this property will trigger replacement. string
The location of the cloud run service
name Changes to this property will trigger replacement. string
Name of the Service.
observedGeneration string
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
project Changes to this property will trigger replacement. string
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling boolean
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
scaling ServiceScaling
Scaling settings that apply to the whole service
template ServiceTemplate
The template used to create revisions for this Service. Structure is documented below.
terminalConditions ServiceTerminalCondition[]
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
trafficStatuses ServiceTrafficStatus[]
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
traffics ServiceTraffic[]
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
uid string
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
updateTime string
The last-modified time.
uri string
(Output) Displays the target URI.
urls string[]
All URLs serving traffic for this Service.
annotations Mapping[str, str]
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binary_authorization ServiceBinaryAuthorizationArgs
Settings for the Binary Authorization feature.
build_config ServiceBuildConfigArgs
Configuration for building a Cloud Run function.
client str
Arbitrary identifier for the API client.
client_version str
Arbitrary version identifier for the API client.
conditions Sequence[ServiceConditionArgs]
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
create_time str
The creation time.
creator str
Email address of the authenticated creator.
custom_audiences Sequence[str]
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
default_uri_disabled bool
Disables public resolution of the default URI of this service.
delete_time str
The deletion time.
deletion_protection bool
description str
User-provided description of the Service. This field currently has a 512-character limit.
effective_annotations Mapping[str, str]
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag str
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expire_time str
For a deleted resource, the time after which it will be permanently deleted.
generation str
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
ingress str
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invoker_iam_disabled bool
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels Mapping[str, str]
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
last_modifier str
Email address of the last authenticated modifier.
latest_created_revision str
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latest_ready_revision str
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
launch_stage str
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
location Changes to this property will trigger replacement. str
The location of the cloud run service
name Changes to this property will trigger replacement. str
Name of the Service.
observed_generation str
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
project Changes to this property will trigger replacement. str
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling bool
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
scaling ServiceScalingArgs
Scaling settings that apply to the whole service
template ServiceTemplateArgs
The template used to create revisions for this Service. Structure is documented below.
terminal_conditions Sequence[ServiceTerminalConditionArgs]
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
traffic_statuses Sequence[ServiceTrafficStatusArgs]
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
traffics Sequence[ServiceTrafficArgs]
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
uid str
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
update_time str
The last-modified time.
uri str
(Output) Displays the target URI.
urls Sequence[str]
All URLs serving traffic for this Service.
annotations Map<String>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
binaryAuthorization Property Map
Settings for the Binary Authorization feature.
buildConfig Property Map
Configuration for building a Cloud Run function.
client String
Arbitrary identifier for the API client.
clientVersion String
Arbitrary version identifier for the API client.
conditions List<Property Map>
The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
createTime String
The creation time.
creator String
Email address of the authenticated creator.
customAudiences List<String>
One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.
defaultUriDisabled Boolean
Disables public resolution of the default URI of this service.
deleteTime String
The deletion time.
deletionProtection Boolean
description String
User-provided description of the Service. This field currently has a 512-character limit.
effectiveAnnotations Map<String>
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
etag String
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
expireTime String
For a deleted resource, the time after which it will be permanently deleted.
generation String
A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
ingress String
Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. Possible values: ["INGRESS_TRAFFIC_ALL", "INGRESS_TRAFFIC_INTERNAL_ONLY", "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"]
invokerIamDisabled Boolean
Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
labels Map<String>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with 'run.googleapis.com', 'cloud.googleapis.com', 'serving.knative.dev', or 'autoscaling.knative.dev' namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
lastModifier String
Email address of the last authenticated modifier.
latestCreatedRevision String
Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
latestReadyRevision String
Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.
launchStage String
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. Possible values: ["UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]
location Changes to this property will trigger replacement. String
The location of the cloud run service
name Changes to this property will trigger replacement. String
Name of the Service.
observedGeneration String
The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.
project Changes to this property will trigger replacement. String
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
reconciling Boolean
Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observedGeneration, latest_ready_revison, trafficStatuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminalCondition.state. If reconciliation succeeded, the following fields will match: traffic and trafficStatuses, observedGeneration and generation, latestReadyRevision and latestCreatedRevision. If reconciliation failed, trafficStatuses, observedGeneration, and latestReadyRevision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminalCondition and conditions.
scaling Property Map
Scaling settings that apply to the whole service
template Property Map
The template used to create revisions for this Service. Structure is documented below.
terminalConditions List<Property Map>
The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
trafficStatuses List<Property Map>
Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. Structure is documented below.
traffics List<Property Map>
Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.
uid String
Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
updateTime String
The last-modified time.
uri String
(Output) Displays the target URI.
urls List<String>
All URLs serving traffic for this Service.

Supporting Types

ServiceBinaryAuthorization
, ServiceBinaryAuthorizationArgs

BreakglassJustification string
If present, indicates to use Breakglass using this justification. If useDefault is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
Policy string
The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name}
UseDefault bool
If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.
BreakglassJustification string
If present, indicates to use Breakglass using this justification. If useDefault is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
Policy string
The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name}
UseDefault bool
If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.
breakglassJustification String
If present, indicates to use Breakglass using this justification. If useDefault is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
policy String
The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name}
useDefault Boolean
If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.
breakglassJustification string
If present, indicates to use Breakglass using this justification. If useDefault is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
policy string
The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name}
useDefault boolean
If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.
breakglass_justification str
If present, indicates to use Breakglass using this justification. If useDefault is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
policy str
The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name}
use_default bool
If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.
breakglassJustification String
If present, indicates to use Breakglass using this justification. If useDefault is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
policy String
The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name}
useDefault Boolean
If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.

ServiceBuildConfig
, ServiceBuildConfigArgs

BaseImage string
The base image used to build the function.
EnableAutomaticUpdates bool
Sets whether the function will receive automatic base image updates.
EnvironmentVariables Dictionary<string, string>
User-provided build-time environment variables for the function.
FunctionTarget string
The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".
ImageUri string
Artifact Registry URI to store the built image.
Name string
(Output) The Cloud Build name of the latest successful deployment of the function.
ServiceAccount string
Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.
SourceLocation string
The Cloud Storage bucket URI where the function source code is located.
WorkerPool string
Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.
BaseImage string
The base image used to build the function.
EnableAutomaticUpdates bool
Sets whether the function will receive automatic base image updates.
EnvironmentVariables map[string]string
User-provided build-time environment variables for the function.
FunctionTarget string
The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".
ImageUri string
Artifact Registry URI to store the built image.
Name string
(Output) The Cloud Build name of the latest successful deployment of the function.
ServiceAccount string
Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.
SourceLocation string
The Cloud Storage bucket URI where the function source code is located.
WorkerPool string
Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.
baseImage String
The base image used to build the function.
enableAutomaticUpdates Boolean
Sets whether the function will receive automatic base image updates.
environmentVariables Map<String,String>
User-provided build-time environment variables for the function.
functionTarget String
The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".
imageUri String
Artifact Registry URI to store the built image.
name String
(Output) The Cloud Build name of the latest successful deployment of the function.
serviceAccount String
Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.
sourceLocation String
The Cloud Storage bucket URI where the function source code is located.
workerPool String
Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.
baseImage string
The base image used to build the function.
enableAutomaticUpdates boolean
Sets whether the function will receive automatic base image updates.
environmentVariables {[key: string]: string}
User-provided build-time environment variables for the function.
functionTarget string
The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".
imageUri string
Artifact Registry URI to store the built image.
name string
(Output) The Cloud Build name of the latest successful deployment of the function.
serviceAccount string
Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.
sourceLocation string
The Cloud Storage bucket URI where the function source code is located.
workerPool string
Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.
base_image str
The base image used to build the function.
enable_automatic_updates bool
Sets whether the function will receive automatic base image updates.
environment_variables Mapping[str, str]
User-provided build-time environment variables for the function.
function_target str
The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".
image_uri str
Artifact Registry URI to store the built image.
name str
(Output) The Cloud Build name of the latest successful deployment of the function.
service_account str
Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.
source_location str
The Cloud Storage bucket URI where the function source code is located.
worker_pool str
Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.
baseImage String
The base image used to build the function.
enableAutomaticUpdates Boolean
Sets whether the function will receive automatic base image updates.
environmentVariables Map<String>
User-provided build-time environment variables for the function.
functionTarget String
The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".
imageUri String
Artifact Registry URI to store the built image.
name String
(Output) The Cloud Build name of the latest successful deployment of the function.
serviceAccount String
Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.
sourceLocation String
The Cloud Storage bucket URI where the function source code is located.
workerPool String
Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

ServiceCondition
, ServiceConditionArgs

ExecutionReason string
(Output) A reason for the execution condition.
LastTransitionTime string
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Message string
(Output) Human readable message indicating details about the current status.
Reason string
(Output) A common (service-level) reason for this condition.
RevisionReason string
(Output) A reason for the revision condition.
Severity string
(Output) How to interpret failures of this condition, one of Error, Warning, Info
State string
(Output) State of the condition.
Type string
(Output) The allocation type for this traffic target.
ExecutionReason string
(Output) A reason for the execution condition.
LastTransitionTime string
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Message string
(Output) Human readable message indicating details about the current status.
Reason string
(Output) A common (service-level) reason for this condition.
RevisionReason string
(Output) A reason for the revision condition.
Severity string
(Output) How to interpret failures of this condition, one of Error, Warning, Info
State string
(Output) State of the condition.
Type string
(Output) The allocation type for this traffic target.
executionReason String
(Output) A reason for the execution condition.
lastTransitionTime String
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message String
(Output) Human readable message indicating details about the current status.
reason String
(Output) A common (service-level) reason for this condition.
revisionReason String
(Output) A reason for the revision condition.
severity String
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state String
(Output) State of the condition.
type String
(Output) The allocation type for this traffic target.
executionReason string
(Output) A reason for the execution condition.
lastTransitionTime string
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message string
(Output) Human readable message indicating details about the current status.
reason string
(Output) A common (service-level) reason for this condition.
revisionReason string
(Output) A reason for the revision condition.
severity string
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state string
(Output) State of the condition.
type string
(Output) The allocation type for this traffic target.
execution_reason str
(Output) A reason for the execution condition.
last_transition_time str
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message str
(Output) Human readable message indicating details about the current status.
reason str
(Output) A common (service-level) reason for this condition.
revision_reason str
(Output) A reason for the revision condition.
severity str
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state str
(Output) State of the condition.
type str
(Output) The allocation type for this traffic target.
executionReason String
(Output) A reason for the execution condition.
lastTransitionTime String
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message String
(Output) Human readable message indicating details about the current status.
reason String
(Output) A common (service-level) reason for this condition.
revisionReason String
(Output) A reason for the revision condition.
severity String
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state String
(Output) State of the condition.
type String
(Output) The allocation type for this traffic target.

ServiceScaling
, ServiceScalingArgs

MinInstanceCount int
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
MinInstanceCount int
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
minInstanceCount Integer
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
minInstanceCount number
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
min_instance_count int
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
minInstanceCount Number
Minimum number of instances for the service, to be divided among all revisions receiving traffic.

ServiceTemplate
, ServiceTemplateArgs

Annotations Dictionary<string, string>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.
Containers List<ServiceTemplateContainer>
Holds the containers that define the unit of execution for this Service. Structure is documented below.
EncryptionKey string
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
ExecutionEnvironment string
The sandbox environment to host this Revision. Possible values are: EXECUTION_ENVIRONMENT_GEN1, EXECUTION_ENVIRONMENT_GEN2.
GpuZonalRedundancyDisabled bool
True if GPU zonal redundancy is disabled on this revision.
Labels Dictionary<string, string>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.
MaxInstanceRequestConcurrency int
Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1.
NodeSelector ServiceTemplateNodeSelector
Node Selector describes the hardware requirements of the resources. Structure is documented below.
Revision string
The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
Scaling ServiceTemplateScaling
Scaling settings for this Revision. Structure is documented below.
ServiceAccount string
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.
ServiceMesh ServiceTemplateServiceMesh
Enables Cloud Service Mesh for this Revision. Structure is documented below.
SessionAffinity bool
Enables session affinity. For more information, go to https://cloud.google.com/run/docs/configuring/session-affinity
Timeout string
Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
Volumes List<ServiceTemplateVolume>
A list of Volumes to make available to containers. Structure is documented below.
VpcAccess ServiceTemplateVpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Structure is documented below.
Annotations map[string]string
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.
Containers []ServiceTemplateContainer
Holds the containers that define the unit of execution for this Service. Structure is documented below.
EncryptionKey string
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
ExecutionEnvironment string
The sandbox environment to host this Revision. Possible values are: EXECUTION_ENVIRONMENT_GEN1, EXECUTION_ENVIRONMENT_GEN2.
GpuZonalRedundancyDisabled bool
True if GPU zonal redundancy is disabled on this revision.
Labels map[string]string
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.
MaxInstanceRequestConcurrency int
Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1.
NodeSelector ServiceTemplateNodeSelector
Node Selector describes the hardware requirements of the resources. Structure is documented below.
Revision string
The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
Scaling ServiceTemplateScaling
Scaling settings for this Revision. Structure is documented below.
ServiceAccount string
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.
ServiceMesh ServiceTemplateServiceMesh
Enables Cloud Service Mesh for this Revision. Structure is documented below.
SessionAffinity bool
Enables session affinity. For more information, go to https://cloud.google.com/run/docs/configuring/session-affinity
Timeout string
Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
Volumes []ServiceTemplateVolume
A list of Volumes to make available to containers. Structure is documented below.
VpcAccess ServiceTemplateVpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Structure is documented below.
annotations Map<String,String>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.
containers List<ServiceTemplateContainer>
Holds the containers that define the unit of execution for this Service. Structure is documented below.
encryptionKey String
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
executionEnvironment String
The sandbox environment to host this Revision. Possible values are: EXECUTION_ENVIRONMENT_GEN1, EXECUTION_ENVIRONMENT_GEN2.
gpuZonalRedundancyDisabled Boolean
True if GPU zonal redundancy is disabled on this revision.
labels Map<String,String>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.
maxInstanceRequestConcurrency Integer
Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1.
nodeSelector ServiceTemplateNodeSelector
Node Selector describes the hardware requirements of the resources. Structure is documented below.
revision String
The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
scaling ServiceTemplateScaling
Scaling settings for this Revision. Structure is documented below.
serviceAccount String
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.
serviceMesh ServiceTemplateServiceMesh
Enables Cloud Service Mesh for this Revision. Structure is documented below.
sessionAffinity Boolean
Enables session affinity. For more information, go to https://cloud.google.com/run/docs/configuring/session-affinity
timeout String
Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
volumes List<ServiceTemplateVolume>
A list of Volumes to make available to containers. Structure is documented below.
vpcAccess ServiceTemplateVpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Structure is documented below.
annotations {[key: string]: string}
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.
containers ServiceTemplateContainer[]
Holds the containers that define the unit of execution for this Service. Structure is documented below.
encryptionKey string
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
executionEnvironment string
The sandbox environment to host this Revision. Possible values are: EXECUTION_ENVIRONMENT_GEN1, EXECUTION_ENVIRONMENT_GEN2.
gpuZonalRedundancyDisabled boolean
True if GPU zonal redundancy is disabled on this revision.
labels {[key: string]: string}
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.
maxInstanceRequestConcurrency number
Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1.
nodeSelector ServiceTemplateNodeSelector
Node Selector describes the hardware requirements of the resources. Structure is documented below.
revision string
The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
scaling ServiceTemplateScaling
Scaling settings for this Revision. Structure is documented below.
serviceAccount string
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.
serviceMesh ServiceTemplateServiceMesh
Enables Cloud Service Mesh for this Revision. Structure is documented below.
sessionAffinity boolean
Enables session affinity. For more information, go to https://cloud.google.com/run/docs/configuring/session-affinity
timeout string
Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
volumes ServiceTemplateVolume[]
A list of Volumes to make available to containers. Structure is documented below.
vpcAccess ServiceTemplateVpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Structure is documented below.
annotations Mapping[str, str]
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.
containers Sequence[ServiceTemplateContainer]
Holds the containers that define the unit of execution for this Service. Structure is documented below.
encryption_key str
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
execution_environment str
The sandbox environment to host this Revision. Possible values are: EXECUTION_ENVIRONMENT_GEN1, EXECUTION_ENVIRONMENT_GEN2.
gpu_zonal_redundancy_disabled bool
True if GPU zonal redundancy is disabled on this revision.
labels Mapping[str, str]
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.
max_instance_request_concurrency int
Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1.
node_selector ServiceTemplateNodeSelector
Node Selector describes the hardware requirements of the resources. Structure is documented below.
revision str
The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
scaling ServiceTemplateScaling
Scaling settings for this Revision. Structure is documented below.
service_account str
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.
service_mesh ServiceTemplateServiceMesh
Enables Cloud Service Mesh for this Revision. Structure is documented below.
session_affinity bool
Enables session affinity. For more information, go to https://cloud.google.com/run/docs/configuring/session-affinity
timeout str
Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
volumes Sequence[ServiceTemplateVolume]
A list of Volumes to make available to containers. Structure is documented below.
vpc_access ServiceTemplateVpcAccess
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Structure is documented below.
annotations Map<String>
Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.
containers List<Property Map>
Holds the containers that define the unit of execution for this Service. Structure is documented below.
encryptionKey String
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
executionEnvironment String
The sandbox environment to host this Revision. Possible values are: EXECUTION_ENVIRONMENT_GEN1, EXECUTION_ENVIRONMENT_GEN2.
gpuZonalRedundancyDisabled Boolean
True if GPU zonal redundancy is disabled on this revision.
labels Map<String>
Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.
maxInstanceRequestConcurrency Number
Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1.
nodeSelector Property Map
Node Selector describes the hardware requirements of the resources. Structure is documented below.
revision String
The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
scaling Property Map
Scaling settings for this Revision. Structure is documented below.
serviceAccount String
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.
serviceMesh Property Map
Enables Cloud Service Mesh for this Revision. Structure is documented below.
sessionAffinity Boolean
Enables session affinity. For more information, go to https://cloud.google.com/run/docs/configuring/session-affinity
timeout String
Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
volumes List<Property Map>
A list of Volumes to make available to containers. Structure is documented below.
vpcAccess Property Map
VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Structure is documented below.

ServiceTemplateContainer
, ServiceTemplateContainerArgs

Image This property is required. string
URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
Args List<string>
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
BaseImageUri string
Base image for this container. If set, it indicates that the service is enrolled into automatic base image update.
BuildInfos List<ServiceTemplateContainerBuildInfo>
(Output) The build info of the container image. Structure is documented below.
Commands List<string>
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
DependsOns List<string>
Containers which should be started before this container. If specified the container will wait to start until all containers with the listed names are healthy.
Envs List<ServiceTemplateContainerEnv>
List of environment variables to set in the container. Structure is documented below.
LivenessProbe ServiceTemplateContainerLivenessProbe
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.
Name string
Name of the container specified as a DNS_LABEL.
Ports ServiceTemplateContainerPorts
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on Structure is documented below.
Resources ServiceTemplateContainerResources
Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.
StartupProbe ServiceTemplateContainerStartupProbe
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.
VolumeMounts List<ServiceTemplateContainerVolumeMount>
Volume to mount into the container's filesystem. Structure is documented below.
WorkingDir string
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
Image This property is required. string
URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
Args []string
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
BaseImageUri string
Base image for this container. If set, it indicates that the service is enrolled into automatic base image update.
BuildInfos []ServiceTemplateContainerBuildInfo
(Output) The build info of the container image. Structure is documented below.
Commands []string
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
DependsOns []string
Containers which should be started before this container. If specified the container will wait to start until all containers with the listed names are healthy.
Envs []ServiceTemplateContainerEnv
List of environment variables to set in the container. Structure is documented below.
LivenessProbe ServiceTemplateContainerLivenessProbe
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.
Name string
Name of the container specified as a DNS_LABEL.
Ports ServiceTemplateContainerPorts
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on Structure is documented below.
Resources ServiceTemplateContainerResources
Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.
StartupProbe ServiceTemplateContainerStartupProbe
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.
VolumeMounts []ServiceTemplateContainerVolumeMount
Volume to mount into the container's filesystem. Structure is documented below.
WorkingDir string
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
image This property is required. String
URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
args List<String>
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
baseImageUri String
Base image for this container. If set, it indicates that the service is enrolled into automatic base image update.
buildInfos List<ServiceTemplateContainerBuildInfo>
(Output) The build info of the container image. Structure is documented below.
commands List<String>
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
dependsOns List<String>
Containers which should be started before this container. If specified the container will wait to start until all containers with the listed names are healthy.
envs List<ServiceTemplateContainerEnv>
List of environment variables to set in the container. Structure is documented below.
livenessProbe ServiceTemplateContainerLivenessProbe
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.
name String
Name of the container specified as a DNS_LABEL.
ports ServiceTemplateContainerPorts
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on Structure is documented below.
resources ServiceTemplateContainerResources
Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.
startupProbe ServiceTemplateContainerStartupProbe
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.
volumeMounts List<ServiceTemplateContainerVolumeMount>
Volume to mount into the container's filesystem. Structure is documented below.
workingDir String
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
image This property is required. string
URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
args string[]
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
baseImageUri string
Base image for this container. If set, it indicates that the service is enrolled into automatic base image update.
buildInfos ServiceTemplateContainerBuildInfo[]
(Output) The build info of the container image. Structure is documented below.
commands string[]
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
dependsOns string[]
Containers which should be started before this container. If specified the container will wait to start until all containers with the listed names are healthy.
envs ServiceTemplateContainerEnv[]
List of environment variables to set in the container. Structure is documented below.
livenessProbe ServiceTemplateContainerLivenessProbe
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.
name string
Name of the container specified as a DNS_LABEL.
ports ServiceTemplateContainerPorts
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on Structure is documented below.
resources ServiceTemplateContainerResources
Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.
startupProbe ServiceTemplateContainerStartupProbe
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.
volumeMounts ServiceTemplateContainerVolumeMount[]
Volume to mount into the container's filesystem. Structure is documented below.
workingDir string
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
image This property is required. str
URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
args Sequence[str]
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
base_image_uri str
Base image for this container. If set, it indicates that the service is enrolled into automatic base image update.
build_infos Sequence[ServiceTemplateContainerBuildInfo]
(Output) The build info of the container image. Structure is documented below.
commands Sequence[str]
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
depends_ons Sequence[str]
Containers which should be started before this container. If specified the container will wait to start until all containers with the listed names are healthy.
envs Sequence[ServiceTemplateContainerEnv]
List of environment variables to set in the container. Structure is documented below.
liveness_probe ServiceTemplateContainerLivenessProbe
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.
name str
Name of the container specified as a DNS_LABEL.
ports ServiceTemplateContainerPorts
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on Structure is documented below.
resources ServiceTemplateContainerResources
Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.
startup_probe ServiceTemplateContainerStartupProbe
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.
volume_mounts Sequence[ServiceTemplateContainerVolumeMount]
Volume to mount into the container's filesystem. Structure is documented below.
working_dir str
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
image This property is required. String
URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
args List<String>
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
baseImageUri String
Base image for this container. If set, it indicates that the service is enrolled into automatic base image update.
buildInfos List<Property Map>
(Output) The build info of the container image. Structure is documented below.
commands List<String>
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
dependsOns List<String>
Containers which should be started before this container. If specified the container will wait to start until all containers with the listed names are healthy.
envs List<Property Map>
List of environment variables to set in the container. Structure is documented below.
livenessProbe Property Map
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.
name String
Name of the container specified as a DNS_LABEL.
ports Property Map
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on Structure is documented below.
resources Property Map
Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources Structure is documented below.
startupProbe Property Map
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.
volumeMounts List<Property Map>
Volume to mount into the container's filesystem. Structure is documented below.
workingDir String
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

ServiceTemplateContainerBuildInfo
, ServiceTemplateContainerBuildInfoArgs

FunctionTarget string
Entry point of the function when the image is a Cloud Run function.
SourceLocation string
Source code location of the image.
FunctionTarget string
Entry point of the function when the image is a Cloud Run function.
SourceLocation string
Source code location of the image.
functionTarget String
Entry point of the function when the image is a Cloud Run function.
sourceLocation String
Source code location of the image.
functionTarget string
Entry point of the function when the image is a Cloud Run function.
sourceLocation string
Source code location of the image.
function_target str
Entry point of the function when the image is a Cloud Run function.
source_location str
Source code location of the image.
functionTarget String
Entry point of the function when the image is a Cloud Run function.
sourceLocation String
Source code location of the image.

ServiceTemplateContainerEnv
, ServiceTemplateContainerEnvArgs

Name This property is required. string
Name of the environment variable. Must be a C_IDENTIFIER, and may not exceed 32768 characters.
Value string
Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.
ValueSource ServiceTemplateContainerEnvValueSource
Source for the environment variable's value. Structure is documented below.
Name This property is required. string
Name of the environment variable. Must be a C_IDENTIFIER, and may not exceed 32768 characters.
Value string
Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.
ValueSource ServiceTemplateContainerEnvValueSource
Source for the environment variable's value. Structure is documented below.
name This property is required. String
Name of the environment variable. Must be a C_IDENTIFIER, and may not exceed 32768 characters.
value String
Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.
valueSource ServiceTemplateContainerEnvValueSource
Source for the environment variable's value. Structure is documented below.
name This property is required. string
Name of the environment variable. Must be a C_IDENTIFIER, and may not exceed 32768 characters.
value string
Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.
valueSource ServiceTemplateContainerEnvValueSource
Source for the environment variable's value. Structure is documented below.
name This property is required. str
Name of the environment variable. Must be a C_IDENTIFIER, and may not exceed 32768 characters.
value str
Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.
value_source ServiceTemplateContainerEnvValueSource
Source for the environment variable's value. Structure is documented below.
name This property is required. String
Name of the environment variable. Must be a C_IDENTIFIER, and may not exceed 32768 characters.
value String
Literal value of the environment variable. Defaults to "" and the maximum allowed length is 32768 characters. Variable references are not supported in Cloud Run.
valueSource Property Map
Source for the environment variable's value. Structure is documented below.

ServiceTemplateContainerEnvValueSource
, ServiceTemplateContainerEnvValueSourceArgs

SecretKeyRef ServiceTemplateContainerEnvValueSourceSecretKeyRef
Selects a secret and a specific version from Cloud Secret Manager. Structure is documented below.
SecretKeyRef ServiceTemplateContainerEnvValueSourceSecretKeyRef
Selects a secret and a specific version from Cloud Secret Manager. Structure is documented below.
secretKeyRef ServiceTemplateContainerEnvValueSourceSecretKeyRef
Selects a secret and a specific version from Cloud Secret Manager. Structure is documented below.
secretKeyRef ServiceTemplateContainerEnvValueSourceSecretKeyRef
Selects a secret and a specific version from Cloud Secret Manager. Structure is documented below.
secret_key_ref ServiceTemplateContainerEnvValueSourceSecretKeyRef
Selects a secret and a specific version from Cloud Secret Manager. Structure is documented below.
secretKeyRef Property Map
Selects a secret and a specific version from Cloud Secret Manager. Structure is documented below.

ServiceTemplateContainerEnvValueSourceSecretKeyRef
, ServiceTemplateContainerEnvValueSourceSecretKeyRefArgs

Secret This property is required. string
The name of the secret in Cloud Secret Manager. Format: {secretName} if the secret is in the same project. projects/{project}/secrets/{secretName} if the secret is in a different project.
Version string
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version.
Secret This property is required. string
The name of the secret in Cloud Secret Manager. Format: {secretName} if the secret is in the same project. projects/{project}/secrets/{secretName} if the secret is in a different project.
Version string
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version.
secret This property is required. String
The name of the secret in Cloud Secret Manager. Format: {secretName} if the secret is in the same project. projects/{project}/secrets/{secretName} if the secret is in a different project.
version String
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version.
secret This property is required. string
The name of the secret in Cloud Secret Manager. Format: {secretName} if the secret is in the same project. projects/{project}/secrets/{secretName} if the secret is in a different project.
version string
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version.
secret This property is required. str
The name of the secret in Cloud Secret Manager. Format: {secretName} if the secret is in the same project. projects/{project}/secrets/{secretName} if the secret is in a different project.
version str
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version.
secret This property is required. String
The name of the secret in Cloud Secret Manager. Format: {secretName} if the secret is in the same project. projects/{project}/secrets/{secretName} if the secret is in a different project.
version String
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version.

ServiceTemplateContainerLivenessProbe
, ServiceTemplateContainerLivenessProbeArgs

FailureThreshold int
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
Grpc ServiceTemplateContainerLivenessProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
HttpGet ServiceTemplateContainerLivenessProbeHttpGet
HTTPGet specifies the http request to perform. Structure is documented below.
InitialDelaySeconds int
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
PeriodSeconds int
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
TcpSocket ServiceTemplateContainerLivenessProbeTcpSocket
TCPSocketAction describes an action based on opening a socket Structure is documented below.
TimeoutSeconds int
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
FailureThreshold int
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
Grpc ServiceTemplateContainerLivenessProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
HttpGet ServiceTemplateContainerLivenessProbeHttpGet
HTTPGet specifies the http request to perform. Structure is documented below.
InitialDelaySeconds int
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
PeriodSeconds int
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
TcpSocket ServiceTemplateContainerLivenessProbeTcpSocket
TCPSocketAction describes an action based on opening a socket Structure is documented below.
TimeoutSeconds int
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failureThreshold Integer
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc ServiceTemplateContainerLivenessProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
httpGet ServiceTemplateContainerLivenessProbeHttpGet
HTTPGet specifies the http request to perform. Structure is documented below.
initialDelaySeconds Integer
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
periodSeconds Integer
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcpSocket ServiceTemplateContainerLivenessProbeTcpSocket
TCPSocketAction describes an action based on opening a socket Structure is documented below.
timeoutSeconds Integer
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failureThreshold number
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc ServiceTemplateContainerLivenessProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
httpGet ServiceTemplateContainerLivenessProbeHttpGet
HTTPGet specifies the http request to perform. Structure is documented below.
initialDelaySeconds number
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
periodSeconds number
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcpSocket ServiceTemplateContainerLivenessProbeTcpSocket
TCPSocketAction describes an action based on opening a socket Structure is documented below.
timeoutSeconds number
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failure_threshold int
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc ServiceTemplateContainerLivenessProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
http_get ServiceTemplateContainerLivenessProbeHttpGet
HTTPGet specifies the http request to perform. Structure is documented below.
initial_delay_seconds int
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_seconds int
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcp_socket ServiceTemplateContainerLivenessProbeTcpSocket
TCPSocketAction describes an action based on opening a socket Structure is documented below.
timeout_seconds int
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failureThreshold Number
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc Property Map
GRPC specifies an action involving a GRPC port. Structure is documented below.
httpGet Property Map
HTTPGet specifies the http request to perform. Structure is documented below.
initialDelaySeconds Number
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
periodSeconds Number
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcpSocket Property Map
TCPSocketAction describes an action based on opening a socket Structure is documented below.
timeoutSeconds Number
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

ServiceTemplateContainerLivenessProbeGrpc
, ServiceTemplateContainerLivenessProbeGrpcArgs

Port int
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Service string

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 build_info block contains:

Port int
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Service string

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 build_info block contains:

port Integer
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service String

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 build_info block contains:

port number
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service string

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 build_info block contains:

port int
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service str

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 build_info block contains:

port Number
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service String

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 build_info block contains:

ServiceTemplateContainerLivenessProbeHttpGet
, ServiceTemplateContainerLivenessProbeHttpGetArgs

HttpHeaders List<ServiceTemplateContainerLivenessProbeHttpGetHttpHeader>
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
Path string
Path to access on the HTTP server. Defaults to '/'.
Port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
HttpHeaders []ServiceTemplateContainerLivenessProbeHttpGetHttpHeader
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
Path string
Path to access on the HTTP server. Defaults to '/'.
Port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
httpHeaders List<ServiceTemplateContainerLivenessProbeHttpGetHttpHeader>
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path String
Path to access on the HTTP server. Defaults to '/'.
port Integer
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
httpHeaders ServiceTemplateContainerLivenessProbeHttpGetHttpHeader[]
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path string
Path to access on the HTTP server. Defaults to '/'.
port number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
http_headers Sequence[ServiceTemplateContainerLivenessProbeHttpGetHttpHeader]
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path str
Path to access on the HTTP server. Defaults to '/'.
port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
httpHeaders List<Property Map>
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path String
Path to access on the HTTP server. Defaults to '/'.
port Number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.

ServiceTemplateContainerLivenessProbeHttpGetHttpHeader
, ServiceTemplateContainerLivenessProbeHttpGetHttpHeaderArgs

Name This property is required. string
The header field name
Value string
The header field value
Name This property is required. string
The header field name
Value string
The header field value
name This property is required. String
The header field name
value String
The header field value
name This property is required. string
The header field name
value string
The header field value
name This property is required. str
The header field name
value str
The header field value
name This property is required. String
The header field name
value String
The header field value

ServiceTemplateContainerLivenessProbeTcpSocket
, ServiceTemplateContainerLivenessProbeTcpSocketArgs

Port This property is required. int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Port This property is required. int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port This property is required. Integer
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port This property is required. number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port This property is required. int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port This property is required. Number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.

ServiceTemplateContainerPorts
, ServiceTemplateContainerPortsArgs

ContainerPort int
Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536.
Name string
If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".
ContainerPort int
Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536.
Name string
If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".
containerPort Integer
Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536.
name String
If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".
containerPort number
Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536.
name string
If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".
container_port int
Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536.
name str
If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".
containerPort Number
Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536.
name String
If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".

ServiceTemplateContainerResources
, ServiceTemplateContainerResourcesArgs

CpuIdle bool
Determines whether CPU is only allocated during requests. True by default if the parent resources field is not set. However, if resources is set, this field must be explicitly set to true to preserve the default behavior.
Limits Dictionary<string, string>
Only memory, CPU, and nvidia.com/gpu are supported. Use key cpu for CPU limit, memory for memory limit, nvidia.com/gpu for gpu limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. 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
StartupCpuBoost bool
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
CpuIdle bool
Determines whether CPU is only allocated during requests. True by default if the parent resources field is not set. However, if resources is set, this field must be explicitly set to true to preserve the default behavior.
Limits map[string]string
Only memory, CPU, and nvidia.com/gpu are supported. Use key cpu for CPU limit, memory for memory limit, nvidia.com/gpu for gpu limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. 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
StartupCpuBoost bool
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
cpuIdle Boolean
Determines whether CPU is only allocated during requests. True by default if the parent resources field is not set. However, if resources is set, this field must be explicitly set to true to preserve the default behavior.
limits Map<String,String>
Only memory, CPU, and nvidia.com/gpu are supported. Use key cpu for CPU limit, memory for memory limit, nvidia.com/gpu for gpu limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. 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
startupCpuBoost Boolean
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
cpuIdle boolean
Determines whether CPU is only allocated during requests. True by default if the parent resources field is not set. However, if resources is set, this field must be explicitly set to true to preserve the default behavior.
limits {[key: string]: string}
Only memory, CPU, and nvidia.com/gpu are supported. Use key cpu for CPU limit, memory for memory limit, nvidia.com/gpu for gpu limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. 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
startupCpuBoost boolean
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
cpu_idle bool
Determines whether CPU is only allocated during requests. True by default if the parent resources field is not set. However, if resources is set, this field must be explicitly set to true to preserve the default behavior.
limits Mapping[str, str]
Only memory, CPU, and nvidia.com/gpu are supported. Use key cpu for CPU limit, memory for memory limit, nvidia.com/gpu for gpu limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. 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
startup_cpu_boost bool
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
cpuIdle Boolean
Determines whether CPU is only allocated during requests. True by default if the parent resources field is not set. However, if resources is set, this field must be explicitly set to true to preserve the default behavior.
limits Map<String>
Only memory, CPU, and nvidia.com/gpu are supported. Use key cpu for CPU limit, memory for memory limit, nvidia.com/gpu for gpu limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. 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
startupCpuBoost Boolean
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.

ServiceTemplateContainerStartupProbe
, ServiceTemplateContainerStartupProbeArgs

FailureThreshold int
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
Grpc ServiceTemplateContainerStartupProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
HttpGet ServiceTemplateContainerStartupProbeHttpGet
HTTPGet specifies the http request to perform. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
InitialDelaySeconds int
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
PeriodSeconds int
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
TcpSocket ServiceTemplateContainerStartupProbeTcpSocket
TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
TimeoutSeconds int
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
FailureThreshold int
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
Grpc ServiceTemplateContainerStartupProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
HttpGet ServiceTemplateContainerStartupProbeHttpGet
HTTPGet specifies the http request to perform. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
InitialDelaySeconds int
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
PeriodSeconds int
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
TcpSocket ServiceTemplateContainerStartupProbeTcpSocket
TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
TimeoutSeconds int
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failureThreshold Integer
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc ServiceTemplateContainerStartupProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
httpGet ServiceTemplateContainerStartupProbeHttpGet
HTTPGet specifies the http request to perform. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
initialDelaySeconds Integer
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
periodSeconds Integer
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcpSocket ServiceTemplateContainerStartupProbeTcpSocket
TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
timeoutSeconds Integer
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failureThreshold number
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc ServiceTemplateContainerStartupProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
httpGet ServiceTemplateContainerStartupProbeHttpGet
HTTPGet specifies the http request to perform. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
initialDelaySeconds number
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
periodSeconds number
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcpSocket ServiceTemplateContainerStartupProbeTcpSocket
TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
timeoutSeconds number
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failure_threshold int
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc ServiceTemplateContainerStartupProbeGrpc
GRPC specifies an action involving a GRPC port. Structure is documented below.
http_get ServiceTemplateContainerStartupProbeHttpGet
HTTPGet specifies the http request to perform. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
initial_delay_seconds int
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_seconds int
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcp_socket ServiceTemplateContainerStartupProbeTcpSocket
TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
timeout_seconds int
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
failureThreshold Number
Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
grpc Property Map
GRPC specifies an action involving a GRPC port. Structure is documented below.
httpGet Property Map
HTTPGet specifies the http request to perform. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
initialDelaySeconds Number
Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
periodSeconds Number
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeoutSeconds
tcpSocket Property Map
TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet or TCPSocket must be specified. Structure is documented below.
timeoutSeconds Number
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. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

ServiceTemplateContainerStartupProbeGrpc
, ServiceTemplateContainerStartupProbeGrpcArgs

Port int
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Service string

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 build_info block contains:

Port int
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Service string

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 build_info block contains:

port Integer
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service String

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 build_info block contains:

port number
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service string

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 build_info block contains:

port int
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service str

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 build_info block contains:

port Number
Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
service String

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 build_info block contains:

ServiceTemplateContainerStartupProbeHttpGet
, ServiceTemplateContainerStartupProbeHttpGetArgs

HttpHeaders List<ServiceTemplateContainerStartupProbeHttpGetHttpHeader>
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
Path string
Path to access on the HTTP server. Defaults to '/'.
Port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
HttpHeaders []ServiceTemplateContainerStartupProbeHttpGetHttpHeader
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
Path string
Path to access on the HTTP server. Defaults to '/'.
Port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
httpHeaders List<ServiceTemplateContainerStartupProbeHttpGetHttpHeader>
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path String
Path to access on the HTTP server. Defaults to '/'.
port Integer
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
httpHeaders ServiceTemplateContainerStartupProbeHttpGetHttpHeader[]
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path string
Path to access on the HTTP server. Defaults to '/'.
port number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
http_headers Sequence[ServiceTemplateContainerStartupProbeHttpGetHttpHeader]
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path str
Path to access on the HTTP server. Defaults to '/'.
port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
httpHeaders List<Property Map>
Custom headers to set in the request. HTTP allows repeated headers. Structure is documented below.
path String
Path to access on the HTTP server. Defaults to '/'.
port Number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.

ServiceTemplateContainerStartupProbeHttpGetHttpHeader
, ServiceTemplateContainerStartupProbeHttpGetHttpHeaderArgs

Name This property is required. string
The header field name
Value string
The header field value
Name This property is required. string
The header field name
Value string
The header field value
name This property is required. String
The header field name
value String
The header field value
name This property is required. string
The header field name
value string
The header field value
name This property is required. str
The header field name
value str
The header field value
name This property is required. String
The header field name
value String
The header field value

ServiceTemplateContainerStartupProbeTcpSocket
, ServiceTemplateContainerStartupProbeTcpSocketArgs

Port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
Port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port Integer
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port int
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.
port Number
Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort.

ServiceTemplateContainerVolumeMount
, ServiceTemplateContainerVolumeMountArgs

MountPath This property is required. string
Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be /cloudsql. All instances defined in the Volume will be available as /cloudsql/[instance]. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
Name This property is required. string
This must match the Name of a Volume.
MountPath This property is required. string
Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be /cloudsql. All instances defined in the Volume will be available as /cloudsql/[instance]. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
Name This property is required. string
This must match the Name of a Volume.
mountPath This property is required. String
Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be /cloudsql. All instances defined in the Volume will be available as /cloudsql/[instance]. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
name This property is required. String
This must match the Name of a Volume.
mountPath This property is required. string
Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be /cloudsql. All instances defined in the Volume will be available as /cloudsql/[instance]. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
name This property is required. string
This must match the Name of a Volume.
mount_path This property is required. str
Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be /cloudsql. All instances defined in the Volume will be available as /cloudsql/[instance]. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
name This property is required. str
This must match the Name of a Volume.
mountPath This property is required. String
Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be /cloudsql. All instances defined in the Volume will be available as /cloudsql/[instance]. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
name This property is required. String
This must match the Name of a Volume.

ServiceTemplateNodeSelector
, ServiceTemplateNodeSelectorArgs

Accelerator This property is required. string
The GPU to attach to an instance. See https://cloud.google.com/run/docs/configuring/services/gpu for configuring GPU.


Accelerator This property is required. string
The GPU to attach to an instance. See https://cloud.google.com/run/docs/configuring/services/gpu for configuring GPU.


accelerator This property is required. String
The GPU to attach to an instance. See https://cloud.google.com/run/docs/configuring/services/gpu for configuring GPU.


accelerator This property is required. string
The GPU to attach to an instance. See https://cloud.google.com/run/docs/configuring/services/gpu for configuring GPU.


accelerator This property is required. str
The GPU to attach to an instance. See https://cloud.google.com/run/docs/configuring/services/gpu for configuring GPU.


accelerator This property is required. String
The GPU to attach to an instance. See https://cloud.google.com/run/docs/configuring/services/gpu for configuring GPU.


ServiceTemplateScaling
, ServiceTemplateScalingArgs

MaxInstanceCount int
Maximum number of serving instances that this resource should have. Must not be less than minimum instance count. If absent, Cloud Run will calculate a default value based on the project's available container instances quota in the region and specified instance size.
MinInstanceCount int
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
MaxInstanceCount int
Maximum number of serving instances that this resource should have. Must not be less than minimum instance count. If absent, Cloud Run will calculate a default value based on the project's available container instances quota in the region and specified instance size.
MinInstanceCount int
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
maxInstanceCount Integer
Maximum number of serving instances that this resource should have. Must not be less than minimum instance count. If absent, Cloud Run will calculate a default value based on the project's available container instances quota in the region and specified instance size.
minInstanceCount Integer
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
maxInstanceCount number
Maximum number of serving instances that this resource should have. Must not be less than minimum instance count. If absent, Cloud Run will calculate a default value based on the project's available container instances quota in the region and specified instance size.
minInstanceCount number
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
max_instance_count int
Maximum number of serving instances that this resource should have. Must not be less than minimum instance count. If absent, Cloud Run will calculate a default value based on the project's available container instances quota in the region and specified instance size.
min_instance_count int
Minimum number of instances for the service, to be divided among all revisions receiving traffic.
maxInstanceCount Number
Maximum number of serving instances that this resource should have. Must not be less than minimum instance count. If absent, Cloud Run will calculate a default value based on the project's available container instances quota in the region and specified instance size.
minInstanceCount Number
Minimum number of instances for the service, to be divided among all revisions receiving traffic.

ServiceTemplateServiceMesh
, ServiceTemplateServiceMeshArgs

Mesh string
The Mesh resource name. For more information see https://cloud.google.com/service-mesh/docs/reference/network-services/rest/v1/projects.locations.meshes#resource:-mesh.
Mesh string
The Mesh resource name. For more information see https://cloud.google.com/service-mesh/docs/reference/network-services/rest/v1/projects.locations.meshes#resource:-mesh.
mesh String
The Mesh resource name. For more information see https://cloud.google.com/service-mesh/docs/reference/network-services/rest/v1/projects.locations.meshes#resource:-mesh.
mesh string
The Mesh resource name. For more information see https://cloud.google.com/service-mesh/docs/reference/network-services/rest/v1/projects.locations.meshes#resource:-mesh.
mesh str
The Mesh resource name. For more information see https://cloud.google.com/service-mesh/docs/reference/network-services/rest/v1/projects.locations.meshes#resource:-mesh.
mesh String
The Mesh resource name. For more information see https://cloud.google.com/service-mesh/docs/reference/network-services/rest/v1/projects.locations.meshes#resource:-mesh.

ServiceTemplateVolume
, ServiceTemplateVolumeArgs

Name This property is required. string
Volume's name.
CloudSqlInstance ServiceTemplateVolumeCloudSqlInstance
For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Structure is documented below.
EmptyDir ServiceTemplateVolumeEmptyDir
Ephemeral storage used as a shared volume. Structure is documented below.
Gcs ServiceTemplateVolumeGcs
Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. Structure is documented below.
Nfs ServiceTemplateVolumeNfs
Represents an NFS mount. Structure is documented below.
Secret ServiceTemplateVolumeSecret
Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret Structure is documented below.
Name This property is required. string
Volume's name.
CloudSqlInstance ServiceTemplateVolumeCloudSqlInstance
For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Structure is documented below.
EmptyDir ServiceTemplateVolumeEmptyDir
Ephemeral storage used as a shared volume. Structure is documented below.
Gcs ServiceTemplateVolumeGcs
Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. Structure is documented below.
Nfs ServiceTemplateVolumeNfs
Represents an NFS mount. Structure is documented below.
Secret ServiceTemplateVolumeSecret
Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret Structure is documented below.
name This property is required. String
Volume's name.
cloudSqlInstance ServiceTemplateVolumeCloudSqlInstance
For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Structure is documented below.
emptyDir ServiceTemplateVolumeEmptyDir
Ephemeral storage used as a shared volume. Structure is documented below.
gcs ServiceTemplateVolumeGcs
Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. Structure is documented below.
nfs ServiceTemplateVolumeNfs
Represents an NFS mount. Structure is documented below.
secret ServiceTemplateVolumeSecret
Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret Structure is documented below.
name This property is required. string
Volume's name.
cloudSqlInstance ServiceTemplateVolumeCloudSqlInstance
For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Structure is documented below.
emptyDir ServiceTemplateVolumeEmptyDir
Ephemeral storage used as a shared volume. Structure is documented below.
gcs ServiceTemplateVolumeGcs
Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. Structure is documented below.
nfs ServiceTemplateVolumeNfs
Represents an NFS mount. Structure is documented below.
secret ServiceTemplateVolumeSecret
Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret Structure is documented below.
name This property is required. str
Volume's name.
cloud_sql_instance ServiceTemplateVolumeCloudSqlInstance
For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Structure is documented below.
empty_dir ServiceTemplateVolumeEmptyDir
Ephemeral storage used as a shared volume. Structure is documented below.
gcs ServiceTemplateVolumeGcs
Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. Structure is documented below.
nfs ServiceTemplateVolumeNfs
Represents an NFS mount. Structure is documented below.
secret ServiceTemplateVolumeSecret
Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret Structure is documented below.
name This property is required. String
Volume's name.
cloudSqlInstance Property Map
For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Structure is documented below.
emptyDir Property Map
Ephemeral storage used as a shared volume. Structure is documented below.
gcs Property Map
Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. Structure is documented below.
nfs Property Map
Represents an NFS mount. Structure is documented below.
secret Property Map
Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret Structure is documented below.

ServiceTemplateVolumeCloudSqlInstance
, ServiceTemplateVolumeCloudSqlInstanceArgs

Instances List<string>
The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
Instances []string
The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
instances List<String>
The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
instances string[]
The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
instances Sequence[str]
The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
instances List<String>
The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

ServiceTemplateVolumeEmptyDir
, ServiceTemplateVolumeEmptyDirArgs

Medium string
The different types of medium supported for EmptyDir. Default value is MEMORY. Possible values are: MEMORY.
SizeLimit string
Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir.
Medium string
The different types of medium supported for EmptyDir. Default value is MEMORY. Possible values are: MEMORY.
SizeLimit string
Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir.
medium String
The different types of medium supported for EmptyDir. Default value is MEMORY. Possible values are: MEMORY.
sizeLimit String
Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir.
medium string
The different types of medium supported for EmptyDir. Default value is MEMORY. Possible values are: MEMORY.
sizeLimit string
Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir.
medium str
The different types of medium supported for EmptyDir. Default value is MEMORY. Possible values are: MEMORY.
size_limit str
Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir.
medium String
The different types of medium supported for EmptyDir. Default value is MEMORY. Possible values are: MEMORY.
sizeLimit String
Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir.

ServiceTemplateVolumeGcs
, ServiceTemplateVolumeGcsArgs

Bucket This property is required. string
GCS Bucket name
MountOptions List<string>
A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes.
ReadOnly bool
If true, mount the GCS bucket as read-only
Bucket This property is required. string
GCS Bucket name
MountOptions []string
A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes.
ReadOnly bool
If true, mount the GCS bucket as read-only
bucket This property is required. String
GCS Bucket name
mountOptions List<String>
A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes.
readOnly Boolean
If true, mount the GCS bucket as read-only
bucket This property is required. string
GCS Bucket name
mountOptions string[]
A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes.
readOnly boolean
If true, mount the GCS bucket as read-only
bucket This property is required. str
GCS Bucket name
mount_options Sequence[str]
A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes.
read_only bool
If true, mount the GCS bucket as read-only
bucket This property is required. String
GCS Bucket name
mountOptions List<String>
A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes.
readOnly Boolean
If true, mount the GCS bucket as read-only

ServiceTemplateVolumeNfs
, ServiceTemplateVolumeNfsArgs

Path This property is required. string
Path that is exported by the NFS server.
Server This property is required. string
Hostname or IP address of the NFS server
ReadOnly bool
If true, mount the NFS volume as read only
Path This property is required. string
Path that is exported by the NFS server.
Server This property is required. string
Hostname or IP address of the NFS server
ReadOnly bool
If true, mount the NFS volume as read only
path This property is required. String
Path that is exported by the NFS server.
server This property is required. String
Hostname or IP address of the NFS server
readOnly Boolean
If true, mount the NFS volume as read only
path This property is required. string
Path that is exported by the NFS server.
server This property is required. string
Hostname or IP address of the NFS server
readOnly boolean
If true, mount the NFS volume as read only
path This property is required. str
Path that is exported by the NFS server.
server This property is required. str
Hostname or IP address of the NFS server
read_only bool
If true, mount the NFS volume as read only
path This property is required. String
Path that is exported by the NFS server.
server This property is required. String
Hostname or IP address of the NFS server
readOnly Boolean
If true, mount the NFS volume as read only

ServiceTemplateVolumeSecret
, ServiceTemplateVolumeSecretArgs

Secret This property is required. string
The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.
DefaultMode int
Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting.
Items List<ServiceTemplateVolumeSecretItem>
If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. 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 path and a version. Structure is documented below.
Secret This property is required. string
The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.
DefaultMode int
Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting.
Items []ServiceTemplateVolumeSecretItem
If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. 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 path and a version. Structure is documented below.
secret This property is required. String
The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.
defaultMode Integer
Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting.
items List<ServiceTemplateVolumeSecretItem>
If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. 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 path and a version. Structure is documented below.
secret This property is required. string
The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.
defaultMode number
Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting.
items ServiceTemplateVolumeSecretItem[]
If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. 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 path and a version. Structure is documented below.
secret This property is required. str
The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.
default_mode int
Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting.
items Sequence[ServiceTemplateVolumeSecretItem]
If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. 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 path and a version. Structure is documented below.
secret This property is required. String
The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.
defaultMode Number
Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting.
items List<Property Map>
If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. 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 path and a version. Structure is documented below.

ServiceTemplateVolumeSecretItem
, ServiceTemplateVolumeSecretItemArgs

Path This property is required. string
The relative path of the secret in the container.
Mode int
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.
Version string
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version
Path This property is required. string
The relative path of the secret in the container.
Mode int
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.
Version string
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version
path This property is required. String
The relative path of the secret in the container.
mode Integer
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.
version String
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version
path This property is required. string
The relative path of the secret in the container.
mode number
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.
version string
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version
path This property is required. str
The relative path of the secret in the container.
mode int
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.
version str
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version
path This property is required. String
The relative path of the secret in the container.
mode Number
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used.
version String
The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version

ServiceTemplateVpcAccess
, ServiceTemplateVpcAccessArgs

Connector string
VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number.
Egress string
Traffic VPC egress settings. Possible values are: ALL_TRAFFIC, PRIVATE_RANGES_ONLY.
NetworkInterfaces List<ServiceTemplateVpcAccessNetworkInterface>
Direct VPC egress settings. Currently only single network interface is supported. Structure is documented below.
Connector string
VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number.
Egress string
Traffic VPC egress settings. Possible values are: ALL_TRAFFIC, PRIVATE_RANGES_ONLY.
NetworkInterfaces []ServiceTemplateVpcAccessNetworkInterface
Direct VPC egress settings. Currently only single network interface is supported. Structure is documented below.
connector String
VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number.
egress String
Traffic VPC egress settings. Possible values are: ALL_TRAFFIC, PRIVATE_RANGES_ONLY.
networkInterfaces List<ServiceTemplateVpcAccessNetworkInterface>
Direct VPC egress settings. Currently only single network interface is supported. Structure is documented below.
connector string
VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number.
egress string
Traffic VPC egress settings. Possible values are: ALL_TRAFFIC, PRIVATE_RANGES_ONLY.
networkInterfaces ServiceTemplateVpcAccessNetworkInterface[]
Direct VPC egress settings. Currently only single network interface is supported. Structure is documented below.
connector str
VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number.
egress str
Traffic VPC egress settings. Possible values are: ALL_TRAFFIC, PRIVATE_RANGES_ONLY.
network_interfaces Sequence[ServiceTemplateVpcAccessNetworkInterface]
Direct VPC egress settings. Currently only single network interface is supported. Structure is documented below.
connector String
VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number.
egress String
Traffic VPC egress settings. Possible values are: ALL_TRAFFIC, PRIVATE_RANGES_ONLY.
networkInterfaces List<Property Map>
Direct VPC egress settings. Currently only single network interface is supported. Structure is documented below.

ServiceTemplateVpcAccessNetworkInterface
, ServiceTemplateVpcAccessNetworkInterfaceArgs

Network string
The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.
Subnetwork string
The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.
Tags List<string>
Network tags applied to this Cloud Run service.
Network string
The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.
Subnetwork string
The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.
Tags []string
Network tags applied to this Cloud Run service.
network String
The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.
subnetwork String
The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.
tags List<String>
Network tags applied to this Cloud Run service.
network string
The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.
subnetwork string
The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.
tags string[]
Network tags applied to this Cloud Run service.
network str
The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.
subnetwork str
The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.
tags Sequence[str]
Network tags applied to this Cloud Run service.
network String
The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.
subnetwork String
The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.
tags List<String>
Network tags applied to this Cloud Run service.

ServiceTerminalCondition
, ServiceTerminalConditionArgs

ExecutionReason string
(Output) A reason for the execution condition.
LastTransitionTime string
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Message string
(Output) Human readable message indicating details about the current status.
Reason string
(Output) A common (service-level) reason for this condition.
RevisionReason string
(Output) A reason for the revision condition.
Severity string
(Output) How to interpret failures of this condition, one of Error, Warning, Info
State string
(Output) State of the condition.
Type string
(Output) The allocation type for this traffic target.
ExecutionReason string
(Output) A reason for the execution condition.
LastTransitionTime string
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
Message string
(Output) Human readable message indicating details about the current status.
Reason string
(Output) A common (service-level) reason for this condition.
RevisionReason string
(Output) A reason for the revision condition.
Severity string
(Output) How to interpret failures of this condition, one of Error, Warning, Info
State string
(Output) State of the condition.
Type string
(Output) The allocation type for this traffic target.
executionReason String
(Output) A reason for the execution condition.
lastTransitionTime String
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message String
(Output) Human readable message indicating details about the current status.
reason String
(Output) A common (service-level) reason for this condition.
revisionReason String
(Output) A reason for the revision condition.
severity String
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state String
(Output) State of the condition.
type String
(Output) The allocation type for this traffic target.
executionReason string
(Output) A reason for the execution condition.
lastTransitionTime string
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message string
(Output) Human readable message indicating details about the current status.
reason string
(Output) A common (service-level) reason for this condition.
revisionReason string
(Output) A reason for the revision condition.
severity string
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state string
(Output) State of the condition.
type string
(Output) The allocation type for this traffic target.
execution_reason str
(Output) A reason for the execution condition.
last_transition_time str
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message str
(Output) Human readable message indicating details about the current status.
reason str
(Output) A common (service-level) reason for this condition.
revision_reason str
(Output) A reason for the revision condition.
severity str
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state str
(Output) State of the condition.
type str
(Output) The allocation type for this traffic target.
executionReason String
(Output) A reason for the execution condition.
lastTransitionTime String
(Output) Last time the condition transitioned from one status to another. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
message String
(Output) Human readable message indicating details about the current status.
reason String
(Output) A common (service-level) reason for this condition.
revisionReason String
(Output) A reason for the revision condition.
severity String
(Output) How to interpret failures of this condition, one of Error, Warning, Info
state String
(Output) State of the condition.
type String
(Output) The allocation type for this traffic target.

ServiceTraffic
, ServiceTrafficArgs

Percent int
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
Revision string
Revision to which to send this portion of traffic, if traffic allocation is by revision.
Tag string
Indicates a string to be part of the URI to exclusively reference this target.
Type string
The allocation type for this traffic target. Possible values are: TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST, TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION.
Percent int
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
Revision string
Revision to which to send this portion of traffic, if traffic allocation is by revision.
Tag string
Indicates a string to be part of the URI to exclusively reference this target.
Type string
The allocation type for this traffic target. Possible values are: TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST, TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION.
percent Integer
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
revision String
Revision to which to send this portion of traffic, if traffic allocation is by revision.
tag String
Indicates a string to be part of the URI to exclusively reference this target.
type String
The allocation type for this traffic target. Possible values are: TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST, TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION.
percent number
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
revision string
Revision to which to send this portion of traffic, if traffic allocation is by revision.
tag string
Indicates a string to be part of the URI to exclusively reference this target.
type string
The allocation type for this traffic target. Possible values are: TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST, TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION.
percent int
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
revision str
Revision to which to send this portion of traffic, if traffic allocation is by revision.
tag str
Indicates a string to be part of the URI to exclusively reference this target.
type str
The allocation type for this traffic target. Possible values are: TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST, TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION.
percent Number
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
revision String
Revision to which to send this portion of traffic, if traffic allocation is by revision.
tag String
Indicates a string to be part of the URI to exclusively reference this target.
type String
The allocation type for this traffic target. Possible values are: TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST, TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION.

ServiceTrafficStatus
, ServiceTrafficStatusArgs

Percent int
(Output) Specifies percent of the traffic to this Revision.
Revision string
(Output) Revision to which this traffic is sent.
Tag string
(Output) Indicates the string used in the URI to exclusively reference this target.
Type string
(Output) The allocation type for this traffic target.
Uri string
(Output) Displays the target URI.
Percent int
(Output) Specifies percent of the traffic to this Revision.
Revision string
(Output) Revision to which this traffic is sent.
Tag string
(Output) Indicates the string used in the URI to exclusively reference this target.
Type string
(Output) The allocation type for this traffic target.
Uri string
(Output) Displays the target URI.
percent Integer
(Output) Specifies percent of the traffic to this Revision.
revision String
(Output) Revision to which this traffic is sent.
tag String
(Output) Indicates the string used in the URI to exclusively reference this target.
type String
(Output) The allocation type for this traffic target.
uri String
(Output) Displays the target URI.
percent number
(Output) Specifies percent of the traffic to this Revision.
revision string
(Output) Revision to which this traffic is sent.
tag string
(Output) Indicates the string used in the URI to exclusively reference this target.
type string
(Output) The allocation type for this traffic target.
uri string
(Output) Displays the target URI.
percent int
(Output) Specifies percent of the traffic to this Revision.
revision str
(Output) Revision to which this traffic is sent.
tag str
(Output) Indicates the string used in the URI to exclusively reference this target.
type str
(Output) The allocation type for this traffic target.
uri str
(Output) Displays the target URI.
percent Number
(Output) Specifies percent of the traffic to this Revision.
revision String
(Output) Revision to which this traffic is sent.
tag String
(Output) Indicates the string used in the URI to exclusively reference this target.
type String
(Output) The allocation type for this traffic target.
uri String
(Output) Displays the target URI.

Import

Service can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/services/{{name}}

  • {{project}}/{{location}}/{{name}}

  • {{location}}/{{name}}

When using the pulumi import command, Service can be imported using one of the formats above. For example:

$ pulumi import gcp:cloudrunv2/service:Service default projects/{{project}}/locations/{{location}}/services/{{name}}
Copy
$ pulumi import gcp:cloudrunv2/service:Service default {{project}}/{{location}}/{{name}}
Copy
$ pulumi import gcp:cloudrunv2/service:Service default {{location}}/{{name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.