Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.vmwareengine.kotlin.PrivateCloud.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.vmwareengine.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudHcx
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudManagementCluster
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudNetworkConfig
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudNsx
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudVcenter
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudHcx.Companion.toKotlin as privateCloudHcxToKotlin
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudManagementCluster.Companion.toKotlin as privateCloudManagementClusterToKotlin
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudNetworkConfig.Companion.toKotlin as privateCloudNetworkConfigToKotlin
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudNsx.Companion.toKotlin as privateCloudNsxToKotlin
import com.pulumi.gcp.vmwareengine.kotlin.outputs.PrivateCloudVcenter.Companion.toKotlin as privateCloudVcenterToKotlin
/**
* Builder for [PrivateCloud].
*/
@PulumiTagMarker
public class PrivateCloudResourceBuilder internal constructor() {
public var name: String? = null
public var args: PrivateCloudArgs = PrivateCloudArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend PrivateCloudArgsBuilder.() -> Unit) {
val builder = PrivateCloudArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): PrivateCloud {
val builtJavaResource = com.pulumi.gcp.vmwareengine.PrivateCloud(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PrivateCloud(builtJavaResource)
}
}
/**
* Represents a private cloud resource. Private clouds are zonal resources.
* To get more information about PrivateCloud, see:
* * [API documentation](https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.privateClouds)
* ## Example Usage
* ### Vmware Engine Private Cloud Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const pc_nw = new gcp.vmwareengine.Network("pc-nw", {
* name: "pc-nw",
* location: "global",
* type: "STANDARD",
* description: "PC network description.",
* });
* const vmw_engine_pc = new gcp.vmwareengine.PrivateCloud("vmw-engine-pc", {
* location: "us-west1-a",
* name: "sample-pc",
* description: "Sample test PC.",
* networkConfig: {
* managementCidr: "192.168.30.0/24",
* vmwareEngineNetwork: pc_nw.id,
* },
* managementCluster: {
* clusterId: "sample-mgmt-cluster",
* nodeTypeConfigs: [{
* nodeTypeId: "standard-72",
* nodeCount: 3,
* }],
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* pc_nw = gcp.vmwareengine.Network("pc-nw",
* name="pc-nw",
* location="global",
* type="STANDARD",
* description="PC network description.")
* vmw_engine_pc = gcp.vmwareengine.PrivateCloud("vmw-engine-pc",
* location="us-west1-a",
* name="sample-pc",
* description="Sample test PC.",
* network_config={
* "management_cidr": "192.168.30.0/24",
* "vmware_engine_network": pc_nw.id,
* },
* management_cluster={
* "cluster_id": "sample-mgmt-cluster",
* "node_type_configs": [{
* "node_type_id": "standard-72",
* "node_count": 3,
* }],
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var pc_nw = new Gcp.VMwareEngine.Network("pc-nw", new()
* {
* Name = "pc-nw",
* Location = "global",
* Type = "STANDARD",
* Description = "PC network description.",
* });
* var vmw_engine_pc = new Gcp.VMwareEngine.PrivateCloud("vmw-engine-pc", new()
* {
* Location = "us-west1-a",
* Name = "sample-pc",
* Description = "Sample test PC.",
* NetworkConfig = new Gcp.VMwareEngine.Inputs.PrivateCloudNetworkConfigArgs
* {
* ManagementCidr = "192.168.30.0/24",
* VmwareEngineNetwork = pc_nw.Id,
* },
* ManagementCluster = new Gcp.VMwareEngine.Inputs.PrivateCloudManagementClusterArgs
* {
* ClusterId = "sample-mgmt-cluster",
* NodeTypeConfigs = new[]
* {
* new Gcp.VMwareEngine.Inputs.PrivateCloudManagementClusterNodeTypeConfigArgs
* {
* NodeTypeId = "standard-72",
* NodeCount = 3,
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/vmwareengine"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := vmwareengine.NewNetwork(ctx, "pc-nw", &vmwareengine.NetworkArgs{
* Name: pulumi.String("pc-nw"),
* Location: pulumi.String("global"),
* Type: pulumi.String("STANDARD"),
* Description: pulumi.String("PC network description."),
* })
* if err != nil {
* return err
* }
* _, err = vmwareengine.NewPrivateCloud(ctx, "vmw-engine-pc", &vmwareengine.PrivateCloudArgs{
* Location: pulumi.String("us-west1-a"),
* Name: pulumi.String("sample-pc"),
* Description: pulumi.String("Sample test PC."),
* NetworkConfig: &vmwareengine.PrivateCloudNetworkConfigArgs{
* ManagementCidr: pulumi.String("192.168.30.0/24"),
* VmwareEngineNetwork: pc_nw.ID(),
* },
* ManagementCluster: &vmwareengine.PrivateCloudManagementClusterArgs{
* ClusterId: pulumi.String("sample-mgmt-cluster"),
* NodeTypeConfigs: vmwareengine.PrivateCloudManagementClusterNodeTypeConfigArray{
* &vmwareengine.PrivateCloudManagementClusterNodeTypeConfigArgs{
* NodeTypeId: pulumi.String("standard-72"),
* NodeCount: pulumi.Int(3),
* },
* },
* },
* })
* 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.vmwareengine.Network;
* import com.pulumi.gcp.vmwareengine.NetworkArgs;
* import com.pulumi.gcp.vmwareengine.PrivateCloud;
* import com.pulumi.gcp.vmwareengine.PrivateCloudArgs;
* import com.pulumi.gcp.vmwareengine.inputs.PrivateCloudNetworkConfigArgs;
* import com.pulumi.gcp.vmwareengine.inputs.PrivateCloudManagementClusterArgs;
* 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 pc_nw = new Network("pc-nw", NetworkArgs.builder()
* .name("pc-nw")
* .location("global")
* .type("STANDARD")
* .description("PC network description.")
* .build());
* var vmw_engine_pc = new PrivateCloud("vmw-engine-pc", PrivateCloudArgs.builder()
* .location("us-west1-a")
* .name("sample-pc")
* .description("Sample test PC.")
* .networkConfig(PrivateCloudNetworkConfigArgs.builder()
* .managementCidr("192.168.30.0/24")
* .vmwareEngineNetwork(pc_nw.id())
* .build())
* .managementCluster(PrivateCloudManagementClusterArgs.builder()
* .clusterId("sample-mgmt-cluster")
* .nodeTypeConfigs(PrivateCloudManagementClusterNodeTypeConfigArgs.builder()
* .nodeTypeId("standard-72")
* .nodeCount(3)
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vmw-engine-pc:
* type: gcp:vmwareengine:PrivateCloud
* properties:
* location: us-west1-a
* name: sample-pc
* description: Sample test PC.
* networkConfig:
* managementCidr: 192.168.30.0/24
* vmwareEngineNetwork: ${["pc-nw"].id}
* managementCluster:
* clusterId: sample-mgmt-cluster
* nodeTypeConfigs:
* - nodeTypeId: standard-72
* nodeCount: 3
* pc-nw:
* type: gcp:vmwareengine:Network
* properties:
* name: pc-nw
* location: global
* type: STANDARD
* description: PC network description.
* ```
*
* ### Vmware Engine Private Cloud Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const pc_nw = new gcp.vmwareengine.Network("pc-nw", {
* name: "pc-nw",
* location: "global",
* type: "STANDARD",
* description: "PC network description.",
* });
* const vmw_engine_pc = new gcp.vmwareengine.PrivateCloud("vmw-engine-pc", {
* location: "us-west1-a",
* name: "sample-pc",
* description: "Sample test PC.",
* type: "TIME_LIMITED",
* networkConfig: {
* managementCidr: "192.168.30.0/24",
* vmwareEngineNetwork: pc_nw.id,
* },
* managementCluster: {
* clusterId: "sample-mgmt-cluster",
* nodeTypeConfigs: [{
* nodeTypeId: "standard-72",
* nodeCount: 1,
* customCoreCount: 32,
* }],
* },
* deletionDelayHours: 0,
* sendDeletionDelayHoursIfZero: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* pc_nw = gcp.vmwareengine.Network("pc-nw",
* name="pc-nw",
* location="global",
* type="STANDARD",
* description="PC network description.")
* vmw_engine_pc = gcp.vmwareengine.PrivateCloud("vmw-engine-pc",
* location="us-west1-a",
* name="sample-pc",
* description="Sample test PC.",
* type="TIME_LIMITED",
* network_config={
* "management_cidr": "192.168.30.0/24",
* "vmware_engine_network": pc_nw.id,
* },
* management_cluster={
* "cluster_id": "sample-mgmt-cluster",
* "node_type_configs": [{
* "node_type_id": "standard-72",
* "node_count": 1,
* "custom_core_count": 32,
* }],
* },
* deletion_delay_hours=0,
* send_deletion_delay_hours_if_zero=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var pc_nw = new Gcp.VMwareEngine.Network("pc-nw", new()
* {
* Name = "pc-nw",
* Location = "global",
* Type = "STANDARD",
* Description = "PC network description.",
* });
* var vmw_engine_pc = new Gcp.VMwareEngine.PrivateCloud("vmw-engine-pc", new()
* {
* Location = "us-west1-a",
* Name = "sample-pc",
* Description = "Sample test PC.",
* Type = "TIME_LIMITED",
* NetworkConfig = new Gcp.VMwareEngine.Inputs.PrivateCloudNetworkConfigArgs
* {
* ManagementCidr = "192.168.30.0/24",
* VmwareEngineNetwork = pc_nw.Id,
* },
* ManagementCluster = new Gcp.VMwareEngine.Inputs.PrivateCloudManagementClusterArgs
* {
* ClusterId = "sample-mgmt-cluster",
* NodeTypeConfigs = new[]
* {
* new Gcp.VMwareEngine.Inputs.PrivateCloudManagementClusterNodeTypeConfigArgs
* {
* NodeTypeId = "standard-72",
* NodeCount = 1,
* CustomCoreCount = 32,
* },
* },
* },
* DeletionDelayHours = 0,
* SendDeletionDelayHoursIfZero = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/vmwareengine"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := vmwareengine.NewNetwork(ctx, "pc-nw", &vmwareengine.NetworkArgs{
* Name: pulumi.String("pc-nw"),
* Location: pulumi.String("global"),
* Type: pulumi.String("STANDARD"),
* Description: pulumi.String("PC network description."),
* })
* if err != nil {
* return err
* }
* _, err = vmwareengine.NewPrivateCloud(ctx, "vmw-engine-pc", &vmwareengine.PrivateCloudArgs{
* Location: pulumi.String("us-west1-a"),
* Name: pulumi.String("sample-pc"),
* Description: pulumi.String("Sample test PC."),
* Type: pulumi.String("TIME_LIMITED"),
* NetworkConfig: &vmwareengine.PrivateCloudNetworkConfigArgs{
* ManagementCidr: pulumi.String("192.168.30.0/24"),
* VmwareEngineNetwork: pc_nw.ID(),
* },
* ManagementCluster: &vmwareengine.PrivateCloudManagementClusterArgs{
* ClusterId: pulumi.String("sample-mgmt-cluster"),
* NodeTypeConfigs: vmwareengine.PrivateCloudManagementClusterNodeTypeConfigArray{
* &vmwareengine.PrivateCloudManagementClusterNodeTypeConfigArgs{
* NodeTypeId: pulumi.String("standard-72"),
* NodeCount: pulumi.Int(1),
* CustomCoreCount: pulumi.Int(32),
* },
* },
* },
* DeletionDelayHours: pulumi.Int(0),
* SendDeletionDelayHoursIfZero: pulumi.Bool(true),
* })
* 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.vmwareengine.Network;
* import com.pulumi.gcp.vmwareengine.NetworkArgs;
* import com.pulumi.gcp.vmwareengine.PrivateCloud;
* import com.pulumi.gcp.vmwareengine.PrivateCloudArgs;
* import com.pulumi.gcp.vmwareengine.inputs.PrivateCloudNetworkConfigArgs;
* import com.pulumi.gcp.vmwareengine.inputs.PrivateCloudManagementClusterArgs;
* 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 pc_nw = new Network("pc-nw", NetworkArgs.builder()
* .name("pc-nw")
* .location("global")
* .type("STANDARD")
* .description("PC network description.")
* .build());
* var vmw_engine_pc = new PrivateCloud("vmw-engine-pc", PrivateCloudArgs.builder()
* .location("us-west1-a")
* .name("sample-pc")
* .description("Sample test PC.")
* .type("TIME_LIMITED")
* .networkConfig(PrivateCloudNetworkConfigArgs.builder()
* .managementCidr("192.168.30.0/24")
* .vmwareEngineNetwork(pc_nw.id())
* .build())
* .managementCluster(PrivateCloudManagementClusterArgs.builder()
* .clusterId("sample-mgmt-cluster")
* .nodeTypeConfigs(PrivateCloudManagementClusterNodeTypeConfigArgs.builder()
* .nodeTypeId("standard-72")
* .nodeCount(1)
* .customCoreCount(32)
* .build())
* .build())
* .deletionDelayHours(0)
* .sendDeletionDelayHoursIfZero(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vmw-engine-pc:
* type: gcp:vmwareengine:PrivateCloud
* properties:
* location: us-west1-a
* name: sample-pc
* description: Sample test PC.
* type: TIME_LIMITED
* networkConfig:
* managementCidr: 192.168.30.0/24
* vmwareEngineNetwork: ${["pc-nw"].id}
* managementCluster:
* clusterId: sample-mgmt-cluster
* nodeTypeConfigs:
* - nodeTypeId: standard-72
* nodeCount: 1
* customCoreCount: 32
* deletionDelayHours: 0
* sendDeletionDelayHoursIfZero: true
* pc-nw:
* type: gcp:vmwareengine:Network
* properties:
* name: pc-nw
* location: global
* type: STANDARD
* description: PC network description.
* ```
*
* ## Import
* PrivateCloud can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/privateClouds/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* When using the `pulumi import` command, PrivateCloud can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default projects/{{project}}/locations/{{location}}/privateClouds/{{name}}
* ```
* ```sh
* $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default {{location}}/{{name}}
* ```
*/
public class PrivateCloud internal constructor(
override val javaResource: com.pulumi.gcp.vmwareengine.PrivateCloud,
) : KotlinCustomResource(javaResource, PrivateCloudMapper) {
/**
* The number of hours to delay this request. You can set this value to an hour between 0 to 8, where setting it to 0
* starts the deletion request immediately. If no value is set, a default value is set at the API Level.
*/
public val deletionDelayHours: Output?
get() = javaResource.deletionDelayHours().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* User-provided description for this private cloud.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Details about a HCX Cloud Manager appliance.
* Structure is documented below.
*/
public val hcxes: Output>
get() = javaResource.hcxes().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
privateCloudHcxToKotlin(args0)
})
})
})
/**
* The location where the PrivateCloud should reside.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The management cluster for this private cloud. This used for creating and managing the default cluster.
* Structure is documented below.
*/
public val managementCluster: Output
get() = javaResource.managementCluster().applyValue({ args0 ->
args0.let({ args0 ->
privateCloudManagementClusterToKotlin(args0)
})
})
/**
* The ID of the PrivateCloud.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Network configuration in the consumer project with which the peering has to be done.
* Structure is documented below.
*/
public val networkConfig: Output
get() = javaResource.networkConfig().applyValue({ args0 ->
args0.let({ args0 ->
privateCloudNetworkConfigToKotlin(args0)
})
})
/**
* Details about a NSX Manager appliance.
* Structure is documented below.
*/
public val nsxes: Output>
get() = javaResource.nsxes().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
privateCloudNsxToKotlin(args0)
})
})
})
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* While set true, deletion_delay_hours value will be sent in the request even for zero value of the field. This field is
* only useful for setting 0 value to the deletion_delay_hours field. It can be used both alone and together with
* deletion_delay_hours.
*/
public val sendDeletionDelayHoursIfZero: Output?
get() = javaResource.sendDeletionDelayHoursIfZero().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* State of the appliance.
* Possible values are: `ACTIVE`, `CREATING`.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
/**
* Initial type of the private cloud. Possible values: ["STANDARD", "TIME_LIMITED", "STRETCHED"]
*/
public val type: Output?
get() = javaResource.type().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* System-generated unique identifier for the resource.
*/
public val uid: Output
get() = javaResource.uid().applyValue({ args0 -> args0 })
/**
* Details about a vCenter Server management appliance.
* Structure is documented below.
*/
public val vcenters: Output>
get() = javaResource.vcenters().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
privateCloudVcenterToKotlin(args0)
})
})
})
}
public object PrivateCloudMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.vmwareengine.PrivateCloud::class == javaResource::class
override fun map(javaResource: Resource): PrivateCloud = PrivateCloud(
javaResource as
com.pulumi.gcp.vmwareengine.PrivateCloud,
)
}
/**
* @see [PrivateCloud].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [PrivateCloud].
*/
public suspend fun privateCloud(
name: String,
block: suspend PrivateCloudResourceBuilder.() -> Unit,
): PrivateCloud {
val builder = PrivateCloudResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [PrivateCloud].
* @param name The _unique_ name of the resulting resource.
*/
public fun privateCloud(name: String): PrivateCloud {
val builder = PrivateCloudResourceBuilder()
builder.name(name)
return builder.build()
}