UNPKG

@pulumi/gcp

Version:

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

376 lines • 15.6 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.VMwareCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A Google VMware User Cluster. * * ## 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", * 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, * 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}} * ``` * * ```sh * $ pulumi import gcp:gkeonprem/vMwareCluster:VMwareCluster default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ 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, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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 ? state.adminClusterMembership : undefined; resourceInputs["annotations"] = state ? state.annotations : undefined; resourceInputs["antiAffinityGroups"] = state ? state.antiAffinityGroups : undefined; resourceInputs["authorization"] = state ? state.authorization : undefined; resourceInputs["autoRepairConfig"] = state ? state.autoRepairConfig : undefined; resourceInputs["controlPlaneNode"] = state ? state.controlPlaneNode : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["dataplaneV2"] = state ? state.dataplaneV2 : undefined; resourceInputs["deleteTime"] = state ? state.deleteTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["disableBundledIngress"] = state ? state.disableBundledIngress : undefined; resourceInputs["effectiveAnnotations"] = state ? state.effectiveAnnotations : undefined; resourceInputs["enableControlPlaneV2"] = state ? state.enableControlPlaneV2 : undefined; resourceInputs["endpoint"] = state ? state.endpoint : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["fleets"] = state ? state.fleets : undefined; resourceInputs["loadBalancer"] = state ? state.loadBalancer : undefined; resourceInputs["localName"] = state ? state.localName : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkConfig"] = state ? state.networkConfig : undefined; resourceInputs["onPremVersion"] = state ? state.onPremVersion : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["reconciling"] = state ? state.reconciling : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["statuses"] = state ? state.statuses : undefined; resourceInputs["storage"] = state ? state.storage : undefined; resourceInputs["uid"] = state ? state.uid : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; resourceInputs["upgradePolicy"] = state ? state.upgradePolicy : undefined; resourceInputs["validationChecks"] = state ? state.validationChecks : undefined; resourceInputs["vcenter"] = state ? state.vcenter : undefined; resourceInputs["vmTrackingEnabled"] = state ? state.vmTrackingEnabled : undefined; } else { const args = argsOrState; if ((!args || args.adminClusterMembership === undefined) && !opts.urn) { throw new Error("Missing required property 'adminClusterMembership'"); } if ((!args || args.controlPlaneNode === undefined) && !opts.urn) { throw new Error("Missing required property 'controlPlaneNode'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } if ((!args || args.onPremVersion === undefined) && !opts.urn) { throw new Error("Missing required property 'onPremVersion'"); } resourceInputs["adminClusterMembership"] = args ? args.adminClusterMembership : undefined; resourceInputs["annotations"] = args ? args.annotations : undefined; resourceInputs["antiAffinityGroups"] = args ? args.antiAffinityGroups : undefined; resourceInputs["authorization"] = args ? args.authorization : undefined; resourceInputs["autoRepairConfig"] = args ? args.autoRepairConfig : undefined; resourceInputs["controlPlaneNode"] = args ? args.controlPlaneNode : undefined; resourceInputs["dataplaneV2"] = args ? args.dataplaneV2 : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["disableBundledIngress"] = args ? args.disableBundledIngress : undefined; resourceInputs["enableControlPlaneV2"] = args ? args.enableControlPlaneV2 : undefined; resourceInputs["loadBalancer"] = args ? args.loadBalancer : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkConfig"] = args ? args.networkConfig : undefined; resourceInputs["onPremVersion"] = args ? args.onPremVersion : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["storage"] = args ? args.storage : undefined; resourceInputs["upgradePolicy"] = args ? args.upgradePolicy : undefined; resourceInputs["vcenter"] = args ? args.vcenter : undefined; resourceInputs["vmTrackingEnabled"] = args ? args.vmTrackingEnabled : undefined; 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; /** @internal */ VMwareCluster.__pulumiType = 'gcp:gkeonprem/vMwareCluster:VMwareCluster'; //# sourceMappingURL=vmwareCluster.js.map