All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.workstations.kotlin.WorkstationClusterArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.workstations.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.workstations.WorkstationClusterArgs.builder
import com.pulumi.gcp.workstations.kotlin.inputs.WorkstationClusterDomainConfigArgs
import com.pulumi.gcp.workstations.kotlin.inputs.WorkstationClusterDomainConfigArgsBuilder
import com.pulumi.gcp.workstations.kotlin.inputs.WorkstationClusterPrivateClusterConfigArgs
import com.pulumi.gcp.workstations.kotlin.inputs.WorkstationClusterPrivateClusterConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## 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({});
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_network = 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_network.name)
 * default = gcp.workstations.WorkstationCluster("default",
 *     workstation_cluster_id="workstation-cluster",
 *     network=default_network.id,
 *     subnetwork=default_subnetwork.id,
 *     location="us-central1",
 *     labels={
 *         "label": "key",
 *     },
 *     annotations={
 *         "label-one": "value-one",
 *     })
 * project = gcp.organizations.get_project()
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultNetwork = 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 = defaultNetwork.Name,
 *     });
 *     var @default = new Gcp.Workstations.WorkstationCluster("default", new()
 *     {
 *         WorkstationClusterId = "workstation-cluster",
 *         Network = defaultNetwork.Id,
 *         Subnetwork = defaultSubnetwork.Id,
 *         Location = "us-central1",
 *         Labels =
 *         {
 *             { "label", "key" },
 *         },
 *         Annotations =
 *         {
 *             { "label-one", "value-one" },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/workstations"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		defaultNetwork, 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:     defaultNetwork.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = workstations.NewWorkstationCluster(ctx, "default", &workstations.WorkstationClusterArgs{
 * 			WorkstationClusterId: pulumi.String("workstation-cluster"),
 * 			Network:              defaultNetwork.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
 * 		}
 * 		_, err = organizations.LookupProject(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * 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()
 *             .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(defaultNetwork.name())
 *             .build());
 *         var default_ = new WorkstationCluster("default", 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());
 *         final var project = OrganizationsFunctions.getProject();
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:workstations:WorkstationCluster
 *     properties:
 *       workstationClusterId: workstation-cluster
 *       network: ${defaultNetwork.id}
 *       subnetwork: ${defaultSubnetwork.id}
 *       location: us-central1
 *       labels:
 *         label: key
 *       annotations:
 *         label-one: value-one
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     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: ${defaultNetwork.name}
 * variables:
 *   project:
 *     fn::invoke:
 *       Function: gcp:organizations:getProject
 *       Arguments: {}
 * ```
 * 
 * ### 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({});
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_network = gcp.compute.Network("default",
 *     name="workstation-cluster-private",
 *     auto_create_subnetworks=False)
 * default_subnetwork = gcp.compute.Subnetwork("default",
 *     name="workstation-cluster-private",
 *     ip_cidr_range="10.0.0.0/24",
 *     region="us-central1",
 *     network=default_network.name)
 * default = gcp.workstations.WorkstationCluster("default",
 *     workstation_cluster_id="workstation-cluster-private",
 *     network=default_network.id,
 *     subnetwork=default_subnetwork.id,
 *     location="us-central1",
 *     private_cluster_config=gcp.workstations.WorkstationClusterPrivateClusterConfigArgs(
 *         enable_private_endpoint=True,
 *     ),
 *     labels={
 *         "label": "key",
 *     },
 *     annotations={
 *         "label-one": "value-one",
 *     })
 * project = gcp.organizations.get_project()
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultNetwork = new Gcp.Compute.Network("default", new()
 *     {
 *         Name = "workstation-cluster-private",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
 *     {
 *         Name = "workstation-cluster-private",
 *         IpCidrRange = "10.0.0.0/24",
 *         Region = "us-central1",
 *         Network = defaultNetwork.Name,
 *     });
 *     var @default = new Gcp.Workstations.WorkstationCluster("default", new()
 *     {
 *         WorkstationClusterId = "workstation-cluster-private",
 *         Network = defaultNetwork.Id,
 *         Subnetwork = defaultSubnetwork.Id,
 *         Location = "us-central1",
 *         PrivateClusterConfig = new Gcp.Workstations.Inputs.WorkstationClusterPrivateClusterConfigArgs
 *         {
 *             EnablePrivateEndpoint = true,
 *         },
 *         Labels =
 *         {
 *             { "label", "key" },
 *         },
 *         Annotations =
 *         {
 *             { "label-one", "value-one" },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/workstations"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("workstation-cluster-private"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("workstation-cluster-private"),
 * 			IpCidrRange: pulumi.String("10.0.0.0/24"),
 * 			Region:      pulumi.String("us-central1"),
 * 			Network:     defaultNetwork.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = workstations.NewWorkstationCluster(ctx, "default", &workstations.WorkstationClusterArgs{
 * 			WorkstationClusterId: pulumi.String("workstation-cluster-private"),
 * 			Network:              defaultNetwork.ID(),
 * 			Subnetwork:           defaultSubnetwork.ID(),
 * 			Location:             pulumi.String("us-central1"),
 * 			PrivateClusterConfig: &workstations.WorkstationClusterPrivateClusterConfigArgs{
 * 				EnablePrivateEndpoint: pulumi.Bool(true),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"label": pulumi.String("key"),
 * 			},
 * 			Annotations: pulumi.StringMap{
 * 				"label-one": pulumi.String("value-one"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = organizations.LookupProject(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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.inputs.WorkstationClusterPrivateClusterConfigArgs;
 * import com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * 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()
 *             .name("workstation-cluster-private")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
 *             .name("workstation-cluster-private")
 *             .ipCidrRange("10.0.0.0/24")
 *             .region("us-central1")
 *             .network(defaultNetwork.name())
 *             .build());
 *         var default_ = new WorkstationCluster("default", WorkstationClusterArgs.builder()
 *             .workstationClusterId("workstation-cluster-private")
 *             .network(defaultNetwork.id())
 *             .subnetwork(defaultSubnetwork.id())
 *             .location("us-central1")
 *             .privateClusterConfig(WorkstationClusterPrivateClusterConfigArgs.builder()
 *                 .enablePrivateEndpoint(true)
 *                 .build())
 *             .labels(Map.of("label", "key"))
 *             .annotations(Map.of("label-one", "value-one"))
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:workstations:WorkstationCluster
 *     properties:
 *       workstationClusterId: workstation-cluster-private
 *       network: ${defaultNetwork.id}
 *       subnetwork: ${defaultSubnetwork.id}
 *       location: us-central1
 *       privateClusterConfig:
 *         enablePrivateEndpoint: true
 *       labels:
 *         label: key
 *       annotations:
 *         label-one: value-one
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     properties:
 *       name: workstation-cluster-private
 *       autoCreateSubnetworks: false
 *   defaultSubnetwork:
 *     type: gcp:compute:Subnetwork
 *     name: default
 *     properties:
 *       name: workstation-cluster-private
 *       ipCidrRange: 10.0.0.0/24
 *       region: us-central1
 *       network: ${defaultNetwork.name}
 * variables:
 *   project:
 *     fn::invoke:
 *       Function: gcp:organizations:getProject
 *       Arguments: {}
 * ```
 * 
 * ### 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({});
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_network = gcp.compute.Network("default",
 *     name="workstation-cluster-custom-domain",
 *     auto_create_subnetworks=False)
 * default_subnetwork = gcp.compute.Subnetwork("default",
 *     name="workstation-cluster-custom-domain",
 *     ip_cidr_range="10.0.0.0/24",
 *     region="us-central1",
 *     network=default_network.name)
 * default = gcp.workstations.WorkstationCluster("default",
 *     workstation_cluster_id="workstation-cluster-custom-domain",
 *     network=default_network.id,
 *     subnetwork=default_subnetwork.id,
 *     location="us-central1",
 *     private_cluster_config=gcp.workstations.WorkstationClusterPrivateClusterConfigArgs(
 *         enable_private_endpoint=True,
 *     ),
 *     domain_config=gcp.workstations.WorkstationClusterDomainConfigArgs(
 *         domain="workstations.example.com",
 *     ),
 *     labels={
 *         "label": "key",
 *     },
 *     annotations={
 *         "label-one": "value-one",
 *     })
 * project = gcp.organizations.get_project()
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var defaultNetwork = new Gcp.Compute.Network("default", new()
 *     {
 *         Name = "workstation-cluster-custom-domain",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
 *     {
 *         Name = "workstation-cluster-custom-domain",
 *         IpCidrRange = "10.0.0.0/24",
 *         Region = "us-central1",
 *         Network = defaultNetwork.Name,
 *     });
 *     var @default = new Gcp.Workstations.WorkstationCluster("default", new()
 *     {
 *         WorkstationClusterId = "workstation-cluster-custom-domain",
 *         Network = defaultNetwork.Id,
 *         Subnetwork = defaultSubnetwork.Id,
 *         Location = "us-central1",
 *         PrivateClusterConfig = new Gcp.Workstations.Inputs.WorkstationClusterPrivateClusterConfigArgs
 *         {
 *             EnablePrivateEndpoint = true,
 *         },
 *         DomainConfig = new Gcp.Workstations.Inputs.WorkstationClusterDomainConfigArgs
 *         {
 *             Domain = "workstations.example.com",
 *         },
 *         Labels =
 *         {
 *             { "label", "key" },
 *         },
 *         Annotations =
 *         {
 *             { "label-one", "value-one" },
 *         },
 *     });
 *     var project = Gcp.Organizations.GetProject.Invoke();
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/workstations"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("workstation-cluster-custom-domain"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
 * 			Name:        pulumi.String("workstation-cluster-custom-domain"),
 * 			IpCidrRange: pulumi.String("10.0.0.0/24"),
 * 			Region:      pulumi.String("us-central1"),
 * 			Network:     defaultNetwork.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = workstations.NewWorkstationCluster(ctx, "default", &workstations.WorkstationClusterArgs{
 * 			WorkstationClusterId: pulumi.String("workstation-cluster-custom-domain"),
 * 			Network:              defaultNetwork.ID(),
 * 			Subnetwork:           defaultSubnetwork.ID(),
 * 			Location:             pulumi.String("us-central1"),
 * 			PrivateClusterConfig: &workstations.WorkstationClusterPrivateClusterConfigArgs{
 * 				EnablePrivateEndpoint: pulumi.Bool(true),
 * 			},
 * 			DomainConfig: &workstations.WorkstationClusterDomainConfigArgs{
 * 				Domain: pulumi.String("workstations.example.com"),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"label": pulumi.String("key"),
 * 			},
 * 			Annotations: pulumi.StringMap{
 * 				"label-one": pulumi.String("value-one"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = organizations.LookupProject(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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.inputs.WorkstationClusterPrivateClusterConfigArgs;
 * import com.pulumi.gcp.workstations.inputs.WorkstationClusterDomainConfigArgs;
 * import com.pulumi.gcp.organizations.OrganizationsFunctions;
 * import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
 * 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()
 *             .name("workstation-cluster-custom-domain")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
 *             .name("workstation-cluster-custom-domain")
 *             .ipCidrRange("10.0.0.0/24")
 *             .region("us-central1")
 *             .network(defaultNetwork.name())
 *             .build());
 *         var default_ = new WorkstationCluster("default", WorkstationClusterArgs.builder()
 *             .workstationClusterId("workstation-cluster-custom-domain")
 *             .network(defaultNetwork.id())
 *             .subnetwork(defaultSubnetwork.id())
 *             .location("us-central1")
 *             .privateClusterConfig(WorkstationClusterPrivateClusterConfigArgs.builder()
 *                 .enablePrivateEndpoint(true)
 *                 .build())
 *             .domainConfig(WorkstationClusterDomainConfigArgs.builder()
 *                 .domain("workstations.example.com")
 *                 .build())
 *             .labels(Map.of("label", "key"))
 *             .annotations(Map.of("label-one", "value-one"))
 *             .build());
 *         final var project = OrganizationsFunctions.getProject();
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:workstations:WorkstationCluster
 *     properties:
 *       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
 *   defaultNetwork:
 *     type: gcp:compute:Network
 *     name: default
 *     properties:
 *       name: workstation-cluster-custom-domain
 *       autoCreateSubnetworks: false
 *   defaultSubnetwork:
 *     type: gcp:compute:Subnetwork
 *     name: default
 *     properties:
 *       name: workstation-cluster-custom-domain
 *       ipCidrRange: 10.0.0.0/24
 *       region: us-central1
 *       network: ${defaultNetwork.name}
 * variables:
 *   project:
 *     fn::invoke:
 *       Function: gcp:organizations:getProject
 *       Arguments: {}
 * ```
 * 
 * ## 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}}
 * ```
 * ```sh
 * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default {{project}}/{{location}}/{{workstation_cluster_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:workstations/workstationCluster:WorkstationCluster default {{location}}/{{workstation_cluster_id}}
 * ```
 * @property annotations 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_annotations` for all of the annotations present on the resource.
 * @property displayName Human-readable name for this resource.
 * @property domainConfig Configuration options for a custom domain.
 * Structure is documented below.
 * @property labels 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_labels` for all of the labels present on the resource.
 * @property location The location where the workstation cluster should reside.
 * @property network 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}".
 * @property privateClusterConfig Configuration for private cluster.
 * Structure is documented below.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property subnetwork 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.
 * @property workstationClusterId ID to use for the workstation cluster.
 * - - -
 */
public data class WorkstationClusterArgs(
    public val annotations: Output>? = null,
    public val displayName: Output? = null,
    public val domainConfig: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val network: Output? = null,
    public val privateClusterConfig: Output? = null,
    public val project: Output? = null,
    public val subnetwork: Output? = null,
    public val workstationClusterId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.workstations.WorkstationClusterArgs =
        com.pulumi.gcp.workstations.WorkstationClusterArgs.builder()
            .annotations(
                annotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .domainConfig(domainConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .network(network?.applyValue({ args0 -> args0 }))
            .privateClusterConfig(
                privateClusterConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .project(project?.applyValue({ args0 -> args0 }))
            .subnetwork(subnetwork?.applyValue({ args0 -> args0 }))
            .workstationClusterId(workstationClusterId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WorkstationClusterArgs].
 */
@PulumiTagMarker
public class WorkstationClusterArgsBuilder internal constructor() {
    private var annotations: Output>? = null

    private var displayName: Output? = null

    private var domainConfig: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var network: Output? = null

    private var privateClusterConfig: Output? = null

    private var project: Output? = null

    private var subnetwork: Output? = null

    private var workstationClusterId: Output? = null

    /**
     * @param value 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_annotations` for all of the annotations present on the resource.
     */
    @JvmName("ancrsffvrhudbayi")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    /**
     * @param value Human-readable name for this resource.
     */
    @JvmName("jjhwknjbswqgrohs")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Configuration options for a custom domain.
     * Structure is documented below.
     */
    @JvmName("kycduindtgfwfoxa")
    public suspend fun domainConfig(`value`: Output) {
        this.domainConfig = value
    }

    /**
     * @param value 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_labels` for all of the labels present on the resource.
     */
    @JvmName("tmxxqanrjihntjsd")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The location where the workstation cluster should reside.
     */
    @JvmName("fjmoqkxxmlmusxdf")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value 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}".
     */
    @JvmName("ibhnndobyglyoagg")
    public suspend fun network(`value`: Output) {
        this.network = value
    }

    /**
     * @param value Configuration for private cluster.
     * Structure is documented below.
     */
    @JvmName("jtqtxtncrnqgtrhj")
    public suspend fun privateClusterConfig(`value`: Output) {
        this.privateClusterConfig = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("lwnshttlnenbrwde")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value 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.
     */
    @JvmName("dgynbjlnetdklnqx")
    public suspend fun subnetwork(`value`: Output) {
        this.subnetwork = value
    }

    /**
     * @param value ID to use for the workstation cluster.
     * - - -
     */
    @JvmName("ymfuxhpqtgdgbems")
    public suspend fun workstationClusterId(`value`: Output) {
        this.workstationClusterId = value
    }

    /**
     * @param value 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_annotations` for all of the annotations present on the resource.
     */
    @JvmName("bdayweqrteixvxwj")
    public suspend fun annotations(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values 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_annotations` for all of the annotations present on the resource.
     */
    @JvmName("olcelctiyijyueqn")
    public fun annotations(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value Human-readable name for this resource.
     */
    @JvmName("wjhjljtyqsriioaq")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Configuration options for a custom domain.
     * Structure is documented below.
     */
    @JvmName("jbutiewjvgbyseta")
    public suspend fun domainConfig(`value`: WorkstationClusterDomainConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainConfig = mapped
    }

    /**
     * @param argument Configuration options for a custom domain.
     * Structure is documented below.
     */
    @JvmName("rdjsdsxsmpanvtjf")
    public suspend fun domainConfig(argument: suspend WorkstationClusterDomainConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WorkstationClusterDomainConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.domainConfig = mapped
    }

    /**
     * @param value 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_labels` for all of the labels present on the resource.
     */
    @JvmName("kxynucvctjhfmwlm")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values 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_labels` for all of the labels present on the resource.
     */
    @JvmName("sflnkjvsommpfmcj")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The location where the workstation cluster should reside.
     */
    @JvmName("wbmlkshndslhemah")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value 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}".
     */
    @JvmName("raoetaqxcmfckxbn")
    public suspend fun network(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.network = mapped
    }

    /**
     * @param value Configuration for private cluster.
     * Structure is documented below.
     */
    @JvmName("ffyhhlmqxcdovjqh")
    public suspend fun privateClusterConfig(`value`: WorkstationClusterPrivateClusterConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateClusterConfig = mapped
    }

    /**
     * @param argument Configuration for private cluster.
     * Structure is documented below.
     */
    @JvmName("aaqfaumjxpnqpbrw")
    public suspend fun privateClusterConfig(argument: suspend WorkstationClusterPrivateClusterConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WorkstationClusterPrivateClusterConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.privateClusterConfig = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("lpmlaoxrsulxaodd")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("sxvkaeomrmmneuxs")
    public suspend fun subnetwork(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetwork = mapped
    }

    /**
     * @param value ID to use for the workstation cluster.
     * - - -
     */
    @JvmName("gvgnsmptbckrldte")
    public suspend fun workstationClusterId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workstationClusterId = mapped
    }

    internal fun build(): WorkstationClusterArgs = WorkstationClusterArgs(
        annotations = annotations,
        displayName = displayName,
        domainConfig = domainConfig,
        labels = labels,
        location = location,
        network = network,
        privateClusterConfig = privateClusterConfig,
        project = project,
        subnetwork = subnetwork,
        workstationClusterId = workstationClusterId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy