@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
572 lines • 25 kB
TypeScript
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.
*
* To get more information about WorkstationCluster, see:
*
* * [API documentation](https://cloud.google.com/workstations/docs/reference/rest/v1/projects.locations.workstationClusters/create)
* * How-to Guides
* * [Workstations](https://cloud.google.com/workstations/docs/)
*
* ## Example Usage
*
* ### Workstation Cluster Custom Urls
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const defaultNetwork = new gcp.compute.Network("default", {
* name: "workstations-network",
* autoCreateSubnetworks: false,
* });
* const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
* name: "workstations-network",
* ipCidrRange: "10.0.0.0/24",
* region: "us-central1",
* network: defaultNetwork.name,
* });
* const _default = new gcp.workstations.WorkstationCluster("default", {
* workstationClusterId: "custom-urls-cluster",
* network: defaultNetwork.id,
* subnetwork: defaultSubnetwork.id,
* location: "us-central1",
* workstationAuthorizationUrl: "https://workstations.cloud.google.com/ui/auth",
* workstationLaunchUrl: "https://console.cloud.google.com/workstations/launch",
* });
* const project = gcp.organizations.getProject({});
* ```
* ### 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<pulumi.ID>, 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<outputs.workstations.WorkstationClusterCondition[]>;
/**
* 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<string>;
/**
* Time when this resource was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* 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<boolean>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* Human-readable name for this resource.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* Configuration options for a custom domain.
* Structure is documented below.
*/
readonly domainConfig: pulumi.Output<outputs.workstations.WorkstationClusterDomainConfig | undefined>;
/**
* 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<string>;
/**
* 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<string | undefined>;
/**
* The name of the cluster resource.
*/
readonly name: pulumi.Output<string>;
/**
* 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<string>;
/**
* Configuration for private cluster.
* Structure is documented below.
*/
readonly privateClusterConfig: pulumi.Output<outputs.workstations.WorkstationClusterPrivateClusterConfig | undefined>;
/**
* 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;
}>;
/**
* 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<string>;
/**
* 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<string>;
/**
* Specifies the redirect URL for unauthorized requests received by workstation VMs in this cluster.
* Redirects to this endpoint will send a base64 encoded `state` query param containing the target workstation name and original request hostname. The endpoint is responsible for retrieving a token using `GenerateAccessToken` and redirecting back to the original hostname with the token.
*/
readonly workstationAuthorizationUrl: pulumi.Output<string>;
/**
* ID to use for the workstation cluster.
*/
readonly workstationClusterId: pulumi.Output<string>;
/**
* Specifies the launch URL for workstations in this cluster. Requests sent to unstarted workstations will be redirected to this URL.
* Requests redirected to the launch endpoint will be sent with a `workstation` query parameter containing the full workstation resource. The launch endpoint is responsible for starting the workstation, polling it until it reaches `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL.
*/
readonly workstationLaunchUrl: pulumi.Output<string | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* Status conditions describing the current resource state.
* Structure is documented below.
*/
conditions?: pulumi.Input<pulumi.Input<inputs.workstations.WorkstationClusterCondition>[] | undefined>;
/**
* 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<string | undefined>;
/**
* Time when this resource was created.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* 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<boolean | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Human-readable name for this resource.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* Configuration options for a custom domain.
* Structure is documented below.
*/
domainConfig?: pulumi.Input<inputs.workstations.WorkstationClusterDomainConfig | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* 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>;
} | undefined>;
/**
* 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<string | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* The location where the workstation cluster should reside.
*/
location?: pulumi.Input<string | undefined>;
/**
* The name of the cluster resource.
*/
name?: pulumi.Input<string | undefined>;
/**
* 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<string | undefined>;
/**
* Configuration for private cluster.
* Structure is documented below.
*/
privateClusterConfig?: pulumi.Input<inputs.workstations.WorkstationClusterPrivateClusterConfig | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* 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<string | undefined>;
/**
* Resource manager tags bound to this resource.
* For example:
* "123/environment": "production",
* "123/costCenter": "marketing"
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The system-generated UID of the resource.
*/
uid?: pulumi.Input<string | undefined>;
/**
* Specifies the redirect URL for unauthorized requests received by workstation VMs in this cluster.
* Redirects to this endpoint will send a base64 encoded `state` query param containing the target workstation name and original request hostname. The endpoint is responsible for retrieving a token using `GenerateAccessToken` and redirecting back to the original hostname with the token.
*/
workstationAuthorizationUrl?: pulumi.Input<string | undefined>;
/**
* ID to use for the workstation cluster.
*/
workstationClusterId?: pulumi.Input<string | undefined>;
/**
* Specifies the launch URL for workstations in this cluster. Requests sent to unstarted workstations will be redirected to this URL.
* Requests redirected to the launch endpoint will be sent with a `workstation` query parameter containing the full workstation resource. The launch endpoint is responsible for starting the workstation, polling it until it reaches `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL.
*/
workstationLaunchUrl?: pulumi.Input<string | undefined>;
}
/**
* 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<string>;
} | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Human-readable name for this resource.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* Configuration options for a custom domain.
* Structure is documented below.
*/
domainConfig?: pulumi.Input<inputs.workstations.WorkstationClusterDomainConfig | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* The location where the workstation cluster should reside.
*/
location?: pulumi.Input<string | undefined>;
/**
* 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<string>;
/**
* Configuration for private cluster.
* Structure is documented below.
*/
privateClusterConfig?: pulumi.Input<inputs.workstations.WorkstationClusterPrivateClusterConfig | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* 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<string>;
/**
* Resource manager tags bound to this resource.
* For example:
* "123/environment": "production",
* "123/costCenter": "marketing"
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Specifies the redirect URL for unauthorized requests received by workstation VMs in this cluster.
* Redirects to this endpoint will send a base64 encoded `state` query param containing the target workstation name and original request hostname. The endpoint is responsible for retrieving a token using `GenerateAccessToken` and redirecting back to the original hostname with the token.
*/
workstationAuthorizationUrl?: pulumi.Input<string | undefined>;
/**
* ID to use for the workstation cluster.
*/
workstationClusterId: pulumi.Input<string>;
/**
* Specifies the launch URL for workstations in this cluster. Requests sent to unstarted workstations will be redirected to this URL.
* Requests redirected to the launch endpoint will be sent with a `workstation` query parameter containing the full workstation resource. The launch endpoint is responsible for starting the workstation, polling it until it reaches `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL.
*/
workstationLaunchUrl?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=workstationCluster.d.ts.map