@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
323 lines • 13.4 kB
JavaScript
"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.VmwareAdminCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ### Gkeonprem Vmware Admin Cluster Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const admin_cluster_basic = new gcp.gkeonprem.VmwareAdminCluster("admin-cluster-basic", {
* name: "basic",
* location: "us-west1",
* description: "test admin cluster",
* bootstrapClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
* onPremVersion: "1.31.0-gke.35",
* imageType: "ubuntu_containerd",
* vcenter: {
* resourcePool: "test resource pool",
* datastore: "test data store",
* datacenter: "test data center",
* cluster: "test cluster",
* folder: "test folder",
* caCertData: "test ca cert data",
* address: "10.0.0.1",
* dataDisk: "test data disk",
* },
* networkConfig: {
* serviceAddressCidrBlocks: ["10.96.0.0/12"],
* podAddressCidrBlocks: ["192.168.0.0/16"],
* dhcpIpConfig: {
* enabled: true,
* },
* },
* controlPlaneNode: {
* cpus: 4,
* memory: 8192,
* },
* loadBalancer: {
* vipConfig: {
* controlPlaneVip: "10.251.133.5",
* addonsVip: "10.251.135.19",
* },
* f5Config: {
* address: "10.251.135.22",
* partition: "test-parition",
* snatPool: "test-snat-pool",
* },
* },
* });
* ```
* ### Gkeonprem Vmware Admin Cluster Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const admin_cluster_full = new gcp.gkeonprem.VmwareAdminCluster("admin-cluster-full", {
* name: "full",
* location: "us-west1",
* description: "test admin cluster",
* bootstrapClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
* onPremVersion: "1.31.0-gke.35",
* imageType: "ubuntu_containerd",
* annotations: {},
* vcenter: {
* resourcePool: "test resource pool",
* datastore: "test data store",
* datacenter: "test data center",
* cluster: "test cluster",
* folder: "test folder",
* caCertData: "test ca cert data",
* address: "10.0.0.1",
* dataDisk: "test data disk",
* storagePolicyName: "storage_policy_name",
* },
* networkConfig: {
* serviceAddressCidrBlocks: ["10.96.0.0/12"],
* podAddressCidrBlocks: ["192.168.0.0/16"],
* haControlPlaneConfig: {
* controlPlaneIpBlock: {
* gateway: "10.0.0.3",
* ips: [{
* hostname: "hostname",
* ip: "10.0.0.4",
* }],
* netmask: "10.0.0.3/32",
* },
* },
* hostConfig: {
* dnsServers: ["10.254.41.1"],
* ntpServers: ["216.239.35.8"],
* dnsSearchDomains: ["test-domain"],
* },
* staticIpConfig: {
* ipBlocks: [{
* gateway: "10.0.0.1",
* ips: [{
* hostname: "hostname",
* ip: "10.0.0.2",
* }],
* netmask: "10.0.0.3/32",
* }],
* },
* vcenterNetwork: "test-vcenter-network",
* },
* controlPlaneNode: {
* cpus: 4,
* memory: 8192,
* replicas: 3,
* },
* loadBalancer: {
* vipConfig: {
* controlPlaneVip: "10.251.133.5",
* addonsVip: "10.251.135.19",
* },
* manualLbConfig: {
* addonsNodePort: 30005,
* controlPlaneNodePort: 30006,
* ingressHttpNodePort: 30007,
* ingressHttpsNodePort: 30008,
* konnectivityServerNodePort: 30009,
* },
* },
* addonNode: {
* autoResizeConfig: {
* enabled: true,
* },
* },
* antiAffinityGroups: {
* aagConfigDisabled: true,
* },
* authorization: {
* viewerUsers: [{
* username: "user1@gmail.com",
* }],
* },
* autoRepairConfig: {
* enabled: true,
* },
* platformConfig: {
* requiredPlatformVersion: "1.31.0",
* },
* });
* ```
* ### Gkeonprem Vmware Admin Cluster Metallb
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const admin_cluster_metallb = new gcp.gkeonprem.VmwareAdminCluster("admin-cluster-metallb", {
* name: "metallb",
* location: "us-west1",
* description: "test admin cluster",
* bootstrapClusterMembership: "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
* onPremVersion: "1.31.0-gke.35",
* imageType: "ubuntu_containerd",
* vcenter: {
* resourcePool: "test resource pool",
* datastore: "test data store",
* datacenter: "test data center",
* cluster: "test cluster",
* folder: "test folder",
* caCertData: "test ca cert data",
* address: "10.0.0.1",
* dataDisk: "test data disk",
* },
* networkConfig: {
* serviceAddressCidrBlocks: ["10.96.0.0/12"],
* podAddressCidrBlocks: ["192.168.0.0/16"],
* dhcpIpConfig: {
* enabled: true,
* },
* },
* controlPlaneNode: {
* cpus: 4,
* memory: 8192,
* },
* loadBalancer: {
* vipConfig: {
* controlPlaneVip: "10.251.133.5",
* addonsVip: "10.251.135.19",
* },
* metalLbConfig: {
* enabled: true,
* },
* },
* });
* ```
*
* ## Import
*
* VmwareAdminCluster can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/vmwareAdminClusters/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, VmwareAdminCluster can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:gkeonprem/vmwareAdminCluster:VmwareAdminCluster default projects/{{project}}/locations/{{location}}/vmwareAdminClusters/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:gkeonprem/vmwareAdminCluster:VmwareAdminCluster default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:gkeonprem/vmwareAdminCluster:VmwareAdminCluster default {{location}}/{{name}}
* ```
*/
class VmwareAdminCluster extends pulumi.CustomResource {
/**
* Get an existing VmwareAdminCluster 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 VmwareAdminCluster(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of VmwareAdminCluster. 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'] === VmwareAdminCluster.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addonNode"] = state ? state.addonNode : 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["bootstrapClusterMembership"] = state ? state.bootstrapClusterMembership : undefined;
resourceInputs["controlPlaneNode"] = state ? state.controlPlaneNode : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["effectiveAnnotations"] = state ? state.effectiveAnnotations : undefined;
resourceInputs["endpoint"] = state ? state.endpoint : undefined;
resourceInputs["etag"] = state ? state.etag : undefined;
resourceInputs["fleets"] = state ? state.fleets : undefined;
resourceInputs["imageType"] = state ? state.imageType : 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["platformConfig"] = state ? state.platformConfig : 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["uid"] = state ? state.uid : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
resourceInputs["vcenter"] = state ? state.vcenter : undefined;
}
else {
const args = argsOrState;
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.networkConfig === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkConfig'");
}
resourceInputs["addonNode"] = args ? args.addonNode : 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["bootstrapClusterMembership"] = args ? args.bootstrapClusterMembership : undefined;
resourceInputs["controlPlaneNode"] = args ? args.controlPlaneNode : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["imageType"] = args ? args.imageType : 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["platformConfig"] = args ? args.platformConfig : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["vcenter"] = args ? args.vcenter : undefined;
resourceInputs["createTime"] = 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*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VmwareAdminCluster.__pulumiType, name, resourceInputs, opts);
}
}
exports.VmwareAdminCluster = VmwareAdminCluster;
/** @internal */
VmwareAdminCluster.__pulumiType = 'gcp:gkeonprem/vmwareAdminCluster:VmwareAdminCluster';
//# sourceMappingURL=vmwareAdminCluster.js.map