@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
202 lines • 8.13 kB
JavaScript
;
// *** 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.Deployment = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* Creates and manages Scaleway Data Warehouse deployments.
* For more information refer to the [product documentation](https://www.scaleway.com/en/docs/data-warehouse/).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.datawarehouse.Deployment("main", {
* name: "my-datawarehouse",
* version: "v25",
* replicaCount: 1,
* cpuMin: 2,
* cpuMax: 4,
* ramPerCpu: 4,
* password: "thiZ_is_v&ry_s3cret",
* });
* ```
*
* ### With Tags
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.datawarehouse.Deployment("main", {
* name: "my-datawarehouse",
* version: "v25",
* replicaCount: 1,
* cpuMin: 2,
* cpuMax: 4,
* ramPerCpu: 4,
* password: "thiZ_is_v&ry_s3cret",
* tags: [
* "production",
* "analytics",
* ],
* });
* ```
*
* ### With Private Network
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.network.Vpc("main", {name: "my-vpc"});
* const pn = new scaleway.network.PrivateNetwork("pn", {
* name: "my-private-network",
* vpcId: main.id,
* });
* const mainDeployment = new scaleway.datawarehouse.Deployment("main", {
* name: "my-datawarehouse",
* version: "v25",
* replicaCount: 1,
* cpuMin: 2,
* cpuMax: 4,
* ramPerCpu: 4,
* password: "thiZ_is_v&ry_s3cret",
* privateNetwork: {
* pnId: pn.id,
* },
* });
* ```
*
* ## Import
*
* Data Warehouse deployments can be imported using the `{region}/{id}`, e.g.
*
* ```sh
* $ pulumi import scaleway:datawarehouse/deployment:Deployment main fr-par/11111111-1111-1111-1111-111111111111
* ```
*/
class Deployment extends pulumi.CustomResource {
/**
* Get an existing Deployment 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 Deployment(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'scaleway:datawarehouse/deployment:Deployment';
/**
* Returns true if the given object is an instance of Deployment. 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'] === Deployment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["cpuMax"] = state?.cpuMax;
resourceInputs["cpuMin"] = state?.cpuMin;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["name"] = state?.name;
resourceInputs["password"] = state?.password;
resourceInputs["passwordWo"] = state?.passwordWo;
resourceInputs["passwordWoVersion"] = state?.passwordWoVersion;
resourceInputs["privateNetwork"] = state?.privateNetwork;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["publicNetworks"] = state?.publicNetworks;
resourceInputs["ramPerCpu"] = state?.ramPerCpu;
resourceInputs["region"] = state?.region;
resourceInputs["replicaCount"] = state?.replicaCount;
resourceInputs["shardCount"] = state?.shardCount;
resourceInputs["started"] = state?.started;
resourceInputs["status"] = state?.status;
resourceInputs["tags"] = state?.tags;
resourceInputs["updatedAt"] = state?.updatedAt;
resourceInputs["version"] = state?.version;
}
else {
const args = argsOrState;
if (args?.cpuMax === undefined && !opts.urn) {
throw new Error("Missing required property 'cpuMax'");
}
if (args?.cpuMin === undefined && !opts.urn) {
throw new Error("Missing required property 'cpuMin'");
}
if (args?.ramPerCpu === undefined && !opts.urn) {
throw new Error("Missing required property 'ramPerCpu'");
}
if (args?.replicaCount === undefined && !opts.urn) {
throw new Error("Missing required property 'replicaCount'");
}
if (args?.version === undefined && !opts.urn) {
throw new Error("Missing required property 'version'");
}
resourceInputs["cpuMax"] = args?.cpuMax;
resourceInputs["cpuMin"] = args?.cpuMin;
resourceInputs["name"] = args?.name;
resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
resourceInputs["passwordWo"] = args?.passwordWo ? pulumi.secret(args.passwordWo) : undefined;
resourceInputs["passwordWoVersion"] = args?.passwordWoVersion;
resourceInputs["privateNetwork"] = args?.privateNetwork;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["ramPerCpu"] = args?.ramPerCpu;
resourceInputs["region"] = args?.region;
resourceInputs["replicaCount"] = args?.replicaCount;
resourceInputs["shardCount"] = args?.shardCount;
resourceInputs["started"] = args?.started;
resourceInputs["tags"] = args?.tags;
resourceInputs["version"] = args?.version;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["publicNetworks"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password", "passwordWo"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Deployment.__pulumiType, name, resourceInputs, opts);
}
}
exports.Deployment = Deployment;
//# sourceMappingURL=deployment.js.map