@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
855 lines (854 loc) • 38.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* WorkerPool acts as a top-level container that manages a set of configurations and revision templates which implement a pull-based workload. WorkerPool 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 WorkerPool, see:
*
* * [API documentation](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.workerPools)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/run/docs/)
*
* ## Example Usage
*
* ### Cloudrunv2 Worker Pool Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* }],
* },
* });
* ```
* ### Cloudrunv2 Worker Pool Limits
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* resources: {
* limits: {
* cpu: "2",
* memory: "1024Mi",
* },
* },
* }],
* },
* });
* ```
* ### Cloudrunv2 Worker Pool 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.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* volumes: [{
* name: "cloudsql",
* cloudSqlInstance: {
* instances: [instance.connectionName],
* },
* }],
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* envs: [
* {
* name: "FOO",
* value: "bar",
* },
* {
* name: "SECRET_ENV_VAR",
* valueSource: {
* secretKeyRef: {
* secret: secret.secretId,
* version: "1",
* },
* },
* },
* ],
* volumeMounts: [{
* name: "cloudsql",
* mountPath: "/cloudsql",
* }],
* }],
* },
* instanceSplits: [{
* type: "INSTANCE_SPLIT_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 Worker Pool Directvpc
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* }],
* vpcAccess: {
* networkInterfaces: [{
* network: "default",
* subnetwork: "default",
* tags: [
* "tag1",
* "tag2",
* "tag3",
* ],
* }],
* },
* },
* });
* ```
* ### Cloudrunv2 Worker Pool Gpu
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* resources: {
* limits: {
* cpu: "4",
* memory: "16Gi",
* "nvidia.com/gpu": "1",
* },
* },
* }],
* nodeSelector: {
* accelerator: "nvidia-l4",
* },
* gpuZonalRedundancyDisabled: true,
* },
* });
* ```
* ### Cloudrunv2 Worker Pool 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.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* volumes: [{
* name: "a-volume",
* secret: {
* secret: secret.secretId,
* defaultMode: 292,
* items: [{
* version: "1",
* path: "my-secret",
* mode: 444,
* }],
* },
* }],
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* 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 Worker Pool Multicontainer
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* containers: [
* {
* name: "hello-1",
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* volumeMounts: [{
* name: "empty-dir-volume",
* mountPath: "/mnt",
* }],
* },
* {
* name: "hello-2",
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* },
* ],
* volumes: [{
* name: "empty-dir-volume",
* emptyDir: {
* medium: "MEMORY",
* sizeLimit: "256Mi",
* },
* }],
* },
* });
* ```
* ### Cloudrunv2 Worker Pool Mount Gcs
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const defaultBucket = new gcp.storage.Bucket("default", {
* name: "cloudrun-worker-pool",
* location: "US",
* uniformBucketLevelAccess: true,
* });
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* volumeMounts: [{
* name: "bucket",
* mountPath: "/var/www",
* }],
* }],
* volumes: [{
* name: "bucket",
* gcs: {
* bucket: defaultBucket.name,
* readOnly: false,
* },
* }],
* },
* });
* ```
* ### Cloudrunv2 Worker Pool Mount Nfs
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const defaultInstance = new gcp.filestore.Instance("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1-b",
* tier: "BASIC_HDD",
* fileShares: {
* capacityGb: 1024,
* name: "share1",
* },
* networks: [{
* network: "default",
* modes: ["MODE_IPV4"],
* }],
* });
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* template: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool: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 Worker Pool Custom Audiences
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.cloudrunv2.WorkerPool("default", {
* name: "cloudrun-worker-pool",
* location: "us-central1",
* deletionProtection: false,
* launchStage: "BETA",
* customAudiences: ["aud1"],
* template: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/worker-pool",
* }],
* },
* });
* ```
*
* ## Import
*
* WorkerPool can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/workerPools/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, WorkerPool can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:cloudrunv2/workerPool:WorkerPool default projects/{{project}}/locations/{{location}}/workerPools/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:cloudrunv2/workerPool:WorkerPool default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:cloudrunv2/workerPool:WorkerPool default {{location}}/{{name}}
* ```
*/
export declare class WorkerPool extends pulumi.CustomResource {
/**
* Get an existing WorkerPool 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<pulumi.ID>, state?: WorkerPoolState, opts?: pulumi.CustomResourceOptions): WorkerPool;
/**
* Returns true if the given object is an instance of WorkerPool. 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 WorkerPool;
/**
* 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 WorkerPool.
* 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<outputs.cloudrunv2.WorkerPoolBinaryAuthorization | undefined>;
/**
* Arbitrary identifier for the API client.
*/
readonly client: pulumi.Output<string | undefined>;
/**
* Arbitrary version identifier for the API client.
*/
readonly clientVersion: pulumi.Output<string | undefined>;
/**
* The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the WorkerPool 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<outputs.cloudrunv2.WorkerPoolCondition[]>;
/**
* The creation time.
*/
readonly createTime: pulumi.Output<string>;
/**
* Email address of the authenticated creator.
*/
readonly creator: pulumi.Output<string>;
/**
* One or more custom audiences that you want this worker pool 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<string[] | undefined>;
/**
* The deletion time.
*/
readonly deleteTime: pulumi.Output<string>;
readonly deletionProtection: pulumi.Output<boolean | undefined>;
/**
* User-provided description of the WorkerPool. This field currently has a 512-character limit.
*/
readonly description: pulumi.Output<string | undefined>;
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<string>;
/**
* For a deleted resource, the time after which it will be permanently deleted.
*/
readonly expireTime: pulumi.Output<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.
*/
readonly generation: pulumi.Output<string>;
/**
* Detailed status information for corresponding instance splits. See comments in reconciling for additional information on reconciliation process in Cloud Run.
* Structure is documented below.
*/
readonly instanceSplitStatuses: pulumi.Output<outputs.cloudrunv2.WorkerPoolInstanceSplitStatus[]>;
/**
* Specifies how to distribute instances over a collection of Revisions belonging to the WorkerPool. If instance split is empty or not provided, defaults to 100% instances assigned to the latest Ready Revision.
* Structure is documented below.
*/
readonly instanceSplits: pulumi.Output<outputs.cloudrunv2.WorkerPoolInstanceSplit[]>;
/**
* 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 WorkerPool.
* **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<string>;
/**
* Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
*/
readonly latestCreatedRevision: pulumi.Output<string>;
/**
* 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<string>;
/**
* 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<string>;
/**
* The location of the cloud run worker pool
*/
readonly location: pulumi.Output<string>;
/**
* Name of the WorkerPool.
*/
readonly name: pulumi.Output<string>;
/**
* The generation of this WorkerPool 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<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* 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 WorkerPool is currently being acted upon by the system to bring it into the desired state.
* When a new WorkerPool is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the WorkerPool 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 WorkerPool, 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 WorkerPools. Additional information on the failure can be found in terminalCondition and conditions.
*/
readonly reconciling: pulumi.Output<boolean>;
/**
* Scaling settings that apply to the worker pool.
* Structure is documented below.
*/
readonly scaling: pulumi.Output<outputs.cloudrunv2.WorkerPoolScaling>;
/**
* The template used to create revisions for this WorkerPool.
* Structure is documented below.
*/
readonly template: pulumi.Output<outputs.cloudrunv2.WorkerPoolTemplate>;
/**
* The Condition of this WorkerPool, 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<outputs.cloudrunv2.WorkerPoolTerminalCondition[]>;
/**
* 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<string>;
/**
* The last-modified time.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a WorkerPool 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: WorkerPoolArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering WorkerPool resources.
*/
export interface WorkerPoolState {
/**
* 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 WorkerPool.
* 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<string>;
}>;
/**
* Settings for the Binary Authorization feature.
* Structure is documented below.
*/
binaryAuthorization?: pulumi.Input<inputs.cloudrunv2.WorkerPoolBinaryAuthorization>;
/**
* Arbitrary identifier for the API client.
*/
client?: pulumi.Input<string>;
/**
* Arbitrary version identifier for the API client.
*/
clientVersion?: pulumi.Input<string>;
/**
* The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the WorkerPool 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<pulumi.Input<inputs.cloudrunv2.WorkerPoolCondition>[]>;
/**
* The creation time.
*/
createTime?: pulumi.Input<string>;
/**
* Email address of the authenticated creator.
*/
creator?: pulumi.Input<string>;
/**
* One or more custom audiences that you want this worker pool 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<pulumi.Input<string>[]>;
/**
* The deletion time.
*/
deleteTime?: pulumi.Input<string>;
deletionProtection?: pulumi.Input<boolean>;
/**
* User-provided description of the WorkerPool. This field currently has a 512-character limit.
*/
description?: pulumi.Input<string>;
effectiveAnnotations?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* 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<string>;
}>;
/**
* A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
*/
etag?: pulumi.Input<string>;
/**
* For a deleted resource, the time after which it will be permanently deleted.
*/
expireTime?: pulumi.Input<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.
*/
generation?: pulumi.Input<string>;
/**
* Detailed status information for corresponding instance splits. See comments in reconciling for additional information on reconciliation process in Cloud Run.
* Structure is documented below.
*/
instanceSplitStatuses?: pulumi.Input<pulumi.Input<inputs.cloudrunv2.WorkerPoolInstanceSplitStatus>[]>;
/**
* Specifies how to distribute instances over a collection of Revisions belonging to the WorkerPool. If instance split is empty or not provided, defaults to 100% instances assigned to the latest Ready Revision.
* Structure is documented below.
*/
instanceSplits?: pulumi.Input<pulumi.Input<inputs.cloudrunv2.WorkerPoolInstanceSplit>[]>;
/**
* 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 WorkerPool.
* **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<string>;
}>;
/**
* Email address of the last authenticated modifier.
*/
lastModifier?: pulumi.Input<string>;
/**
* Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.
*/
latestCreatedRevision?: pulumi.Input<string>;
/**
* 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<string>;
/**
* 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<string>;
/**
* The location of the cloud run worker pool
*/
location?: pulumi.Input<string>;
/**
* Name of the WorkerPool.
*/
name?: pulumi.Input<string>;
/**
* The generation of this WorkerPool 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<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Returns true if the WorkerPool is currently being acted upon by the system to bring it into the desired state.
* When a new WorkerPool is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the WorkerPool 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 WorkerPool, 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 WorkerPools. Additional information on the failure can be found in terminalCondition and conditions.
*/
reconciling?: pulumi.Input<boolean>;
/**
* Scaling settings that apply to the worker pool.
* Structure is documented below.
*/
scaling?: pulumi.Input<inputs.cloudrunv2.WorkerPoolScaling>;
/**
* The template used to create revisions for this WorkerPool.
* Structure is documented below.
*/
template?: pulumi.Input<inputs.cloudrunv2.WorkerPoolTemplate>;
/**
* The Condition of this WorkerPool, 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<pulumi.Input<inputs.cloudrunv2.WorkerPoolTerminalCondition>[]>;
/**
* 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<string>;
/**
* The last-modified time.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a WorkerPool resource.
*/
export interface WorkerPoolArgs {
/**
* 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 WorkerPool.
* 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<string>;
}>;
/**
* Settings for the Binary Authorization feature.
* Structure is documented below.
*/
binaryAuthorization?: pulumi.Input<inputs.cloudrunv2.WorkerPoolBinaryAuthorization>;
/**
* Arbitrary identifier for the API client.
*/
client?: pulumi.Input<string>;
/**
* Arbitrary version identifier for the API client.
*/
clientVersion?: pulumi.Input<string>;
/**
* One or more custom audiences that you want this worker pool 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<pulumi.Input<string>[]>;
deletionProtection?: pulumi.Input<boolean>;
/**
* User-provided description of the WorkerPool. This field currently has a 512-character limit.
*/
description?: pulumi.Input<string>;
/**
* Specifies how to distribute instances over a collection of Revisions belonging to the WorkerPool. If instance split is empty or not provided, defaults to 100% instances assigned to the latest Ready Revision.
* Structure is documented below.
*/
instanceSplits?: pulumi.Input<pulumi.Input<inputs.cloudrunv2.WorkerPoolInstanceSplit>[]>;
/**
* 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 WorkerPool.
* **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<string>;
}>;
/**
* 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<string>;
/**
* The location of the cloud run worker pool
*/
location: pulumi.Input<string>;
/**
* Name of the WorkerPool.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Scaling settings that apply to the worker pool.
* Structure is documented below.
*/
scaling?: pulumi.Input<inputs.cloudrunv2.WorkerPoolScaling>;
/**
* The template used to create revisions for this WorkerPool.
* Structure is documented below.
*/
template: pulumi.Input<inputs.cloudrunv2.WorkerPoolTemplate>;
}