import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A grouping of workstation configurations and the associated workstations in that region. * * > **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. * See Provider Versions for more details on beta resources. * * To get more information about WorkstationCluster, see: * * * [API documentation](https://cloud.google.com/workstations/docs/reference/rest/v1beta/projects.locations.workstationClusters/create) * * How-to Guides * * [Workstations](https://cloud.google.com/workstations/docs/) * * ## Example Usage * * ### Workstation Cluster Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const defaultNetwork = new gcp.compute.Network("default", { * name: "workstation-cluster", * autoCreateSubnetworks: false, * }); * const defaultSubnetwork = new gcp.compute.Subnetwork("default", { * name: "workstation-cluster", * ipCidrRange: "10.0.0.0/24", * region: "us-central1", * network: defaultNetwork.name, * }); * const _default = new gcp.workstations.WorkstationCluster("default", { * workstationClusterId: "workstation-cluster", * network: defaultNetwork.id, * subnetwork: defaultSubnetwork.id, * location: "us-central1", * labels: { * label: "key", * }, * annotations: { * "label-one": "value-one", * }, * }); * const project = gcp.organizations.getProject({}); * ``` * ### Workstation Cluster Private * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const defaultNetwork = new gcp.compute.Network("default", { * name: "workstation-cluster-private", * autoCreateSubnetworks: false, * }); * const defaultSubnetwork = new gcp.compute.Subnetwork("default", { * name: "workstation-cluster-private", * ipCidrRange: "10.0.0.0/24", * region: "us-central1", * network: defaultNetwork.name, * }); * const _default = new gcp.workstations.WorkstationCluster("default", { * workstationClusterId: "workstation-cluster-private", * network: defaultNetwork.id, * subnetwork: defaultSubnetwork.id, * location: "us-central1", * privateClusterConfig: { * enablePrivateEndpoint: true, * }, * labels: { * label: "key", * }, * annotations: { * "label-one": "value-one", * }, * }); * const project = gcp.organizations.getProject({}); * ``` * ### Workstation Cluster Custom Domain * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const defaultNetwork = new gcp.compute.Network("default", { * name: "workstation-cluster-custom-domain", * autoCreateSubnetworks: false, * }); * const defaultSubnetwork = new gcp.compute.Subnetwork("default", { * name: "workstation-cluster-custom-domain", * ipCidrRange: "10.0.0.0/24", * region: "us-central1", * network: defaultNetwork.name, * }); * const _default = new gcp.workstations.WorkstationCluster("default", { * workstationClusterId: "workstation-cluster-custom-domain", * network: defaultNetwork.id, * subnetwork: defaultSubnetwork.id, * location: "us-central1", * privateClusterConfig: { * enablePrivateEndpoint: true, * }, * domainConfig: { * domain: "workstations.example.com", * }, * labels: { * label: "key", * }, * annotations: { * "label-one": "value-one", * }, * }); * const project = gcp.organizations.getProject({}); * ``` * ### Workstation Cluster Tags * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const tagKey = new gcp.tags.TagKey("tag_key", { * parent: project.then(project => `projects/${project.number}`), * shortName: "keyname", * }); * const tagValue = new gcp.tags.TagValue("tag_value", { * parent: pulumi.interpolate`tagKeys/${tagKey.name}`, * shortName: "valuename", * }); * const defaultNetwork = new gcp.compute.Network("default", { * name: "workstation-cluster-tags", * autoCreateSubnetworks: false, * }); * const defaultSubnetwork = new gcp.compute.Subnetwork("default", { * name: "workstation-cluster-tags", * ipCidrRange: "10.0.0.0/24", * region: "us-central1", * network: defaultNetwork.name, * }); * const _default = new gcp.workstations.WorkstationCluster("default", { * workstationClusterId: "workstation-cluster-tags", * network: defaultNetwork.id, * subnetwork: defaultSubnetwork.id, * location: "us-central1", * tags: pulumi.all([project, tagKey.shortName, tagValue.shortName]).apply(([project, tagKeyShortName, tagValueShortName]) => { * [`${project.projectId}/${tagKeyShortName}`]: tagValueShortName, * }), * }); * ``` * * ## Import * * WorkstationCluster can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}` * * `{{project}}/{{location}}/{{workstation_cluster_id}}` * * `{{location}}/{{workstation_cluster_id}}` * * When using the `pulumi import` command, WorkstationCluster can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}} * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default {{project}}/{{location}}/{{workstation_cluster_id}} * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default {{location}}/{{workstation_cluster_id}} * ``` */ export declare class WorkstationCluster extends pulumi.CustomResource { /** * Get an existing WorkstationCluster 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?: WorkstationClusterState, opts?: pulumi.CustomResourceOptions): WorkstationCluster; /** * Returns true if the given object is an instance of WorkstationCluster. 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 WorkstationCluster; /** * Client-specified annotations. This is distinct from labels. * **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>; /** * Status conditions describing the current resource state. * Structure is documented below. */ readonly conditions: pulumi.Output; /** * The private IP address of the control plane for this workstation cluster. * Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address. */ readonly controlPlaneIp: pulumi.Output; /** * Time when this resource was created. */ readonly createTime: pulumi.Output; /** * Whether this resource is in degraded mode, in which case it may require user action to restore full functionality. * Details can be found in the conditions field. */ readonly degraded: pulumi.Output; /** * Human-readable name for this resource. */ readonly displayName: pulumi.Output; /** * Configuration options for a custom domain. * Structure is documented below. */ readonly domainConfig: 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; }>; /** * 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; }>; /** * Checksum computed by the server. * May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding. */ readonly etag: pulumi.Output; /** * Client-specified labels that are applied to the resource and that are also propagated to the underlying Compute Engine resources. * **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>; /** * The location where the workstation cluster should reside. */ readonly location: pulumi.Output; /** * The name of the cluster resource. */ readonly name: pulumi.Output; /** * The relative resource name of the VPC network on which the instance can be accessed. * It is specified in the following form: "projects/{projectNumber}/global/networks/{network_id}". */ readonly network: pulumi.Output; /** * Configuration for private cluster. * Structure is documented below. */ readonly privateClusterConfig: 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; }>; /** * Name of the Compute Engine subnetwork in which instances associated with this cluster will be created. * Must be part of the subnetwork specified for this cluster. */ readonly subnetwork: pulumi.Output; /** * Resource manager tags bound to this resource. * For example: * "123/environment": "production", * "123/costCenter": "marketing" */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The system-generated UID of the resource. */ readonly uid: pulumi.Output; /** * ID to use for the workstation cluster. */ readonly workstationClusterId: pulumi.Output; /** * Create a WorkstationCluster 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: WorkstationClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WorkstationCluster resources. */ export interface WorkstationClusterState { /** * Client-specified annotations. This is distinct from labels. * **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; }>; /** * Status conditions describing the current resource state. * Structure is documented below. */ conditions?: pulumi.Input[]>; /** * The private IP address of the control plane for this workstation cluster. * Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address. */ controlPlaneIp?: pulumi.Input; /** * Time when this resource was created. */ createTime?: pulumi.Input; /** * Whether this resource is in degraded mode, in which case it may require user action to restore full functionality. * Details can be found in the conditions field. */ degraded?: pulumi.Input; /** * Human-readable name for this resource. */ displayName?: pulumi.Input; /** * Configuration options for a custom domain. * Structure is documented below. */ domainConfig?: 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; }>; /** * 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; }>; /** * Checksum computed by the server. * May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding. */ etag?: pulumi.Input; /** * Client-specified labels that are applied to the resource and that are also propagated to the underlying Compute Engine resources. * **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 location where the workstation cluster should reside. */ location?: pulumi.Input; /** * The name of the cluster resource. */ name?: pulumi.Input; /** * The relative resource name of the VPC network on which the instance can be accessed. * It is specified in the following form: "projects/{projectNumber}/global/networks/{network_id}". */ network?: pulumi.Input; /** * Configuration for private cluster. * Structure is documented below. */ privateClusterConfig?: 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; }>; /** * Name of the Compute Engine subnetwork in which instances associated with this cluster will be created. * Must be part of the subnetwork specified for this cluster. */ subnetwork?: pulumi.Input; /** * Resource manager tags bound to this resource. * For example: * "123/environment": "production", * "123/costCenter": "marketing" */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The system-generated UID of the resource. */ uid?: pulumi.Input; /** * ID to use for the workstation cluster. */ workstationClusterId?: pulumi.Input; } /** * The set of arguments for constructing a WorkstationCluster resource. */ export interface WorkstationClusterArgs { /** * Client-specified annotations. This is distinct from labels. * **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; }>; /** * Human-readable name for this resource. */ displayName?: pulumi.Input; /** * Configuration options for a custom domain. * Structure is documented below. */ domainConfig?: pulumi.Input; /** * Client-specified labels that are applied to the resource and that are also propagated to the underlying Compute Engine resources. * **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 location where the workstation cluster should reside. */ location?: pulumi.Input; /** * The relative resource name of the VPC network on which the instance can be accessed. * It is specified in the following form: "projects/{projectNumber}/global/networks/{network_id}". */ network: pulumi.Input; /** * Configuration for private cluster. * Structure is documented below. */ privateClusterConfig?: 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; /** * Name of the Compute Engine subnetwork in which instances associated with this cluster will be created. * Must be part of the subnetwork specified for this cluster. */ subnetwork: pulumi.Input; /** * Resource manager tags bound to this resource. * For example: * "123/environment": "production", * "123/costCenter": "marketing" */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * ID to use for the workstation cluster. */ workstationClusterId: pulumi.Input; }