gcp.workstations.Workstation
Explore with Pulumi AI
Example Usage
Workstation Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = 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: _default.name,
});
const defaultWorkstationCluster = new gcp.workstations.WorkstationCluster("default", {
    workstationClusterId: "workstation-cluster",
    network: _default.id,
    subnetwork: defaultSubnetwork.id,
    location: "us-central1",
    labels: {
        label: "key",
    },
    annotations: {
        "label-one": "value-one",
    },
});
const defaultWorkstationConfig = new gcp.workstations.WorkstationConfig("default", {
    workstationConfigId: "workstation-config",
    workstationClusterId: defaultWorkstationCluster.workstationClusterId,
    location: "us-central1",
    host: {
        gceInstance: {
            machineType: "e2-standard-4",
            bootDiskSizeGb: 35,
            disablePublicIpAddresses: true,
        },
    },
});
const defaultWorkstation = new gcp.workstations.Workstation("default", {
    workstationId: "work-station",
    workstationConfigId: defaultWorkstationConfig.workstationConfigId,
    workstationClusterId: defaultWorkstationCluster.workstationClusterId,
    location: "us-central1",
    labels: {
        label: "key",
    },
    env: {
        name: "foo",
    },
    annotations: {
        "label-one": "value-one",
    },
});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.Network("default",
    name="workstation-cluster",
    auto_create_subnetworks=False)
default_subnetwork = gcp.compute.Subnetwork("default",
    name="workstation-cluster",
    ip_cidr_range="10.0.0.0/24",
    region="us-central1",
    network=default.name)
default_workstation_cluster = gcp.workstations.WorkstationCluster("default",
    workstation_cluster_id="workstation-cluster",
    network=default.id,
    subnetwork=default_subnetwork.id,
    location="us-central1",
    labels={
        "label": "key",
    },
    annotations={
        "label-one": "value-one",
    })
default_workstation_config = gcp.workstations.WorkstationConfig("default",
    workstation_config_id="workstation-config",
    workstation_cluster_id=default_workstation_cluster.workstation_cluster_id,
    location="us-central1",
    host={
        "gce_instance": {
            "machine_type": "e2-standard-4",
            "boot_disk_size_gb": 35,
            "disable_public_ip_addresses": True,
        },
    })
default_workstation = gcp.workstations.Workstation("default",
    workstation_id="work-station",
    workstation_config_id=default_workstation_config.workstation_config_id,
    workstation_cluster_id=default_workstation_cluster.workstation_cluster_id,
    location="us-central1",
    labels={
        "label": "key",
    },
    env={
        "name": "foo",
    },
    annotations={
        "label-one": "value-one",
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/workstations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
			Name:                  pulumi.String("workstation-cluster"),
			AutoCreateSubnetworks: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
			Name:        pulumi.String("workstation-cluster"),
			IpCidrRange: pulumi.String("10.0.0.0/24"),
			Region:      pulumi.String("us-central1"),
			Network:     _default.Name,
		})
		if err != nil {
			return err
		}
		defaultWorkstationCluster, err := workstations.NewWorkstationCluster(ctx, "default", &workstations.WorkstationClusterArgs{
			WorkstationClusterId: pulumi.String("workstation-cluster"),
			Network:              _default.ID(),
			Subnetwork:           defaultSubnetwork.ID(),
			Location:             pulumi.String("us-central1"),
			Labels: pulumi.StringMap{
				"label": pulumi.String("key"),
			},
			Annotations: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		defaultWorkstationConfig, err := workstations.NewWorkstationConfig(ctx, "default", &workstations.WorkstationConfigArgs{
			WorkstationConfigId:  pulumi.String("workstation-config"),
			WorkstationClusterId: defaultWorkstationCluster.WorkstationClusterId,
			Location:             pulumi.String("us-central1"),
			Host: &workstations.WorkstationConfigHostArgs{
				GceInstance: &workstations.WorkstationConfigHostGceInstanceArgs{
					MachineType:              pulumi.String("e2-standard-4"),
					BootDiskSizeGb:           pulumi.Int(35),
					DisablePublicIpAddresses: pulumi.Bool(true),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = workstations.NewWorkstation(ctx, "default", &workstations.WorkstationArgs{
			WorkstationId:        pulumi.String("work-station"),
			WorkstationConfigId:  defaultWorkstationConfig.WorkstationConfigId,
			WorkstationClusterId: defaultWorkstationCluster.WorkstationClusterId,
			Location:             pulumi.String("us-central1"),
			Labels: pulumi.StringMap{
				"label": pulumi.String("key"),
			},
			Env: pulumi.StringMap{
				"name": pulumi.String("foo"),
			},
			Annotations: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Compute.Network("default", new()
    {
        Name = "workstation-cluster",
        AutoCreateSubnetworks = false,
    });
    var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
    {
        Name = "workstation-cluster",
        IpCidrRange = "10.0.0.0/24",
        Region = "us-central1",
        Network = @default.Name,
    });
    var defaultWorkstationCluster = new Gcp.Workstations.WorkstationCluster("default", new()
    {
        WorkstationClusterId = "workstation-cluster",
        Network = @default.Id,
        Subnetwork = defaultSubnetwork.Id,
        Location = "us-central1",
        Labels = 
        {
            { "label", "key" },
        },
        Annotations = 
        {
            { "label-one", "value-one" },
        },
    });
    var defaultWorkstationConfig = new Gcp.Workstations.WorkstationConfig("default", new()
    {
        WorkstationConfigId = "workstation-config",
        WorkstationClusterId = defaultWorkstationCluster.WorkstationClusterId,
        Location = "us-central1",
        Host = new Gcp.Workstations.Inputs.WorkstationConfigHostArgs
        {
            GceInstance = new Gcp.Workstations.Inputs.WorkstationConfigHostGceInstanceArgs
            {
                MachineType = "e2-standard-4",
                BootDiskSizeGb = 35,
                DisablePublicIpAddresses = true,
            },
        },
    });
    var defaultWorkstation = new Gcp.Workstations.Workstation("default", new()
    {
        WorkstationId = "work-station",
        WorkstationConfigId = defaultWorkstationConfig.WorkstationConfigId,
        WorkstationClusterId = defaultWorkstationCluster.WorkstationClusterId,
        Location = "us-central1",
        Labels = 
        {
            { "label", "key" },
        },
        Env = 
        {
            { "name", "foo" },
        },
        Annotations = 
        {
            { "label-one", "value-one" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.workstations.WorkstationCluster;
import com.pulumi.gcp.workstations.WorkstationClusterArgs;
import com.pulumi.gcp.workstations.WorkstationConfig;
import com.pulumi.gcp.workstations.WorkstationConfigArgs;
import com.pulumi.gcp.workstations.inputs.WorkstationConfigHostArgs;
import com.pulumi.gcp.workstations.inputs.WorkstationConfigHostGceInstanceArgs;
import com.pulumi.gcp.workstations.Workstation;
import com.pulumi.gcp.workstations.WorkstationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var default_ = new Network("default", NetworkArgs.builder()
            .name("workstation-cluster")
            .autoCreateSubnetworks(false)
            .build());
        var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
            .name("workstation-cluster")
            .ipCidrRange("10.0.0.0/24")
            .region("us-central1")
            .network(default_.name())
            .build());
        var defaultWorkstationCluster = new WorkstationCluster("defaultWorkstationCluster", WorkstationClusterArgs.builder()
            .workstationClusterId("workstation-cluster")
            .network(default_.id())
            .subnetwork(defaultSubnetwork.id())
            .location("us-central1")
            .labels(Map.of("label", "key"))
            .annotations(Map.of("label-one", "value-one"))
            .build());
        var defaultWorkstationConfig = new WorkstationConfig("defaultWorkstationConfig", WorkstationConfigArgs.builder()
            .workstationConfigId("workstation-config")
            .workstationClusterId(defaultWorkstationCluster.workstationClusterId())
            .location("us-central1")
            .host(WorkstationConfigHostArgs.builder()
                .gceInstance(WorkstationConfigHostGceInstanceArgs.builder()
                    .machineType("e2-standard-4")
                    .bootDiskSizeGb(35)
                    .disablePublicIpAddresses(true)
                    .build())
                .build())
            .build());
        var defaultWorkstation = new Workstation("defaultWorkstation", WorkstationArgs.builder()
            .workstationId("work-station")
            .workstationConfigId(defaultWorkstationConfig.workstationConfigId())
            .workstationClusterId(defaultWorkstationCluster.workstationClusterId())
            .location("us-central1")
            .labels(Map.of("label", "key"))
            .env(Map.of("name", "foo"))
            .annotations(Map.of("label-one", "value-one"))
            .build());
    }
}
resources:
  default:
    type: gcp:compute:Network
    properties:
      name: workstation-cluster
      autoCreateSubnetworks: false
  defaultSubnetwork:
    type: gcp:compute:Subnetwork
    name: default
    properties:
      name: workstation-cluster
      ipCidrRange: 10.0.0.0/24
      region: us-central1
      network: ${default.name}
  defaultWorkstationCluster:
    type: gcp:workstations:WorkstationCluster
    name: default
    properties:
      workstationClusterId: workstation-cluster
      network: ${default.id}
      subnetwork: ${defaultSubnetwork.id}
      location: us-central1
      labels:
        label: key
      annotations:
        label-one: value-one
  defaultWorkstationConfig:
    type: gcp:workstations:WorkstationConfig
    name: default
    properties:
      workstationConfigId: workstation-config
      workstationClusterId: ${defaultWorkstationCluster.workstationClusterId}
      location: us-central1
      host:
        gceInstance:
          machineType: e2-standard-4
          bootDiskSizeGb: 35
          disablePublicIpAddresses: true
  defaultWorkstation:
    type: gcp:workstations:Workstation
    name: default
    properties:
      workstationId: work-station
      workstationConfigId: ${defaultWorkstationConfig.workstationConfigId}
      workstationClusterId: ${defaultWorkstationCluster.workstationClusterId}
      location: us-central1
      labels:
        label: key
      env:
        name: foo
      annotations:
        label-one: value-one
Create Workstation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Workstation(name: string, args: WorkstationArgs, opts?: CustomResourceOptions);@overload
def Workstation(resource_name: str,
                args: WorkstationArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def Workstation(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                location: Optional[str] = None,
                workstation_cluster_id: Optional[str] = None,
                workstation_config_id: Optional[str] = None,
                workstation_id: Optional[str] = None,
                annotations: Optional[Mapping[str, str]] = None,
                display_name: Optional[str] = None,
                env: Optional[Mapping[str, str]] = None,
                labels: Optional[Mapping[str, str]] = None,
                project: Optional[str] = None,
                source_workstation: Optional[str] = None)func NewWorkstation(ctx *Context, name string, args WorkstationArgs, opts ...ResourceOption) (*Workstation, error)public Workstation(string name, WorkstationArgs args, CustomResourceOptions? opts = null)
public Workstation(String name, WorkstationArgs args)
public Workstation(String name, WorkstationArgs args, CustomResourceOptions options)
type: gcp:workstations:Workstation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WorkstationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkstationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkstationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkstationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkstationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var workstationResource = new Gcp.Workstations.Workstation("workstationResource", new()
{
    Location = "string",
    WorkstationClusterId = "string",
    WorkstationConfigId = "string",
    WorkstationId = "string",
    Annotations = 
    {
        { "string", "string" },
    },
    DisplayName = "string",
    Env = 
    {
        { "string", "string" },
    },
    Labels = 
    {
        { "string", "string" },
    },
    Project = "string",
    SourceWorkstation = "string",
});
example, err := workstations.NewWorkstation(ctx, "workstationResource", &workstations.WorkstationArgs{
	Location:             pulumi.String("string"),
	WorkstationClusterId: pulumi.String("string"),
	WorkstationConfigId:  pulumi.String("string"),
	WorkstationId:        pulumi.String("string"),
	Annotations: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	DisplayName: pulumi.String("string"),
	Env: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Project:           pulumi.String("string"),
	SourceWorkstation: pulumi.String("string"),
})
var workstationResource = new Workstation("workstationResource", WorkstationArgs.builder()
    .location("string")
    .workstationClusterId("string")
    .workstationConfigId("string")
    .workstationId("string")
    .annotations(Map.of("string", "string"))
    .displayName("string")
    .env(Map.of("string", "string"))
    .labels(Map.of("string", "string"))
    .project("string")
    .sourceWorkstation("string")
    .build());
workstation_resource = gcp.workstations.Workstation("workstationResource",
    location="string",
    workstation_cluster_id="string",
    workstation_config_id="string",
    workstation_id="string",
    annotations={
        "string": "string",
    },
    display_name="string",
    env={
        "string": "string",
    },
    labels={
        "string": "string",
    },
    project="string",
    source_workstation="string")
const workstationResource = new gcp.workstations.Workstation("workstationResource", {
    location: "string",
    workstationClusterId: "string",
    workstationConfigId: "string",
    workstationId: "string",
    annotations: {
        string: "string",
    },
    displayName: "string",
    env: {
        string: "string",
    },
    labels: {
        string: "string",
    },
    project: "string",
    sourceWorkstation: "string",
});
type: gcp:workstations:Workstation
properties:
    annotations:
        string: string
    displayName: string
    env:
        string: string
    labels:
        string: string
    location: string
    project: string
    sourceWorkstation: string
    workstationClusterId: string
    workstationConfigId: string
    workstationId: string
Workstation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Workstation resource accepts the following input properties:
- Location string
- The location where the workstation parent resources reside.
- WorkstationCluster stringId 
- The ID of the parent workstation cluster.
- WorkstationConfig stringId 
- The ID of the parent workstation cluster config.
- WorkstationId string
- ID to use for the workstation.
- Annotations Dictionary<string, string>
- 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 effective_annotationsfor all of the annotations present on the resource.
- DisplayName string
- Human-readable name for this resource.
- Env Dictionary<string, string>
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- Labels Dictionary<string, 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 effective_labelsfor all of the labels present on the resource.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- SourceWorkstation string
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- Location string
- The location where the workstation parent resources reside.
- WorkstationCluster stringId 
- The ID of the parent workstation cluster.
- WorkstationConfig stringId 
- The ID of the parent workstation cluster config.
- WorkstationId string
- ID to use for the workstation.
- Annotations map[string]string
- 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 effective_annotationsfor all of the annotations present on the resource.
- DisplayName string
- Human-readable name for this resource.
- Env map[string]string
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- Labels map[string]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 effective_labelsfor all of the labels present on the resource.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- SourceWorkstation string
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- location String
- The location where the workstation parent resources reside.
- workstationCluster StringId 
- The ID of the parent workstation cluster.
- workstationConfig StringId 
- The ID of the parent workstation cluster config.
- workstationId String
- ID to use for the workstation.
- annotations Map<String,String>
- 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 effective_annotationsfor all of the annotations present on the resource.
- displayName String
- Human-readable name for this resource.
- env Map<String,String>
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- labels Map<String,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 effective_labelsfor all of the labels present on the resource.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- sourceWorkstation String
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- location string
- The location where the workstation parent resources reside.
- workstationCluster stringId 
- The ID of the parent workstation cluster.
- workstationConfig stringId 
- The ID of the parent workstation cluster config.
- workstationId string
- ID to use for the workstation.
- annotations {[key: string]: string}
- 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 effective_annotationsfor all of the annotations present on the resource.
- displayName string
- Human-readable name for this resource.
- env {[key: string]: string}
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- labels {[key: string]: 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 effective_labelsfor all of the labels present on the resource.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- sourceWorkstation string
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- location str
- The location where the workstation parent resources reside.
- workstation_cluster_ strid 
- The ID of the parent workstation cluster.
- workstation_config_ strid 
- The ID of the parent workstation cluster config.
- workstation_id str
- ID to use for the workstation.
- annotations Mapping[str, str]
- 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 effective_annotationsfor all of the annotations present on the resource.
- display_name str
- Human-readable name for this resource.
- env Mapping[str, str]
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- labels Mapping[str, str]
- 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 effective_labelsfor all of the labels present on the resource.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- source_workstation str
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- location String
- The location where the workstation parent resources reside.
- workstationCluster StringId 
- The ID of the parent workstation cluster.
- workstationConfig StringId 
- The ID of the parent workstation cluster config.
- workstationId String
- ID to use for the workstation.
- annotations Map<String>
- 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 effective_annotationsfor all of the annotations present on the resource.
- displayName String
- Human-readable name for this resource.
- env Map<String>
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- labels Map<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 effective_labelsfor all of the labels present on the resource.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- sourceWorkstation String
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workstation resource produces the following output properties:
- CreateTime string
- Time when this resource was created.
- EffectiveAnnotations Dictionary<string, string>
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Host string
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Full name of this resource.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- Current state of the workstation.
- Uid string
- A system-assigned unique identified for this resource.
- CreateTime string
- Time when this resource was created.
- EffectiveAnnotations map[string]string
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Host string
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Full name of this resource.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- Current state of the workstation.
- Uid string
- A system-assigned unique identified for this resource.
- createTime String
- Time when this resource was created.
- effectiveAnnotations Map<String,String>
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- host String
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Full name of this resource.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- Current state of the workstation.
- uid String
- A system-assigned unique identified for this resource.
- createTime string
- Time when this resource was created.
- effectiveAnnotations {[key: string]: string}
- effectiveLabels {[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.
- host string
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Full name of this resource.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- Current state of the workstation.
- uid string
- A system-assigned unique identified for this resource.
- create_time str
- Time when this resource was created.
- effective_annotations Mapping[str, str]
- effective_labels Mapping[str, str]
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- host str
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Full name of this resource.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- state str
- Current state of the workstation.
- uid str
- A system-assigned unique identified for this resource.
- createTime String
- Time when this resource was created.
- effectiveAnnotations Map<String>
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- host String
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Full name of this resource.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- Current state of the workstation.
- uid String
- A system-assigned unique identified for this resource.
Look up Existing Workstation Resource
Get an existing Workstation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkstationState, opts?: CustomResourceOptions): Workstation@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        annotations: Optional[Mapping[str, str]] = None,
        create_time: Optional[str] = None,
        display_name: Optional[str] = None,
        effective_annotations: Optional[Mapping[str, str]] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        env: Optional[Mapping[str, str]] = None,
        host: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        source_workstation: Optional[str] = None,
        state: Optional[str] = None,
        uid: Optional[str] = None,
        workstation_cluster_id: Optional[str] = None,
        workstation_config_id: Optional[str] = None,
        workstation_id: Optional[str] = None) -> Workstationfunc GetWorkstation(ctx *Context, name string, id IDInput, state *WorkstationState, opts ...ResourceOption) (*Workstation, error)public static Workstation Get(string name, Input<string> id, WorkstationState? state, CustomResourceOptions? opts = null)public static Workstation get(String name, Output<String> id, WorkstationState state, CustomResourceOptions options)resources:  _:    type: gcp:workstations:Workstation    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Annotations Dictionary<string, string>
- 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 effective_annotationsfor all of the annotations present on the resource.
- CreateTime string
- Time when this resource was created.
- DisplayName string
- Human-readable name for this resource.
- EffectiveAnnotations Dictionary<string, string>
- EffectiveLabels Dictionary<string, string>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Env Dictionary<string, string>
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- Host string
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- Labels Dictionary<string, 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 effective_labelsfor all of the labels present on the resource.
- Location string
- The location where the workstation parent resources reside.
- Name string
- Full name of this resource.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels Dictionary<string, string>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- SourceWorkstation string
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- State string
- Current state of the workstation.
- Uid string
- A system-assigned unique identified for this resource.
- WorkstationCluster stringId 
- The ID of the parent workstation cluster.
- WorkstationConfig stringId 
- The ID of the parent workstation cluster config.
- WorkstationId string
- ID to use for the workstation.
- Annotations map[string]string
- 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 effective_annotationsfor all of the annotations present on the resource.
- CreateTime string
- Time when this resource was created.
- DisplayName string
- Human-readable name for this resource.
- EffectiveAnnotations map[string]string
- EffectiveLabels map[string]string
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Env map[string]string
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- Host string
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- Labels map[string]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 effective_labelsfor all of the labels present on the resource.
- Location string
- The location where the workstation parent resources reside.
- Name string
- Full name of this resource.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- PulumiLabels map[string]string
- The combination of labels configured directly on the resource and default labels configured on the provider.
- SourceWorkstation string
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- State string
- Current state of the workstation.
- Uid string
- A system-assigned unique identified for this resource.
- WorkstationCluster stringId 
- The ID of the parent workstation cluster.
- WorkstationConfig stringId 
- The ID of the parent workstation cluster config.
- WorkstationId string
- ID to use for the workstation.
- annotations Map<String,String>
- 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 effective_annotationsfor all of the annotations present on the resource.
- createTime String
- Time when this resource was created.
- displayName String
- Human-readable name for this resource.
- effectiveAnnotations Map<String,String>
- effectiveLabels Map<String,String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- env Map<String,String>
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- host String
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- labels Map<String,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 effective_labelsfor all of the labels present on the resource.
- location String
- The location where the workstation parent resources reside.
- name String
- Full name of this resource.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String,String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- sourceWorkstation String
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- state String
- Current state of the workstation.
- uid String
- A system-assigned unique identified for this resource.
- workstationCluster StringId 
- The ID of the parent workstation cluster.
- workstationConfig StringId 
- The ID of the parent workstation cluster config.
- workstationId String
- ID to use for the workstation.
- annotations {[key: string]: string}
- 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 effective_annotationsfor all of the annotations present on the resource.
- createTime string
- Time when this resource was created.
- displayName string
- Human-readable name for this resource.
- effectiveAnnotations {[key: string]: string}
- effectiveLabels {[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.
- env {[key: string]: string}
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- host string
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- labels {[key: string]: 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 effective_labelsfor all of the labels present on the resource.
- location string
- The location where the workstation parent resources reside.
- name string
- Full name of this resource.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels {[key: string]: string}
- The combination of labels configured directly on the resource and default labels configured on the provider.
- sourceWorkstation string
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- state string
- Current state of the workstation.
- uid string
- A system-assigned unique identified for this resource.
- workstationCluster stringId 
- The ID of the parent workstation cluster.
- workstationConfig stringId 
- The ID of the parent workstation cluster config.
- workstationId string
- ID to use for the workstation.
- annotations Mapping[str, str]
- 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 effective_annotationsfor all of the annotations present on the resource.
- create_time str
- Time when this resource was created.
- display_name str
- Human-readable name for this resource.
- effective_annotations Mapping[str, str]
- effective_labels Mapping[str, str]
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- env Mapping[str, str]
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- host str
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- labels Mapping[str, str]
- 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 effective_labelsfor all of the labels present on the resource.
- location str
- The location where the workstation parent resources reside.
- name str
- Full name of this resource.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_labels Mapping[str, str]
- The combination of labels configured directly on the resource and default labels configured on the provider.
- source_workstation str
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- state str
- Current state of the workstation.
- uid str
- A system-assigned unique identified for this resource.
- workstation_cluster_ strid 
- The ID of the parent workstation cluster.
- workstation_config_ strid 
- The ID of the parent workstation cluster config.
- workstation_id str
- ID to use for the workstation.
- annotations Map<String>
- 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 effective_annotationsfor all of the annotations present on the resource.
- createTime String
- Time when this resource was created.
- displayName String
- Human-readable name for this resource.
- effectiveAnnotations Map<String>
- effectiveLabels Map<String>
- All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- env Map<String>
- 'Client-specified environment variables passed to the workstation container's entrypoint.'
- host String
- Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format "{port}-{host}".
- labels Map<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 effective_labelsfor all of the labels present on the resource.
- location String
- The location where the workstation parent resources reside.
- name String
- Full name of this resource.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumiLabels Map<String>
- The combination of labels configured directly on the resource and default labels configured on the provider.
- sourceWorkstation String
- Full resource name of the source workstation from which the workstation's persistent directories will be cloned from during creation.
- state String
- Current state of the workstation.
- uid String
- A system-assigned unique identified for this resource.
- workstationCluster StringId 
- The ID of the parent workstation cluster.
- workstationConfig StringId 
- The ID of the parent workstation cluster config.
- workstationId String
- ID to use for the workstation.
Import
Workstation can be imported using any of these accepted formats:
- projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}/workstationConfigs/{{workstation_config_id}}/workstations/{{workstation_id}}
- {{project}}/{{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}/{{workstation_id}}
- {{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}/{{workstation_id}}
When using the pulumi import command, Workstation can be imported using one of the formats above. For example:
$ pulumi import gcp:workstations/workstation:Workstation default projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}/workstationConfigs/{{workstation_config_id}}/workstations/{{workstation_id}}
$ pulumi import gcp:workstations/workstation:Workstation default {{project}}/{{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}/{{workstation_id}}
$ pulumi import gcp:workstations/workstation:Workstation default {{location}}/{{workstation_cluster_id}}/{{workstation_config_id}}/{{workstation_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.