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

com.pulumi.gcp.gkeonprem.kotlin.VMwareNodePool.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.gkeonprem.kotlin

import com.pulumi.core.Output
import com.pulumi.gcp.gkeonprem.kotlin.outputs.VMwareNodePoolConfig
import com.pulumi.gcp.gkeonprem.kotlin.outputs.VMwareNodePoolNodePoolAutoscaling
import com.pulumi.gcp.gkeonprem.kotlin.outputs.VMwareNodePoolStatus
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
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.gkeonprem.kotlin.outputs.VMwareNodePoolConfig.Companion.toKotlin as vMwareNodePoolConfigToKotlin
import com.pulumi.gcp.gkeonprem.kotlin.outputs.VMwareNodePoolNodePoolAutoscaling.Companion.toKotlin as vMwareNodePoolNodePoolAutoscalingToKotlin
import com.pulumi.gcp.gkeonprem.kotlin.outputs.VMwareNodePoolStatus.Companion.toKotlin as vMwareNodePoolStatusToKotlin

/**
 * Builder for [VMwareNodePool].
 */
@PulumiTagMarker
public class VMwareNodePoolResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: VMwareNodePoolArgs = VMwareNodePoolArgs()

    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 VMwareNodePoolArgsBuilder.() -> Unit) {
        val builder = VMwareNodePoolArgsBuilder()
        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(): VMwareNodePool {
        val builtJavaResource = com.pulumi.gcp.gkeonprem.VMwareNodePool(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return VMwareNodePool(builtJavaResource)
    }
}

/**
 * A Google Vmware Node Pool.
 * ## Example Usage
 * ### Gkeonprem Vmware Node Pool Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const default_basic = new gcp.gkeonprem.VMwareCluster("default-basic", {
 *     name: "my-cluster",
 *     location: "us-west1",
 *     adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *     description: "test cluster",
 *     onPremVersion: "1.13.1-gke.35",
 *     networkConfig: {
 *         serviceAddressCidrBlocks: ["10.96.0.0/12"],
 *         podAddressCidrBlocks: ["192.168.0.0/16"],
 *         dhcpIpConfig: {
 *             enabled: true,
 *         },
 *     },
 *     controlPlaneNode: {
 *         cpus: 4,
 *         memory: 8192,
 *         replicas: 1,
 *     },
 *     loadBalancer: {
 *         vipConfig: {
 *             controlPlaneVip: "10.251.133.5",
 *             ingressVip: "10.251.135.19",
 *         },
 *         metalLbConfig: {
 *             addressPools: [
 *                 {
 *                     pool: "ingress-ip",
 *                     manualAssign: true,
 *                     addresses: ["10.251.135.19"],
 *                 },
 *                 {
 *                     pool: "lb-test-ip",
 *                     manualAssign: true,
 *                     addresses: ["10.251.135.19"],
 *                 },
 *             ],
 *         },
 *     },
 * });
 * const nodepool_basic = new gcp.gkeonprem.VMwareNodePool("nodepool-basic", {
 *     name: "my-nodepool",
 *     location: "us-west1",
 *     vmwareCluster: default_basic.name,
 *     config: {
 *         replicas: 3,
 *         imageType: "ubuntu_containerd",
 *         enableLoadBalancer: true,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default_basic = gcp.gkeonprem.VMwareCluster("default-basic",
 *     name="my-cluster",
 *     location="us-west1",
 *     admin_cluster_membership="projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *     description="test cluster",
 *     on_prem_version="1.13.1-gke.35",
 *     network_config=gcp.gkeonprem.VMwareClusterNetworkConfigArgs(
 *         service_address_cidr_blocks=["10.96.0.0/12"],
 *         pod_address_cidr_blocks=["192.168.0.0/16"],
 *         dhcp_ip_config=gcp.gkeonprem.VMwareClusterNetworkConfigDhcpIpConfigArgs(
 *             enabled=True,
 *         ),
 *     ),
 *     control_plane_node=gcp.gkeonprem.VMwareClusterControlPlaneNodeArgs(
 *         cpus=4,
 *         memory=8192,
 *         replicas=1,
 *     ),
 *     load_balancer=gcp.gkeonprem.VMwareClusterLoadBalancerArgs(
 *         vip_config=gcp.gkeonprem.VMwareClusterLoadBalancerVipConfigArgs(
 *             control_plane_vip="10.251.133.5",
 *             ingress_vip="10.251.135.19",
 *         ),
 *         metal_lb_config=gcp.gkeonprem.VMwareClusterLoadBalancerMetalLbConfigArgs(
 *             address_pools=[
 *                 gcp.gkeonprem.VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs(
 *                     pool="ingress-ip",
 *                     manual_assign=True,
 *                     addresses=["10.251.135.19"],
 *                 ),
 *                 gcp.gkeonprem.VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs(
 *                     pool="lb-test-ip",
 *                     manual_assign=True,
 *                     addresses=["10.251.135.19"],
 *                 ),
 *             ],
 *         ),
 *     ))
 * nodepool_basic = gcp.gkeonprem.VMwareNodePool("nodepool-basic",
 *     name="my-nodepool",
 *     location="us-west1",
 *     vmware_cluster=default_basic.name,
 *     config=gcp.gkeonprem.VMwareNodePoolConfigArgs(
 *         replicas=3,
 *         image_type="ubuntu_containerd",
 *         enable_load_balancer=True,
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var default_basic = new Gcp.GkeOnPrem.VMwareCluster("default-basic", new()
 *     {
 *         Name = "my-cluster",
 *         Location = "us-west1",
 *         AdminClusterMembership = "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 *         Description = "test cluster",
 *         OnPremVersion = "1.13.1-gke.35",
 *         NetworkConfig = new Gcp.GkeOnPrem.Inputs.VMwareClusterNetworkConfigArgs
 *         {
 *             ServiceAddressCidrBlocks = new[]
 *             {
 *                 "10.96.0.0/12",
 *             },
 *             PodAddressCidrBlocks = new[]
 *             {
 *                 "192.168.0.0/16",
 *             },
 *             DhcpIpConfig = new Gcp.GkeOnPrem.Inputs.VMwareClusterNetworkConfigDhcpIpConfigArgs
 *             {
 *                 Enabled = true,
 *             },
 *         },
 *         ControlPlaneNode = new Gcp.GkeOnPrem.Inputs.VMwareClusterControlPlaneNodeArgs
 *         {
 *             Cpus = 4,
 *             Memory = 8192,
 *             Replicas = 1,
 *         },
 *         LoadBalancer = new Gcp.GkeOnPrem.Inputs.VMwareClusterLoadBalancerArgs
 *         {
 *             VipConfig = new Gcp.GkeOnPrem.Inputs.VMwareClusterLoadBalancerVipConfigArgs
 *             {
 *                 ControlPlaneVip = "10.251.133.5",
 *                 IngressVip = "10.251.135.19",
 *             },
 *             MetalLbConfig = new Gcp.GkeOnPrem.Inputs.VMwareClusterLoadBalancerMetalLbConfigArgs
 *             {
 *                 AddressPools = new[]
 *                 {
 *                     new Gcp.GkeOnPrem.Inputs.VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs
 *                     {
 *                         Pool = "ingress-ip",
 *                         ManualAssign = true,
 *                         Addresses = new[]
 *                         {
 *                             "10.251.135.19",
 *                         },
 *                     },
 *                     new Gcp.GkeOnPrem.Inputs.VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs
 *                     {
 *                         Pool = "lb-test-ip",
 *                         ManualAssign = true,
 *                         Addresses = new[]
 *                         {
 *                             "10.251.135.19",
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 *     var nodepool_basic = new Gcp.GkeOnPrem.VMwareNodePool("nodepool-basic", new()
 *     {
 *         Name = "my-nodepool",
 *         Location = "us-west1",
 *         VmwareCluster = default_basic.Name,
 *         Config = new Gcp.GkeOnPrem.Inputs.VMwareNodePoolConfigArgs
 *         {
 *             Replicas = 3,
 *             ImageType = "ubuntu_containerd",
 *             EnableLoadBalancer = true,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkeonprem"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := gkeonprem.NewVMwareCluster(ctx, "default-basic", &gkeonprem.VMwareClusterArgs{
 * 			Name:                   pulumi.String("my-cluster"),
 * 			Location:               pulumi.String("us-west1"),
 * 			AdminClusterMembership: pulumi.String("projects/870316890899/locations/global/memberships/gkeonprem-terraform-test"),
 * 			Description:            pulumi.String("test cluster"),
 * 			OnPremVersion:          pulumi.String("1.13.1-gke.35"),
 * 			NetworkConfig: &gkeonprem.VMwareClusterNetworkConfigArgs{
 * 				ServiceAddressCidrBlocks: pulumi.StringArray{
 * 					pulumi.String("10.96.0.0/12"),
 * 				},
 * 				PodAddressCidrBlocks: pulumi.StringArray{
 * 					pulumi.String("192.168.0.0/16"),
 * 				},
 * 				DhcpIpConfig: &gkeonprem.VMwareClusterNetworkConfigDhcpIpConfigArgs{
 * 					Enabled: pulumi.Bool(true),
 * 				},
 * 			},
 * 			ControlPlaneNode: &gkeonprem.VMwareClusterControlPlaneNodeArgs{
 * 				Cpus:     pulumi.Int(4),
 * 				Memory:   pulumi.Int(8192),
 * 				Replicas: pulumi.Int(1),
 * 			},
 * 			LoadBalancer: &gkeonprem.VMwareClusterLoadBalancerArgs{
 * 				VipConfig: &gkeonprem.VMwareClusterLoadBalancerVipConfigArgs{
 * 					ControlPlaneVip: pulumi.String("10.251.133.5"),
 * 					IngressVip:      pulumi.String("10.251.135.19"),
 * 				},
 * 				MetalLbConfig: &gkeonprem.VMwareClusterLoadBalancerMetalLbConfigArgs{
 * 					AddressPools: gkeonprem.VMwareClusterLoadBalancerMetalLbConfigAddressPoolArray{
 * 						&gkeonprem.VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs{
 * 							Pool:         pulumi.String("ingress-ip"),
 * 							ManualAssign: pulumi.Bool(true),
 * 							Addresses: pulumi.StringArray{
 * 								pulumi.String("10.251.135.19"),
 * 							},
 * 						},
 * 						&gkeonprem.VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs{
 * 							Pool:         pulumi.String("lb-test-ip"),
 * 							ManualAssign: pulumi.Bool(true),
 * 							Addresses: pulumi.StringArray{
 * 								pulumi.String("10.251.135.19"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = gkeonprem.NewVMwareNodePool(ctx, "nodepool-basic", &gkeonprem.VMwareNodePoolArgs{
 * 			Name:          pulumi.String("my-nodepool"),
 * 			Location:      pulumi.String("us-west1"),
 * 			VmwareCluster: default_basic.Name,
 * 			Config: &gkeonprem.VMwareNodePoolConfigArgs{
 * 				Replicas:           pulumi.Int(3),
 * 				ImageType:          pulumi.String("ubuntu_containerd"),
 * 				EnableLoadBalancer: 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.gkeonprem.VMwareCluster;
 * import com.pulumi.gcp.gkeonprem.VMwareClusterArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterNetworkConfigArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterNetworkConfigDhcpIpConfigArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterControlPlaneNodeArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterLoadBalancerArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterLoadBalancerVipConfigArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterLoadBalancerMetalLbConfigArgs;
 * import com.pulumi.gcp.gkeonprem.VMwareNodePool;
 * import com.pulumi.gcp.gkeonprem.VMwareNodePoolArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareNodePoolConfigArgs;
 * 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_basic = new VMwareCluster("default-basic", VMwareClusterArgs.builder()
 *             .name("my-cluster")
 *             .location("us-west1")
 *             .adminClusterMembership("projects/870316890899/locations/global/memberships/gkeonprem-terraform-test")
 *             .description("test cluster")
 *             .onPremVersion("1.13.1-gke.35")
 *             .networkConfig(VMwareClusterNetworkConfigArgs.builder()
 *                 .serviceAddressCidrBlocks("10.96.0.0/12")
 *                 .podAddressCidrBlocks("192.168.0.0/16")
 *                 .dhcpIpConfig(VMwareClusterNetworkConfigDhcpIpConfigArgs.builder()
 *                     .enabled(true)
 *                     .build())
 *                 .build())
 *             .controlPlaneNode(VMwareClusterControlPlaneNodeArgs.builder()
 *                 .cpus(4)
 *                 .memory(8192)
 *                 .replicas(1)
 *                 .build())
 *             .loadBalancer(VMwareClusterLoadBalancerArgs.builder()
 *                 .vipConfig(VMwareClusterLoadBalancerVipConfigArgs.builder()
 *                     .controlPlaneVip("10.251.133.5")
 *                     .ingressVip("10.251.135.19")
 *                     .build())
 *                 .metalLbConfig(VMwareClusterLoadBalancerMetalLbConfigArgs.builder()
 *                     .addressPools(
 *                         VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs.builder()
 *                             .pool("ingress-ip")
 *                             .manualAssign("true")
 *                             .addresses("10.251.135.19")
 *                             .build(),
 *                         VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs.builder()
 *                             .pool("lb-test-ip")
 *                             .manualAssign("true")
 *                             .addresses("10.251.135.19")
 *                             .build())
 *                     .build())
 *                 .build())
 *             .build());
 *         var nodepool_basic = new VMwareNodePool("nodepool-basic", VMwareNodePoolArgs.builder()
 *             .name("my-nodepool")
 *             .location("us-west1")
 *             .vmwareCluster(default_basic.name())
 *             .config(VMwareNodePoolConfigArgs.builder()
 *                 .replicas(3)
 *                 .imageType("ubuntu_containerd")
 *                 .enableLoadBalancer(true)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default-basic:
 *     type: gcp:gkeonprem:VMwareCluster
 *     properties:
 *       name: my-cluster
 *       location: us-west1
 *       adminClusterMembership: projects/870316890899/locations/global/memberships/gkeonprem-terraform-test
 *       description: test cluster
 *       onPremVersion: 1.13.1-gke.35
 *       networkConfig:
 *         serviceAddressCidrBlocks:
 *           - 10.96.0.0/12
 *         podAddressCidrBlocks:
 *           - 192.168.0.0/16
 *         dhcpIpConfig:
 *           enabled: true
 *       controlPlaneNode:
 *         cpus: 4
 *         memory: 8192
 *         replicas: 1
 *       loadBalancer:
 *         vipConfig:
 *           controlPlaneVip: 10.251.133.5
 *           ingressVip: 10.251.135.19
 *         metalLbConfig:
 *           addressPools:
 *             - pool: ingress-ip
 *               manualAssign: 'true'
 *               addresses:
 *                 - 10.251.135.19
 *             - pool: lb-test-ip
 *               manualAssign: 'true'
 *               addresses:
 *                 - 10.251.135.19
 *   nodepool-basic:
 *     type: gcp:gkeonprem:VMwareNodePool
 *     properties:
 *       name: my-nodepool
 *       location: us-west1
 *       vmwareCluster: ${["default-basic"].name}
 *       config:
 *         replicas: 3
 *         imageType: ubuntu_containerd
 *         enableLoadBalancer: true
 * ```
 * 
 * ### Gkeonprem Vmware Node Pool Full
 * 
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.gkeonprem.VMwareCluster;
 * import com.pulumi.gcp.gkeonprem.VMwareClusterArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterNetworkConfigArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterNetworkConfigDhcpIpConfigArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterControlPlaneNodeArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterLoadBalancerArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterLoadBalancerVipConfigArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareClusterLoadBalancerMetalLbConfigArgs;
 * import com.pulumi.gcp.gkeonprem.VMwareNodePool;
 * import com.pulumi.gcp.gkeonprem.VMwareNodePoolArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareNodePoolConfigArgs;
 * import com.pulumi.gcp.gkeonprem.inputs.VMwareNodePoolNodePoolAutoscalingArgs;
 * 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_full = new VMwareCluster("default-full", VMwareClusterArgs.builder()
 *             .name("my-cluster")
 *             .location("us-west1")
 *             .adminClusterMembership("projects/870316890899/locations/global/memberships/gkeonprem-terraform-test")
 *             .description("test cluster")
 *             .onPremVersion("1.13.1-gke.35")
 *             .networkConfig(VMwareClusterNetworkConfigArgs.builder()
 *                 .serviceAddressCidrBlocks("10.96.0.0/12")
 *                 .podAddressCidrBlocks("192.168.0.0/16")
 *                 .dhcpIpConfig(VMwareClusterNetworkConfigDhcpIpConfigArgs.builder()
 *                     .enabled(true)
 *                     .build())
 *                 .build())
 *             .controlPlaneNode(VMwareClusterControlPlaneNodeArgs.builder()
 *                 .cpus(4)
 *                 .memory(8192)
 *                 .replicas(1)
 *                 .build())
 *             .loadBalancer(VMwareClusterLoadBalancerArgs.builder()
 *                 .vipConfig(VMwareClusterLoadBalancerVipConfigArgs.builder()
 *                     .controlPlaneVip("10.251.133.5")
 *                     .ingressVip("10.251.135.19")
 *                     .build())
 *                 .metalLbConfig(VMwareClusterLoadBalancerMetalLbConfigArgs.builder()
 *                     .addressPools(
 *                         VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs.builder()
 *                             .pool("ingress-ip")
 *                             .manualAssign("true")
 *                             .addresses("10.251.135.19")
 *                             .build(),
 *                         VMwareClusterLoadBalancerMetalLbConfigAddressPoolArgs.builder()
 *                             .pool("lb-test-ip")
 *                             .manualAssign("true")
 *                             .addresses("10.251.135.19")
 *                             .build())
 *                     .build())
 *                 .build())
 *             .build());
 *         var nodepool_full = new VMwareNodePool("nodepool-full", VMwareNodePoolArgs.builder()
 *             .name("my-nodepool")
 *             .location("us-west1")
 *             .vmwareCluster(default_full.name())
 *             .annotations()
 *             .config(VMwareNodePoolConfigArgs.builder()
 *                 .cpus(4)
 *                 .memoryMb(8196)
 *                 .replicas(3)
 *                 .imageType("ubuntu_containerd")
 *                 .image("image")
 *                 .bootDiskSizeGb(10)
 *                 .taints(
 *                     VMwareNodePoolConfigTaintArgs.builder()
 *                         .key("key")
 *                         .value("value")
 *                         .build(),
 *                     VMwareNodePoolConfigTaintArgs.builder()
 *                         .key("key")
 *                         .value("value")
 *                         .effect("NO_SCHEDULE")
 *                         .build())
 *                 .labels()
 *                 .vsphereConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
 *                 .enableLoadBalancer(true)
 *                 .build())
 *             .nodePoolAutoscaling(VMwareNodePoolNodePoolAutoscalingArgs.builder()
 *                 .minReplicas(1)
 *                 .maxReplicas(5)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default-full:
 *     type: gcp:gkeonprem:VMwareCluster
 *     properties:
 *       name: my-cluster
 *       location: us-west1
 *       adminClusterMembership: projects/870316890899/locations/global/memberships/gkeonprem-terraform-test
 *       description: test cluster
 *       onPremVersion: 1.13.1-gke.35
 *       networkConfig:
 *         serviceAddressCidrBlocks:
 *           - 10.96.0.0/12
 *         podAddressCidrBlocks:
 *           - 192.168.0.0/16
 *         dhcpIpConfig:
 *           enabled: true
 *       controlPlaneNode:
 *         cpus: 4
 *         memory: 8192
 *         replicas: 1
 *       loadBalancer:
 *         vipConfig:
 *           controlPlaneVip: 10.251.133.5
 *           ingressVip: 10.251.135.19
 *         metalLbConfig:
 *           addressPools:
 *             - pool: ingress-ip
 *               manualAssign: 'true'
 *               addresses:
 *                 - 10.251.135.19
 *             - pool: lb-test-ip
 *               manualAssign: 'true'
 *               addresses:
 *                 - 10.251.135.19
 *   nodepool-full:
 *     type: gcp:gkeonprem:VMwareNodePool
 *     properties:
 *       name: my-nodepool
 *       location: us-west1
 *       vmwareCluster: ${["default-full"].name}
 *       annotations: {}
 *       config:
 *         cpus: 4
 *         memoryMb: 8196
 *         replicas: 3
 *         imageType: ubuntu_containerd
 *         image: image
 *         bootDiskSizeGb: 10
 *         taints:
 *           - key: key
 *             value: value
 *           - key: key
 *             value: value
 *             effect: NO_SCHEDULE
 *         labels: {}
 *         vsphereConfig:
 *           datastore: test-datastore
 *           tags:
 *             - category: test-category-1
 *               tag: tag-1
 *             - category: test-category-2
 *               tag: tag-2
 *           hostGroups:
 *             - host1
 *             - host2
 *         enableLoadBalancer: true
 *       nodePoolAutoscaling:
 *         minReplicas: 1
 *         maxReplicas: 5
 * ```
 * 
 * ## Import
 * VmwareNodePool can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/vmwareClusters/{{vmware_cluster}}/vmwareNodePools/{{name}}`
 * * `{{project}}/{{location}}/{{vmware_cluster}}/{{name}}`
 * * `{{location}}/{{vmware_cluster}}/{{name}}`
 * When using the `pulumi import` command, VmwareNodePool can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:gkeonprem/vMwareNodePool:VMwareNodePool default projects/{{project}}/locations/{{location}}/vmwareClusters/{{vmware_cluster}}/vmwareNodePools/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:gkeonprem/vMwareNodePool:VMwareNodePool default {{project}}/{{location}}/{{vmware_cluster}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:gkeonprem/vMwareNodePool:VMwareNodePool default {{location}}/{{vmware_cluster}}/{{name}}
 * ```
 */
public class VMwareNodePool internal constructor(
    override val javaResource: com.pulumi.gcp.gkeonprem.VMwareNodePool,
) : KotlinCustomResource(javaResource, VMwareNodePoolMapper) {
    /**
     * Annotations on the node Pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys
     * and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a
     * slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with
     * dashes (-), underscores (_), dots (.), and alphanumerics between. **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.
     */
    public val annotations: Output>?
        get() = javaResource.annotations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The node configuration of the node pool.
     * Structure is documented below.
     */
    public val config: Output
        get() = javaResource.config().applyValue({ args0 ->
            args0.let({ args0 ->
                vMwareNodePoolConfigToKotlin(args0)
            })
        })

    /**
     * The time the cluster was created, in RFC3339 text format.
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * The time the cluster was deleted, in RFC3339 text format.
     */
    public val deleteTime: Output
        get() = javaResource.deleteTime().applyValue({ args0 -> args0 })

    /**
     * The display name for the node pool.
     */
    public val displayName: Output?
        get() = javaResource.displayName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    public val effectiveAnnotations: Output>
        get() = javaResource.effectiveAnnotations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })

    /**
     * This checksum is computed by the server based on the value of other
     * fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     * Allows clients to perform consistent read-modify-writes
     * through optimistic concurrency control.
     */
    public val etag: Output
        get() = javaResource.etag().applyValue({ args0 -> args0 })

    /**
     * The location of the resource.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * The vmware node pool name.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Node Pool autoscaling config for the node pool.
     */
    public val nodePoolAutoscaling: Output?
        get() = javaResource.nodePoolAutoscaling().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> vMwareNodePoolNodePoolAutoscalingToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Anthos version for the node pool. Defaults to the user cluster version.
     */
    public val onPremVersion: Output
        get() = javaResource.onPremVersion().applyValue({ args0 -> args0 })

    public val project: Output
        get() = javaResource.project().applyValue({ args0 -> args0 })

    /**
     * If set, there are currently changes in flight to the node pool.
     */
    public val reconciling: Output
        get() = javaResource.reconciling().applyValue({ args0 -> args0 })

    /**
     * (Output)
     * The lifecycle state of the condition.
     */
    public val state: Output
        get() = javaResource.state().applyValue({ args0 -> args0 })

    /**
     * ResourceStatus representing detailed cluster state.
     * Structure is documented below.
     */
    public val statuses: Output>
        get() = javaResource.statuses().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    vMwareNodePoolStatusToKotlin(args0)
                })
            })
        })

    /**
     * The unique identifier of the node pool.
     */
    public val uid: Output
        get() = javaResource.uid().applyValue({ args0 -> args0 })

    /**
     * The time the cluster was last updated, in RFC3339 text format.
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })

    /**
     * The cluster this node pool belongs to.
     */
    public val vmwareCluster: Output
        get() = javaResource.vmwareCluster().applyValue({ args0 -> args0 })
}

public object VMwareNodePoolMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.gkeonprem.VMwareNodePool::class == javaResource::class

    override fun map(javaResource: Resource): VMwareNodePool = VMwareNodePool(
        javaResource as
            com.pulumi.gcp.gkeonprem.VMwareNodePool,
    )
}

/**
 * @see [VMwareNodePool].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [VMwareNodePool].
 */
public suspend fun vMwareNodePool(
    name: String,
    block: suspend VMwareNodePoolResourceBuilder.() -> Unit,
): VMwareNodePool {
    val builder = VMwareNodePoolResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [VMwareNodePool].
 * @param name The _unique_ name of the resulting resource.
 */
public fun vMwareNodePool(name: String): VMwareNodePool {
    val builder = VMwareNodePoolResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy