@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
202 lines • 8.26 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.PrivateCloud = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Represents a private cloud resource. Private clouds are zonal resources.
*
* To get more information about PrivateCloud, see:
*
* * [API documentation](https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.privateClouds)
*
* ## Example Usage
*
* ### Vmware Engine Private Cloud Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const pc_nw = new gcp.vmwareengine.Network("pc-nw", {
* name: "pc-nw",
* location: "global",
* type: "STANDARD",
* description: "PC network description.",
* });
* const vmw_engine_pc = new gcp.vmwareengine.PrivateCloud("vmw-engine-pc", {
* location: "us-west1-a",
* name: "sample-pc",
* description: "Sample test PC.",
* networkConfig: {
* managementCidr: "192.168.30.0/24",
* vmwareEngineNetwork: pc_nw.id,
* },
* managementCluster: {
* clusterId: "sample-mgmt-cluster",
* nodeTypeConfigs: [{
* nodeTypeId: "standard-72",
* nodeCount: 3,
* }],
* },
* });
* ```
* ### Vmware Engine Private Cloud Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const pc_nw = new gcp.vmwareengine.Network("pc-nw", {
* name: "pc-nw",
* location: "global",
* type: "STANDARD",
* description: "PC network description.",
* });
* const vmw_engine_pc = new gcp.vmwareengine.PrivateCloud("vmw-engine-pc", {
* location: "us-west1-a",
* name: "sample-pc",
* description: "Sample test PC.",
* type: "TIME_LIMITED",
* networkConfig: {
* managementCidr: "192.168.30.0/24",
* vmwareEngineNetwork: pc_nw.id,
* },
* managementCluster: {
* clusterId: "sample-mgmt-cluster",
* nodeTypeConfigs: [{
* nodeTypeId: "standard-72",
* nodeCount: 1,
* customCoreCount: 32,
* }],
* autoscalingSettings: {
* autoscalingPolicies: [{
* autoscalePolicyId: "autoscaling-policy",
* nodeTypeId: "standard-72",
* scaleOutSize: 1,
* cpuThresholds: {
* scaleOut: 80,
* scaleIn: 15,
* },
* consumedMemoryThresholds: {
* scaleOut: 75,
* scaleIn: 20,
* },
* storageThresholds: {
* scaleOut: 80,
* scaleIn: 20,
* },
* }],
* minClusterNodeCount: 3,
* maxClusterNodeCount: 8,
* coolDownPeriod: "1800s",
* },
* },
* deletionDelayHours: 0,
* sendDeletionDelayHoursIfZero: true,
* });
* ```
*
* ## Import
*
* PrivateCloud can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/privateClouds/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, PrivateCloud can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default projects/{{project}}/locations/{{location}}/privateClouds/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:vmwareengine/privateCloud:PrivateCloud default {{location}}/{{name}}
* ```
*/
class PrivateCloud extends pulumi.CustomResource {
/**
* Get an existing PrivateCloud 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 PrivateCloud(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PrivateCloud. 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'] === PrivateCloud.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["deletionDelayHours"] = state ? state.deletionDelayHours : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["hcxes"] = state ? state.hcxes : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["managementCluster"] = state ? state.managementCluster : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["networkConfig"] = state ? state.networkConfig : undefined;
resourceInputs["nsxes"] = state ? state.nsxes : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["sendDeletionDelayHoursIfZero"] = state ? state.sendDeletionDelayHoursIfZero : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["uid"] = state ? state.uid : undefined;
resourceInputs["vcenters"] = state ? state.vcenters : undefined;
}
else {
const args = argsOrState;
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.managementCluster === undefined) && !opts.urn) {
throw new Error("Missing required property 'managementCluster'");
}
if ((!args || args.networkConfig === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkConfig'");
}
resourceInputs["deletionDelayHours"] = args ? args.deletionDelayHours : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["managementCluster"] = args ? args.managementCluster : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["networkConfig"] = args ? args.networkConfig : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["sendDeletionDelayHoursIfZero"] = args ? args.sendDeletionDelayHoursIfZero : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["hcxes"] = undefined /*out*/;
resourceInputs["nsxes"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["uid"] = undefined /*out*/;
resourceInputs["vcenters"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PrivateCloud.__pulumiType, name, resourceInputs, opts);
}
}
exports.PrivateCloud = PrivateCloud;
/** @internal */
PrivateCloud.__pulumiType = 'gcp:vmwareengine/privateCloud:PrivateCloud';
//# sourceMappingURL=privateCloud.js.map