import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Definition of custom Cloud Build WorkerPools for running jobs with custom configuration and custom networking. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const pool = new gcp.cloudbuild.WorkerPool("pool", { * name: "my-pool", * location: "europe-west1", * workerConfig: { * diskSizeGb: 100, * machineType: "e2-standard-4", * noExternalIp: false, * }, * }); * ``` * * ### Network Config * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const servicenetworking = new gcp.projects.Service("servicenetworking", {service: "servicenetworking.googleapis.com"}); * const network = new gcp.compute.Network("network", { * name: "my-network", * autoCreateSubnetworks: false, * }, { * dependsOn: [servicenetworking], * }); * const workerRange = new gcp.compute.GlobalAddress("worker_range", { * name: "worker-pool-range", * purpose: "VPC_PEERING", * addressType: "INTERNAL", * prefixLength: 16, * network: network.id, * }); * const workerPoolConn = new gcp.servicenetworking.Connection("worker_pool_conn", { * network: network.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [workerRange.name], * }, { * dependsOn: [servicenetworking], * }); * const pool = new gcp.cloudbuild.WorkerPool("pool", { * name: "my-pool", * location: "europe-west1", * workerConfig: { * diskSizeGb: 100, * machineType: "e2-standard-4", * noExternalIp: false, * }, * networkConfig: { * peeredNetwork: network.id, * peeredNetworkIpRange: "/29", * }, * }, { * dependsOn: [workerPoolConn], * }); * ``` * * ## 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:cloudbuild/workerPool:WorkerPool default projects/{{project}}/locations/{{location}}/workerPools/{{name}} * $ pulumi import gcp:cloudbuild/workerPool:WorkerPool default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:cloudbuild/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, 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; /** * User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations. * * **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>; /** * Output only. Time at which the request to create the `WorkerPool` was received. */ readonly createTime: pulumi.Output; /** * Output only. Time at which the request to delete the `WorkerPool` was received. */ readonly deleteTime: pulumi.Output; /** * A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters. */ readonly displayName: pulumi.Output; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ readonly effectiveAnnotations: pulumi.Output<{ [key: string]: string; }>; /** * The location for the resource */ readonly location: pulumi.Output; /** * User-defined name of the `WorkerPool`. * * * - - - */ readonly name: pulumi.Output; /** * Network configuration for the `WorkerPool`. Structure is documented below. */ readonly networkConfig: pulumi.Output; /** * Private Service Connect configuration for the pool. */ readonly privateServiceConnect: pulumi.Output; /** * The project for the resource */ readonly project: pulumi.Output; /** * Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED */ readonly state: pulumi.Output; /** * Output only. A unique identifier for the `WorkerPool`. */ readonly uid: pulumi.Output; /** * Output only. Time at which the request to update the `WorkerPool` was received. */ readonly updateTime: pulumi.Output; /** * Configuration to be used for a creating workers in the `WorkerPool`. Structure is documented below. */ readonly workerConfig: pulumi.Output; /** * 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 { /** * User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations. * * **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; }>; /** * Output only. Time at which the request to create the `WorkerPool` was received. */ createTime?: pulumi.Input; /** * Output only. Time at which the request to delete the `WorkerPool` was received. */ deleteTime?: pulumi.Input; /** * A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters. */ displayName?: pulumi.Input; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The location for the resource */ location?: pulumi.Input; /** * User-defined name of the `WorkerPool`. * * * - - - */ name?: pulumi.Input; /** * Network configuration for the `WorkerPool`. Structure is documented below. */ networkConfig?: pulumi.Input; /** * Private Service Connect configuration for the pool. */ privateServiceConnect?: pulumi.Input; /** * The project for the resource */ project?: pulumi.Input; /** * Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED */ state?: pulumi.Input; /** * Output only. A unique identifier for the `WorkerPool`. */ uid?: pulumi.Input; /** * Output only. Time at which the request to update the `WorkerPool` was received. */ updateTime?: pulumi.Input; /** * Configuration to be used for a creating workers in the `WorkerPool`. Structure is documented below. */ workerConfig?: pulumi.Input; } /** * The set of arguments for constructing a WorkerPool resource. */ export interface WorkerPoolArgs { /** * User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations. * * **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; }>; /** * A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters. */ displayName?: pulumi.Input; /** * The location for the resource */ location: pulumi.Input; /** * User-defined name of the `WorkerPool`. * * * - - - */ name?: pulumi.Input; /** * Network configuration for the `WorkerPool`. Structure is documented below. */ networkConfig?: pulumi.Input; /** * Private Service Connect configuration for the pool. */ privateServiceConnect?: pulumi.Input; /** * The project for the resource */ project?: pulumi.Input; /** * Configuration to be used for a creating workers in the `WorkerPool`. Structure is documented below. */ workerConfig?: pulumi.Input; }