com.pulumi.gcp.vmwareengine.kotlin.ExternalAddress.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.vmwareengine.kotlin
import com.pulumi.core.Output
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.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [ExternalAddress].
*/
@PulumiTagMarker
public class ExternalAddressResourceBuilder internal constructor() {
public var name: String? = null
public var args: ExternalAddressArgs = ExternalAddressArgs()
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 ExternalAddressArgsBuilder.() -> Unit) {
val builder = ExternalAddressArgsBuilder()
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(): ExternalAddress {
val builtJavaResource = com.pulumi.gcp.vmwareengine.ExternalAddress(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ExternalAddress(builtJavaResource)
}
}
/**
* An allocated external IP address and its corresponding internal IP address in a private cloud.
* To get more information about ExternalAddress, see:
* * [API documentation](https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.privateClouds.externalAddresses)
* ## Example Usage
* ### Vmware Engine External Address Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const external_address_nw = new gcp.vmwareengine.Network("external-address-nw", {
* name: "pc-nw",
* location: "global",
* type: "STANDARD",
* description: "PC network description.",
* });
* const external_address_pc = new gcp.vmwareengine.PrivateCloud("external-address-pc", {
* location: "-a",
* name: "sample-pc",
* description: "Sample test PC.",
* networkConfig: {
* managementCidr: "192.168.50.0/24",
* vmwareEngineNetwork: external_address_nw.id,
* },
* managementCluster: {
* clusterId: "sample-mgmt-cluster",
* nodeTypeConfigs: [{
* nodeTypeId: "standard-72",
* nodeCount: 3,
* }],
* },
* });
* const external_address_np = new gcp.vmwareengine.NetworkPolicy("external-address-np", {
* location: "",
* name: "sample-np",
* edgeServicesCidr: "192.168.30.0/26",
* vmwareEngineNetwork: external_address_nw.id,
* });
* const vmw_engine_external_address = new gcp.vmwareengine.ExternalAddress("vmw-engine-external-address", {
* name: "sample-external-address",
* parent: external_address_pc.id,
* internalIp: "192.168.0.66",
* description: "Sample description.",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* external_address_nw = gcp.vmwareengine.Network("external-address-nw",
* name="pc-nw",
* location="global",
* type="STANDARD",
* description="PC network description.")
* external_address_pc = gcp.vmwareengine.PrivateCloud("external-address-pc",
* location="-a",
* name="sample-pc",
* description="Sample test PC.",
* network_config=gcp.vmwareengine.PrivateCloudNetworkConfigArgs(
* management_cidr="192.168.50.0/24",
* vmware_engine_network=external_address_nw.id,
* ),
* management_cluster=gcp.vmwareengine.PrivateCloudManagementClusterArgs(
* cluster_id="sample-mgmt-cluster",
* node_type_configs=[gcp.vmwareengine.PrivateCloudManagementClusterNodeTypeConfigArgs(
* node_type_id="standard-72",
* node_count=3,
* )],
* ))
* external_address_np = gcp.vmwareengine.NetworkPolicy("external-address-np",
* location="",
* name="sample-np",
* edge_services_cidr="192.168.30.0/26",
* vmware_engine_network=external_address_nw.id)
* vmw_engine_external_address = gcp.vmwareengine.ExternalAddress("vmw-engine-external-address",
* name="sample-external-address",
* parent=external_address_pc.id,
* internal_ip="192.168.0.66",
* description="Sample description.")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var external_address_nw = new Gcp.VMwareEngine.Network("external-address-nw", new()
* {
* Name = "pc-nw",
* Location = "global",
* Type = "STANDARD",
* Description = "PC network description.",
* });
* var external_address_pc = new Gcp.VMwareEngine.PrivateCloud("external-address-pc", new()
* {
* Location = "-a",
* Name = "sample-pc",
* Description = "Sample test PC.",
* NetworkConfig = new Gcp.VMwareEngine.Inputs.PrivateCloudNetworkConfigArgs
* {
* ManagementCidr = "192.168.50.0/24",
* VmwareEngineNetwork = external_address_nw.Id,
* },
* ManagementCluster = new Gcp.VMwareEngine.Inputs.PrivateCloudManagementClusterArgs
* {
* ClusterId = "sample-mgmt-cluster",
* NodeTypeConfigs = new[]
* {
* new Gcp.VMwareEngine.Inputs.PrivateCloudManagementClusterNodeTypeConfigArgs
* {
* NodeTypeId = "standard-72",
* NodeCount = 3,
* },
* },
* },
* });
* var external_address_np = new Gcp.VMwareEngine.NetworkPolicy("external-address-np", new()
* {
* Location = "",
* Name = "sample-np",
* EdgeServicesCidr = "192.168.30.0/26",
* VmwareEngineNetwork = external_address_nw.Id,
* });
* var vmw_engine_external_address = new Gcp.VMwareEngine.ExternalAddress("vmw-engine-external-address", new()
* {
* Name = "sample-external-address",
* Parent = external_address_pc.Id,
* InternalIp = "192.168.0.66",
* Description = "Sample description.",
* });
* });
* ```
* ```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, "external-address-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, "external-address-pc", &vmwareengine.PrivateCloudArgs{
* Location: pulumi.String("-a"),
* Name: pulumi.String("sample-pc"),
* Description: pulumi.String("Sample test PC."),
* NetworkConfig: &vmwareengine.PrivateCloudNetworkConfigArgs{
* ManagementCidr: pulumi.String("192.168.50.0/24"),
* VmwareEngineNetwork: external_address_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
* }
* _, err = vmwareengine.NewNetworkPolicy(ctx, "external-address-np", &vmwareengine.NetworkPolicyArgs{
* Location: pulumi.String(""),
* Name: pulumi.String("sample-np"),
* EdgeServicesCidr: pulumi.String("192.168.30.0/26"),
* VmwareEngineNetwork: external_address_nw.ID(),
* })
* if err != nil {
* return err
* }
* _, err = vmwareengine.NewExternalAddress(ctx, "vmw-engine-external-address", &vmwareengine.ExternalAddressArgs{
* Name: pulumi.String("sample-external-address"),
* Parent: external_address_pc.ID(),
* InternalIp: pulumi.String("192.168.0.66"),
* Description: pulumi.String("Sample description."),
* })
* 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 com.pulumi.gcp.vmwareengine.NetworkPolicy;
* import com.pulumi.gcp.vmwareengine.NetworkPolicyArgs;
* import com.pulumi.gcp.vmwareengine.ExternalAddress;
* import com.pulumi.gcp.vmwareengine.ExternalAddressArgs;
* 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 external_address_nw = new Network("external-address-nw", NetworkArgs.builder()
* .name("pc-nw")
* .location("global")
* .type("STANDARD")
* .description("PC network description.")
* .build());
* var external_address_pc = new PrivateCloud("external-address-pc", PrivateCloudArgs.builder()
* .location("-a")
* .name("sample-pc")
* .description("Sample test PC.")
* .networkConfig(PrivateCloudNetworkConfigArgs.builder()
* .managementCidr("192.168.50.0/24")
* .vmwareEngineNetwork(external_address_nw.id())
* .build())
* .managementCluster(PrivateCloudManagementClusterArgs.builder()
* .clusterId("sample-mgmt-cluster")
* .nodeTypeConfigs(PrivateCloudManagementClusterNodeTypeConfigArgs.builder()
* .nodeTypeId("standard-72")
* .nodeCount(3)
* .build())
* .build())
* .build());
* var external_address_np = new NetworkPolicy("external-address-np", NetworkPolicyArgs.builder()
* .location("")
* .name("sample-np")
* .edgeServicesCidr("192.168.30.0/26")
* .vmwareEngineNetwork(external_address_nw.id())
* .build());
* var vmw_engine_external_address = new ExternalAddress("vmw-engine-external-address", ExternalAddressArgs.builder()
* .name("sample-external-address")
* .parent(external_address_pc.id())
* .internalIp("192.168.0.66")
* .description("Sample description.")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* external-address-nw:
* type: gcp:vmwareengine:Network
* properties:
* name: pc-nw
* location: global
* type: STANDARD
* description: PC network description.
* external-address-pc:
* type: gcp:vmwareengine:PrivateCloud
* properties:
* location: -a
* name: sample-pc
* description: Sample test PC.
* networkConfig:
* managementCidr: 192.168.50.0/24
* vmwareEngineNetwork: ${["external-address-nw"].id}
* managementCluster:
* clusterId: sample-mgmt-cluster
* nodeTypeConfigs:
* - nodeTypeId: standard-72
* nodeCount: 3
* external-address-np:
* type: gcp:vmwareengine:NetworkPolicy
* properties:
* location:
* name: sample-np
* edgeServicesCidr: 192.168.30.0/26
* vmwareEngineNetwork: ${["external-address-nw"].id}
* vmw-engine-external-address:
* type: gcp:vmwareengine:ExternalAddress
* properties:
* name: sample-external-address
* parent: ${["external-address-pc"].id}
* internalIp: 192.168.0.66
* description: Sample description.
* ```
*
* ## Import
* ExternalAddress can be imported using any of these accepted formats:
* * `{{parent}}/externalAddresses/{{name}}`
* When using the `pulumi import` command, ExternalAddress can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:vmwareengine/externalAddress:ExternalAddress default {{parent}}/externalAddresses/{{name}}
* ```
*/
public class ExternalAddress internal constructor(
override val javaResource: com.pulumi.gcp.vmwareengine.ExternalAddress,
) : KotlinCustomResource(javaResource, ExternalAddressMapper) {
/**
* Creation time of this resource.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
* up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* User-provided description for this resource.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The external IP address of a workload VM.
*/
public val externalIp: Output
get() = javaResource.externalIp().applyValue({ args0 -> args0 })
/**
* The internal IP address of a workload VM.
*/
public val internalIp: Output
get() = javaResource.internalIp().applyValue({ args0 -> args0 })
/**
* The ID of the external IP Address.
* - - -
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The resource name of the private cloud to create a new external address in.
* Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names.
* For example: projects/my-project/locations/us-west1-a/privateClouds/my-cloud
*/
public val parent: Output
get() = javaResource.parent().applyValue({ args0 -> args0 })
/**
* State of the resource.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
/**
* System-generated unique identifier for the resource.
*/
public val uid: Output
get() = javaResource.uid().applyValue({ args0 -> args0 })
/**
* Last updated time of this resource.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
* fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
public val updateTime: Output
get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}
public object ExternalAddressMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.vmwareengine.ExternalAddress::class == javaResource::class
override fun map(javaResource: Resource): ExternalAddress = ExternalAddress(
javaResource as
com.pulumi.gcp.vmwareengine.ExternalAddress,
)
}
/**
* @see [ExternalAddress].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ExternalAddress].
*/
public suspend fun externalAddress(
name: String,
block: suspend ExternalAddressResourceBuilder.() -> Unit,
): ExternalAddress {
val builder = ExternalAddressResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ExternalAddress].
* @param name The _unique_ name of the resulting resource.
*/
public fun externalAddress(name: String): ExternalAddress {
val builder = ExternalAddressResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy