UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

169 lines 8.12 kB
"use strict"; // *** 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.RedisCluster = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * Creates and manages Scaleway Redis™ clusters. * For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/managed-database-redis). * * > **Security Best Practice:** * For enhanced security, we recommend using the `passwordWo` write-only argument instead of the regular `password` argument. This ensures your sensitive credentials are never stored in Terraform state files, providing superior protection against accidental exposure. Write-Only arguments are supported in Terraform 1.11.0 and later. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * //## Basic Redis cluster creation * const main = new scaleway.redis.Cluster("main", { * name: "test_redis_basic", * version: "6.2.7", * nodeType: "RED1-MICRO", * userName: "my_initial_user", * password: "thiZ_is_v&ry_s3cret", * tags: [ * "test", * "redis", * ], * clusterSize: 1, * tlsEnabled: true, * acls: [{ * ip: "0.0.0.0/0", * description: "Allow all", * }], * }); * ``` * * ## Import * * Redis™ cluster can be imported using the `{zone}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:index/redisCluster:RedisCluster main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/rediscluster.RedisCluster has been deprecated in favor of scaleway.redis/cluster.Cluster */ class RedisCluster extends pulumi.CustomResource { /** * Get an existing RedisCluster 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) { pulumi.log.warn("RedisCluster is deprecated: scaleway.index/rediscluster.RedisCluster has been deprecated in favor of scaleway.redis/cluster.Cluster"); return new RedisCluster(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:index/redisCluster:RedisCluster'; /** * Returns true if the given object is an instance of RedisCluster. 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'] === RedisCluster.__pulumiType; } /** @deprecated scaleway.index/rediscluster.RedisCluster has been deprecated in favor of scaleway.redis/cluster.Cluster */ constructor(name, argsOrState, opts) { pulumi.log.warn("RedisCluster is deprecated: scaleway.index/rediscluster.RedisCluster has been deprecated in favor of scaleway.redis/cluster.Cluster"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["acls"] = state?.acls; resourceInputs["certificate"] = state?.certificate; resourceInputs["clusterSize"] = state?.clusterSize; resourceInputs["connectionString"] = state?.connectionString; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["name"] = state?.name; resourceInputs["nodeType"] = state?.nodeType; resourceInputs["password"] = state?.password; resourceInputs["passwordWo"] = state?.passwordWo; resourceInputs["passwordWoVersion"] = state?.passwordWoVersion; resourceInputs["privateIps"] = state?.privateIps; resourceInputs["privateNetworks"] = state?.privateNetworks; resourceInputs["projectId"] = state?.projectId; resourceInputs["publicNetwork"] = state?.publicNetwork; resourceInputs["settings"] = state?.settings; resourceInputs["tags"] = state?.tags; resourceInputs["tlsEnabled"] = state?.tlsEnabled; resourceInputs["updatedAt"] = state?.updatedAt; resourceInputs["userName"] = state?.userName; resourceInputs["version"] = state?.version; resourceInputs["zone"] = state?.zone; } else { const args = argsOrState; if (args?.nodeType === undefined && !opts.urn) { throw new Error("Missing required property 'nodeType'"); } if (args?.userName === undefined && !opts.urn) { throw new Error("Missing required property 'userName'"); } if (args?.version === undefined && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["acls"] = args?.acls; resourceInputs["clusterSize"] = args?.clusterSize; resourceInputs["name"] = args?.name; resourceInputs["nodeType"] = args?.nodeType; resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined; resourceInputs["passwordWo"] = args?.passwordWo ? pulumi.secret(args.passwordWo) : undefined; resourceInputs["passwordWoVersion"] = args?.passwordWoVersion; resourceInputs["privateIps"] = args?.privateIps; resourceInputs["privateNetworks"] = args?.privateNetworks; resourceInputs["projectId"] = args?.projectId; resourceInputs["publicNetwork"] = args?.publicNetwork; resourceInputs["settings"] = args?.settings; resourceInputs["tags"] = args?.tags; resourceInputs["tlsEnabled"] = args?.tlsEnabled; resourceInputs["userName"] = args?.userName; resourceInputs["version"] = args?.version; resourceInputs["zone"] = args?.zone; resourceInputs["certificate"] = undefined /*out*/; resourceInputs["connectionString"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["connectionString", "password", "passwordWo"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(RedisCluster.__pulumiType, name, resourceInputs, opts); } } exports.RedisCluster = RedisCluster; //# sourceMappingURL=redisCluster.js.map