UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

294 lines • 11.4 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.VMwareNodePool = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * A Google Vmware Node Pool. * * To get more information about VmwareNodePool, see: * * * [API documentation](https://cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.vmwareClusters.vmwareNodePools) * * ## 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, * }, * }); * ``` * ### Gkeonprem Vmware Node Pool Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const default_full = new gcp.gkeonprem.VMwareCluster("default-full", { * name: "my-cluster", * location: "us-west1", * adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test", * description: "test cluster", * onPremVersion: "1.33.0-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_full = new gcp.gkeonprem.VMwareNodePool("nodepool-full", { * name: "my-nodepool", * location: "us-west1", * vmwareCluster: default_full.name, * onPremVersion: "1.33.0-gke.35", * 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}} * $ pulumi import gcp:gkeonprem/vMwareNodePool:VMwareNodePool default {{project}}/{{location}}/{{vmware_cluster}}/{{name}} * $ pulumi import gcp:gkeonprem/vMwareNodePool:VMwareNodePool default {{location}}/{{vmware_cluster}}/{{name}} * ``` */ class VMwareNodePool extends pulumi.CustomResource { /** * Get an existing VMwareNodePool resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new VMwareNodePool(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:gkeonprem/vMwareNodePool:VMwareNodePool'; /** * Returns true if the given object is an instance of VMwareNodePool. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === VMwareNodePool.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["annotations"] = state?.annotations; resourceInputs["config"] = state?.config; resourceInputs["createTime"] = state?.createTime; resourceInputs["deleteTime"] = state?.deleteTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["displayName"] = state?.displayName; resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations; resourceInputs["etag"] = state?.etag; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["nodePoolAutoscaling"] = state?.nodePoolAutoscaling; resourceInputs["onPremVersion"] = state?.onPremVersion; resourceInputs["project"] = state?.project; resourceInputs["reconciling"] = state?.reconciling; resourceInputs["state"] = state?.state; resourceInputs["statuses"] = state?.statuses; resourceInputs["uid"] = state?.uid; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["vmwareCluster"] = state?.vmwareCluster; } else { const args = argsOrState; if (args?.config === undefined && !opts.urn) { throw new Error("Missing required property 'config'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.vmwareCluster === undefined && !opts.urn) { throw new Error("Missing required property 'vmwareCluster'"); } resourceInputs["annotations"] = args?.annotations; resourceInputs["config"] = args?.config; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["displayName"] = args?.displayName; resourceInputs["location"] = args?.location; resourceInputs["name"] = args?.name; resourceInputs["nodePoolAutoscaling"] = args?.nodePoolAutoscaling; resourceInputs["onPremVersion"] = args?.onPremVersion; resourceInputs["project"] = args?.project; resourceInputs["vmwareCluster"] = args?.vmwareCluster; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["deleteTime"] = undefined /*out*/; resourceInputs["effectiveAnnotations"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["reconciling"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["statuses"] = undefined /*out*/; resourceInputs["uid"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VMwareNodePool.__pulumiType, name, resourceInputs, opts); } } exports.VMwareNodePool = VMwareNodePool; //# sourceMappingURL=vmwareNodePool.js.map