Workstation

class Workstation : KotlinCustomResource

Example Usage

Workstation Basic

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 com.pulumi.resources.CustomResourceOptions;
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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
.ipCidrRange("10.0.0.0/24")
.region("us-central1")
.network(defaultNetwork.name())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var defaultWorkstationCluster = new WorkstationCluster("defaultWorkstationCluster", WorkstationClusterArgs.builder()
.workstationClusterId("workstation-cluster")
.network(defaultNetwork.id())
.subnetwork(defaultSubnetwork.id())
.location("us-central1")
.labels(Map.of("label", "key"))
.annotations(Map.of("label-one", "value-one"))
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.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(), CustomResourceOptions.builder()
.provider(google_beta)
.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(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}

Import

Workstation can be imported using any of these accepted formats

$ 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}}

Properties

Link copied to clipboard
val annotations: Output<Map<String, String>>?

Client-specified annotations. This is distinct from labels.

Link copied to clipboard
val createTime: Output<String>

Time when this resource was created.

Link copied to clipboard
val displayName: Output<String>?

Human-readable name for this resource.

Link copied to clipboard
val env: Output<Map<String, String>>?

'Client-specified environment variables passed to the workstation container's entrypoint.'

Link copied to clipboard
val host: Output<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}".

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>?

Client-specified labels that are applied to the resource and that are also propagated to the underlying Compute Engine resources.

Link copied to clipboard
val location: Output<String>

The location where the workstation parent resources reside.

Link copied to clipboard
val name: Output<String>

Full name of this resource.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>

Current state of the workstation.

Link copied to clipboard
val uid: Output<String>

A system-assigned unique identified for this resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The ID of the parent workstation cluster.

Link copied to clipboard

The ID of the parent workstation cluster config.

Link copied to clipboard
val workstationId: Output<String>

ID to use for the workstation.