import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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: * * * [API documentation](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services) * * How-to Guides * * [Official Documentation](https://cloud.google.com/run/docs/) * * ## Example Usage * * ### Cloudrunv2 Service Basic * * ```typescript * 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", * scaling: { * maxInstanceCount: 100, * }, * template: { * containers: [{ * image: "us-docker.pkg.dev/cloudrun/container/hello", * }], * }, * }); * ``` * ### Cloudrunv2 Service Limits * * ```typescript * 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: { * healthCheckDisabled: true, * containers: [{ * image: "us-docker.pkg.dev/cloudrun/container/hello", * resources: { * limits: { * cpu: "2", * memory: "1024Mi", * }, * }, * }], * }, * }); * ``` * ### Cloudrunv2 Service Sql * * ```typescript * 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", * scaling: { * maxInstanceCount: 2, * }, * template: { * 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], * }); * ``` * ### Cloudrunv2 Service Vpcaccess * * ```typescript * 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", * }, * }, * }); * ``` * ### Cloudrunv2 Service Directvpc * * ```typescript * 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", * ], * }], * }, * }, * }); * ``` * ### Cloudrunv2 Service Gpu * * ```typescript * 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", * scaling: { * maxInstanceCount: 1, * }, * 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, * }, * }); * ``` * ### Cloudrunv2 Service Probes * * ```typescript * 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: "/", * }, * }, * }], * }, * }); * ``` * ### Cloudrunv2 Service Secret * * ```typescript * 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], * }); * ``` * ### Cloudrunv2 Service Multicontainer * * ```typescript * 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", * }, * }], * }, * }); * ``` * ### Cloudrunv2 Service Mount Gcs * * ```typescript * 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, * }, * }], * }, * }); * ``` * ### Cloudrunv2 Service Mount Nfs * * ```typescript * 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, * }, * }], * }, * }); * ``` * ### Cloudrunv2 Service Mesh * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as time from "@pulumiverse/time"; * * const mesh = new gcp.networkservices.Mesh("mesh", {name: "network-services-mesh"}); * const waitForMesh = new time.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], * }); * ``` * ### Cloudrunv2 Service Invokeriam * * ```typescript * 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", * }], * }, * }); * ``` * ### Cloudrunv2 Service Function * * ```typescript * 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, * environmentVariables: { * FOO_KEY: "FOO_VALUE", * BAR_KEY: "BAR_VALUE", * }, * serviceAccount: cloudbuildServiceAccount.id, * }, * }, { * dependsOn: [ * actAs, * logsWriter, * ], * }); * ``` * ### Cloudrunv2 Service Iap * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.cloudrunv2.Service("default", { * name: "cloudrun-iap-service", * location: "us-central1", * deletionProtection: false, * ingress: "INGRESS_TRAFFIC_ALL", * launchStage: "BETA", * iapEnabled: true, * template: { * containers: [{ * image: "us-docker.pkg.dev/cloudrun/container/hello", * }], * }, * }); * ``` * * ## 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: * * ```sh * $ pulumi import gcp:cloudrunv2/service:Service default projects/{{project}}/locations/{{location}}/services/{{name}} * ``` * * ```sh * $ pulumi import gcp:cloudrunv2/service:Service default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:cloudrunv2/service:Service default {{location}}/{{name}} * ``` */ export declare class Service extends pulumi.CustomResource { /** * Get an existing Service resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ServiceState, opts?: pulumi.CustomResourceOptions): Service; /** * Returns true if the given object is an instance of Service. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Service; /** * 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 `effectiveAnnotations` for all of the annotations present on the resource. */ readonly annotations: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Settings for the Binary Authorization feature. * Structure is documented below. */ readonly binaryAuthorization: pulumi.Output; /** * Configuration for building a Cloud Run function. * Structure is documented below. */ readonly buildConfig: pulumi.Output; /** * Arbitrary identifier for the API client. */ readonly client: pulumi.Output; /** * Arbitrary version identifier for the API client. */ readonly clientVersion: pulumi.Output; /** * 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. */ readonly conditions: pulumi.Output; /** * The creation time. */ readonly createTime: pulumi.Output; /** * Email address of the authenticated creator. */ readonly creator: pulumi.Output; /** * 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. */ readonly customAudiences: pulumi.Output; /** * Disables public resolution of the default URI of this service. */ readonly defaultUriDisabled: pulumi.Output; /** * The deletion time. */ readonly deleteTime: pulumi.Output; readonly deletionProtection: pulumi.Output; /** * User-provided description of the Service. This field currently has a 512-character limit. */ readonly description: pulumi.Output; readonly effectiveAnnotations: pulumi.Output<{ [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. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. */ readonly etag: pulumi.Output; /** * For a deleted resource, the time after which it will be permanently deleted. */ readonly expireTime: pulumi.Output; /** * 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. */ readonly generation: pulumi.Output; /** * Used to enable/disable IAP for the service. */ readonly iapEnabled: pulumi.Output; /** * 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 are: `INGRESS_TRAFFIC_ALL`, `INGRESS_TRAFFIC_INTERNAL_ONLY`, `INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER`. */ readonly ingress: pulumi.Output; /** * 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. */ readonly invokerIamDisabled: pulumi.Output; /** * 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 `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Email address of the last authenticated modifier. */ readonly lastModifier: pulumi.Output; /** * Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run. */ readonly latestCreatedRevision: pulumi.Output; /** * Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. */ readonly latestReadyRevision: pulumi.Output; /** * The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/products#product-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 are: `UNIMPLEMENTED`, `PRELAUNCH`, `EARLY_ACCESS`, `ALPHA`, `BETA`, `GA`, `DEPRECATED`. */ readonly launchStage: pulumi.Output; /** * The location of the cloud run service */ readonly location: pulumi.Output; /** * Settings for creating a Multi-Region Service. Make sure to use region = 'global' when using them. For more information, visit https://cloud.google.com/run/docs/multiple-regions#deploy * Structure is documented below. */ readonly multiRegionSettings: pulumi.Output; /** * Name of the Service. */ readonly name: pulumi.Output; /** * 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. */ readonly observedGeneration: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * 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. */ readonly reconciling: pulumi.Output; /** * Scaling settings that apply to the whole service * Structure is documented below. */ readonly scaling: pulumi.Output; /** * The template used to create revisions for this Service. * Structure is documented below. */ readonly template: pulumi.Output; /** * 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. */ readonly terminalConditions: pulumi.Output; /** * Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. * Structure is documented below. */ readonly trafficStatuses: pulumi.Output; /** * 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. * Structure is documented below. */ readonly traffics: pulumi.Output; /** * Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. */ readonly uid: pulumi.Output; /** * The last-modified time. */ readonly updateTime: pulumi.Output; /** * (Output) * Displays the target URI. */ readonly uri: pulumi.Output; /** * All URLs serving traffic for this Service. */ readonly urls: pulumi.Output; /** * Create a Service resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ServiceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Service resources. */ export interface ServiceState { /** * 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 `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Settings for the Binary Authorization feature. * Structure is documented below. */ binaryAuthorization?: pulumi.Input; /** * Configuration for building a Cloud Run function. * Structure is documented below. */ buildConfig?: pulumi.Input; /** * Arbitrary identifier for the API client. */ client?: pulumi.Input; /** * Arbitrary version identifier for the API client. */ clientVersion?: pulumi.Input; /** * 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. */ conditions?: pulumi.Input[]>; /** * The creation time. */ createTime?: pulumi.Input; /** * Email address of the authenticated creator. */ creator?: pulumi.Input; /** * 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. */ customAudiences?: pulumi.Input[]>; /** * Disables public resolution of the default URI of this service. */ defaultUriDisabled?: pulumi.Input; /** * The deletion time. */ deleteTime?: pulumi.Input; deletionProtection?: pulumi.Input; /** * User-provided description of the Service. This field currently has a 512-character limit. */ description?: pulumi.Input; effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. */ etag?: pulumi.Input; /** * For a deleted resource, the time after which it will be permanently deleted. */ expireTime?: pulumi.Input; /** * 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. */ generation?: pulumi.Input; /** * Used to enable/disable IAP for the service. */ iapEnabled?: pulumi.Input; /** * 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 are: `INGRESS_TRAFFIC_ALL`, `INGRESS_TRAFFIC_INTERNAL_ONLY`, `INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER`. */ ingress?: pulumi.Input; /** * 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. */ invokerIamDisabled?: pulumi.Input; /** * 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 `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Email address of the last authenticated modifier. */ lastModifier?: pulumi.Input; /** * Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run. */ latestCreatedRevision?: pulumi.Input; /** * Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. */ latestReadyRevision?: pulumi.Input; /** * The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/products#product-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 are: `UNIMPLEMENTED`, `PRELAUNCH`, `EARLY_ACCESS`, `ALPHA`, `BETA`, `GA`, `DEPRECATED`. */ launchStage?: pulumi.Input; /** * The location of the cloud run service */ location?: pulumi.Input; /** * Settings for creating a Multi-Region Service. Make sure to use region = 'global' when using them. For more information, visit https://cloud.google.com/run/docs/multiple-regions#deploy * Structure is documented below. */ multiRegionSettings?: pulumi.Input; /** * Name of the Service. */ name?: pulumi.Input; /** * 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. */ observedGeneration?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * 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. */ reconciling?: pulumi.Input; /** * Scaling settings that apply to the whole service * Structure is documented below. */ scaling?: pulumi.Input; /** * The template used to create revisions for this Service. * Structure is documented below. */ template?: pulumi.Input; /** * 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. */ terminalConditions?: pulumi.Input[]>; /** * Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run. * Structure is documented below. */ trafficStatuses?: pulumi.Input[]>; /** * 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. * Structure is documented below. */ traffics?: pulumi.Input[]>; /** * Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. */ uid?: pulumi.Input; /** * The last-modified time. */ updateTime?: pulumi.Input; /** * (Output) * Displays the target URI. */ uri?: pulumi.Input; /** * All URLs serving traffic for this Service. */ urls?: pulumi.Input[]>; } /** * The set of arguments for constructing a Service resource. */ export interface ServiceArgs { /** * 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 `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Settings for the Binary Authorization feature. * Structure is documented below. */ binaryAuthorization?: pulumi.Input; /** * Configuration for building a Cloud Run function. * Structure is documented below. */ buildConfig?: pulumi.Input; /** * Arbitrary identifier for the API client. */ client?: pulumi.Input; /** * Arbitrary version identifier for the API client. */ clientVersion?: pulumi.Input; /** * 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. */ customAudiences?: pulumi.Input[]>; /** * Disables public resolution of the default URI of this service. */ defaultUriDisabled?: pulumi.Input; deletionProtection?: pulumi.Input; /** * User-provided description of the Service. This field currently has a 512-character limit. */ description?: pulumi.Input; /** * Used to enable/disable IAP for the service. */ iapEnabled?: pulumi.Input; /** * 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 are: `INGRESS_TRAFFIC_ALL`, `INGRESS_TRAFFIC_INTERNAL_ONLY`, `INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER`. */ ingress?: pulumi.Input; /** * 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. */ invokerIamDisabled?: pulumi.Input; /** * 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 `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/products#product-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 are: `UNIMPLEMENTED`, `PRELAUNCH`, `EARLY_ACCESS`, `ALPHA`, `BETA`, `GA`, `DEPRECATED`. */ launchStage?: pulumi.Input; /** * The location of the cloud run service */ location: pulumi.Input; /** * Settings for creating a Multi-Region Service. Make sure to use region = 'global' when using them. For more information, visit https://cloud.google.com/run/docs/multiple-regions#deploy * Structure is documented below. */ multiRegionSettings?: pulumi.Input; /** * Name of the Service. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Scaling settings that apply to the whole service * Structure is documented below. */ scaling?: pulumi.Input; /** * The template used to create revisions for this Service. * Structure is documented below. */ template: pulumi.Input; /** * 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. * Structure is documented below. */ traffics?: pulumi.Input[]>; }