@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
272 lines • 10.6 kB
JavaScript
;
// *** 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.VMwareNodePool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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,
* },
* });
* ```
* ### 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.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_full = new gcp.gkeonprem.VMwareNodePool("nodepool-full", {
* 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}}
* ```
*/
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, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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 ? state.annotations : undefined;
resourceInputs["config"] = state ? state.config : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["deleteTime"] = state ? state.deleteTime : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["effectiveAnnotations"] = state ? state.effectiveAnnotations : undefined;
resourceInputs["etag"] = state ? state.etag : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["nodePoolAutoscaling"] = state ? state.nodePoolAutoscaling : 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["uid"] = state ? state.uid : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
resourceInputs["vmwareCluster"] = state ? state.vmwareCluster : undefined;
}
else {
const args = argsOrState;
if ((!args || args.config === undefined) && !opts.urn) {
throw new Error("Missing required property 'config'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.vmwareCluster === undefined) && !opts.urn) {
throw new Error("Missing required property 'vmwareCluster'");
}
resourceInputs["annotations"] = args ? args.annotations : undefined;
resourceInputs["config"] = args ? args.config : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["nodePoolAutoscaling"] = args ? args.nodePoolAutoscaling : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["vmwareCluster"] = args ? args.vmwareCluster : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["deleteTime"] = undefined /*out*/;
resourceInputs["effectiveAnnotations"] = undefined /*out*/;
resourceInputs["etag"] = undefined /*out*/;
resourceInputs["onPremVersion"] = 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;
/** @internal */
VMwareNodePool.__pulumiType = 'gcp:gkeonprem/vMwareNodePool:VMwareNodePool';
//# sourceMappingURL=vmwareNodePool.js.map