UNPKG

@pulumi/gcp

Version:

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

407 lines • 16.3 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.VMwareCluster = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * A Google VMware User Cluster. * * To get more information about VmwareCluster, see: * * * [API documentation](https://cloud.google.com/kubernetes-engine/distributed-cloud/reference/on-prem-api/rest/v1/projects.locations.vmwareClusters) * * ## Example Usage * * ### Gkeonprem Vmware Cluster Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cluster_basic = new gcp.gkeonprem.VMwareCluster("cluster-basic", { * name: "cluster-basic", * location: "us-west1", * adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test", * description: "test cluster", * onPremVersion: "1.13.1-gke.35", * annotations: {}, * 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"], * avoidBuggyIps: true, * }, * { * pool: "lb-test-ip", * manualAssign: true, * addresses: ["10.251.135.19"], * avoidBuggyIps: true, * }, * ], * }, * }, * }); * ``` * ### Gkeonprem Vmware Cluster F5lb * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cluster_f5lb = new gcp.gkeonprem.VMwareCluster("cluster-f5lb", { * name: "cluster-f5lb", * location: "us-west1", * adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test", * description: "test cluster", * onPremVersion: "1.13.1-gke.35", * annotations: {}, * networkConfig: { * serviceAddressCidrBlocks: ["10.96.0.0/12"], * podAddressCidrBlocks: ["192.168.0.0/16"], * dhcpIpConfig: { * enabled: true, * }, * controlPlaneV2Config: { * controlPlaneIpBlock: { * ips: [{ * hostname: "test-hostname", * ip: "10.0.0.1", * }], * netmask: "10.0.0.1/32", * gateway: "test-gateway", * }, * }, * vcenterNetwork: "test-vcenter-network", * }, * controlPlaneNode: { * cpus: 4, * memory: 8192, * replicas: 1, * autoResizeConfig: { * enabled: true, * }, * }, * loadBalancer: { * vipConfig: { * controlPlaneVip: "10.251.133.5", * ingressVip: "10.251.135.19", * }, * f5Config: { * address: "10.0.0.1", * partition: "test-partition", * snatPool: "test-snap-pool", * }, * }, * dataplaneV2: { * dataplaneV2Enabled: true, * windowsDataplaneV2Enabled: true, * advancedNetworking: true, * }, * vmTrackingEnabled: true, * enableControlPlaneV2: true, * disableBundledIngress: true, * authorization: { * adminUsers: [{ * username: "testuser@gmail.com", * }], * }, * antiAffinityGroups: { * aagConfigDisabled: true, * }, * autoRepairConfig: { * enabled: true, * }, * storage: { * vsphereCsiDisabled: true, * }, * }); * ``` * ### Gkeonprem Vmware Cluster Manuallb * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cluster_manuallb = new gcp.gkeonprem.VMwareCluster("cluster-manuallb", { * name: "cluster-manuallb", * skipValidations: [ * "WORKSTATION", * "CONFIG", * "DOCKER", * ], * location: "us-west1", * adminClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test", * description: "test cluster", * onPremVersion: "1.13.1-gke.35", * annotations: {}, * networkConfig: { * serviceAddressCidrBlocks: ["10.96.0.0/12"], * podAddressCidrBlocks: ["192.168.0.0/16"], * hostConfig: { * dnsServers: ["10.254.41.1"], * ntpServers: ["216.239.35.8"], * dnsSearchDomains: ["test-domain"], * }, * staticIpConfig: { * ipBlocks: [{ * netmask: "255.255.252.0", * gateway: "10.251.31.254", * ips: [ * { * ip: "10.251.30.153", * hostname: "test-hostname1", * }, * { * ip: "10.251.31.206", * hostname: "test-hostname2", * }, * { * ip: "10.251.31.193", * hostname: "test-hostname3", * }, * { * ip: "10.251.30.230", * hostname: "test-hostname4", * }, * ], * }], * }, * }, * controlPlaneNode: { * cpus: 4, * memory: 8192, * replicas: 1, * autoResizeConfig: { * enabled: true, * }, * }, * loadBalancer: { * vipConfig: { * controlPlaneVip: "10.251.133.5", * ingressVip: "10.251.135.19", * }, * manualLbConfig: { * ingressHttpNodePort: 30005, * ingressHttpsNodePort: 30006, * controlPlaneNodePort: 30007, * konnectivityServerNodePort: 30008, * }, * }, * vcenter: { * resourcePool: "test-resource-pool", * datastore: "test-datastore", * datacenter: "test-datacenter", * cluster: "test-cluster", * folder: "test-folder", * caCertData: "test-ca-cert-data", * storagePolicyName: "test-storage-policy-name", * }, * dataplaneV2: { * dataplaneV2Enabled: true, * windowsDataplaneV2Enabled: true, * advancedNetworking: true, * }, * vmTrackingEnabled: true, * enableControlPlaneV2: true, * enableAdvancedCluster: true, * upgradePolicy: { * controlPlaneOnly: true, * }, * authorization: { * adminUsers: [{ * username: "testuser@gmail.com", * }], * }, * antiAffinityGroups: { * aagConfigDisabled: true, * }, * autoRepairConfig: { * enabled: true, * }, * }); * ``` * * ## Import * * VmwareCluster can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/vmwareClusters/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, VmwareCluster can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:gkeonprem/vMwareCluster:VMwareCluster default projects/{{project}}/locations/{{location}}/vmwareClusters/{{name}} * $ pulumi import gcp:gkeonprem/vMwareCluster:VMwareCluster default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:gkeonprem/vMwareCluster:VMwareCluster default {{location}}/{{name}} * ``` */ class VMwareCluster extends pulumi.CustomResource { /** * Get an existing VMwareCluster 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 VMwareCluster(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:gkeonprem/vMwareCluster:VMwareCluster'; /** * Returns true if the given object is an instance of VMwareCluster. 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'] === VMwareCluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["adminClusterMembership"] = state?.adminClusterMembership; resourceInputs["annotations"] = state?.annotations; resourceInputs["antiAffinityGroups"] = state?.antiAffinityGroups; resourceInputs["authorization"] = state?.authorization; resourceInputs["autoRepairConfig"] = state?.autoRepairConfig; resourceInputs["controlPlaneNode"] = state?.controlPlaneNode; resourceInputs["createTime"] = state?.createTime; resourceInputs["dataplaneV2"] = state?.dataplaneV2; resourceInputs["deleteTime"] = state?.deleteTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["description"] = state?.description; resourceInputs["disableBundledIngress"] = state?.disableBundledIngress; resourceInputs["effectiveAnnotations"] = state?.effectiveAnnotations; resourceInputs["enableAdvancedCluster"] = state?.enableAdvancedCluster; resourceInputs["enableControlPlaneV2"] = state?.enableControlPlaneV2; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["etag"] = state?.etag; resourceInputs["fleets"] = state?.fleets; resourceInputs["loadBalancer"] = state?.loadBalancer; resourceInputs["localName"] = state?.localName; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["networkConfig"] = state?.networkConfig; resourceInputs["onPremVersion"] = state?.onPremVersion; resourceInputs["project"] = state?.project; resourceInputs["reconciling"] = state?.reconciling; resourceInputs["skipValidations"] = state?.skipValidations; resourceInputs["state"] = state?.state; resourceInputs["statuses"] = state?.statuses; resourceInputs["storage"] = state?.storage; resourceInputs["uid"] = state?.uid; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["upgradePolicy"] = state?.upgradePolicy; resourceInputs["validationChecks"] = state?.validationChecks; resourceInputs["vcenter"] = state?.vcenter; resourceInputs["vmTrackingEnabled"] = state?.vmTrackingEnabled; } else { const args = argsOrState; if (args?.adminClusterMembership === undefined && !opts.urn) { throw new Error("Missing required property 'adminClusterMembership'"); } if (args?.controlPlaneNode === undefined && !opts.urn) { throw new Error("Missing required property 'controlPlaneNode'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.onPremVersion === undefined && !opts.urn) { throw new Error("Missing required property 'onPremVersion'"); } resourceInputs["adminClusterMembership"] = args?.adminClusterMembership; resourceInputs["annotations"] = args?.annotations; resourceInputs["antiAffinityGroups"] = args?.antiAffinityGroups; resourceInputs["authorization"] = args?.authorization; resourceInputs["autoRepairConfig"] = args?.autoRepairConfig; resourceInputs["controlPlaneNode"] = args?.controlPlaneNode; resourceInputs["dataplaneV2"] = args?.dataplaneV2; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["description"] = args?.description; resourceInputs["disableBundledIngress"] = args?.disableBundledIngress; resourceInputs["enableAdvancedCluster"] = args?.enableAdvancedCluster; resourceInputs["enableControlPlaneV2"] = args?.enableControlPlaneV2; resourceInputs["loadBalancer"] = args?.loadBalancer; resourceInputs["location"] = args?.location; resourceInputs["name"] = args?.name; resourceInputs["networkConfig"] = args?.networkConfig; resourceInputs["onPremVersion"] = args?.onPremVersion; resourceInputs["project"] = args?.project; resourceInputs["skipValidations"] = args?.skipValidations; resourceInputs["storage"] = args?.storage; resourceInputs["upgradePolicy"] = args?.upgradePolicy; resourceInputs["vcenter"] = args?.vcenter; resourceInputs["vmTrackingEnabled"] = args?.vmTrackingEnabled; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["deleteTime"] = undefined /*out*/; resourceInputs["effectiveAnnotations"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["fleets"] = undefined /*out*/; resourceInputs["localName"] = undefined /*out*/; resourceInputs["reconciling"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["statuses"] = undefined /*out*/; resourceInputs["uid"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; resourceInputs["validationChecks"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VMwareCluster.__pulumiType, name, resourceInputs, opts); } } exports.VMwareCluster = VMwareCluster; //# sourceMappingURL=vmwareCluster.js.map