UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

186 lines 9.32 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.BaremetalServer = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * import * as std from "@pulumi/std"; * * //## With cloud-init * const mySshKey = scaleway.iam.getSshKey({ * name: "main", * }); * const myOs = scaleway.elasticmetal.getOs({ * zone: "fr-par-1", * name: "Ubuntu", * version: "22.04 LTS (Jammy Jellyfish)", * }); * const myOffer = scaleway.elasticmetal.getOffer({ * zone: "fr-par-2", * name: "EM-I220E-NVME", * }); * const myServerCi = new scaleway.elasticmetal.Server("my_server_ci", { * zone: "fr-par-2", * offer: myOffer.then(myOffer => myOffer.offerId), * os: myOs.then(myOs => myOs.osId), * sshKeyIds: [mySshKey.then(mySshKey => mySshKey.id)], * cloudInit: std.file({ * input: "userdata.yaml", * }).result, * }); * ``` * * ## Import * * Baremetal servers can be imported using the `{zone}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:index/baremetalServer:BaremetalServer web fr-par-2/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/baremetalserver.BaremetalServer has been deprecated in favor of scaleway.elasticmetal/server.Server */ class BaremetalServer extends pulumi.CustomResource { /** * Get an existing BaremetalServer 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("BaremetalServer is deprecated: scaleway.index/baremetalserver.BaremetalServer has been deprecated in favor of scaleway.elasticmetal/server.Server"); return new BaremetalServer(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:index/baremetalServer:BaremetalServer'; /** * Returns true if the given object is an instance of BaremetalServer. 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'] === BaremetalServer.__pulumiType; } /** @deprecated scaleway.index/baremetalserver.BaremetalServer has been deprecated in favor of scaleway.elasticmetal/server.Server */ constructor(name, argsOrState, opts) { pulumi.log.warn("BaremetalServer is deprecated: scaleway.index/baremetalserver.BaremetalServer has been deprecated in favor of scaleway.elasticmetal/server.Server"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cloudInit"] = state?.cloudInit; resourceInputs["description"] = state?.description; resourceInputs["domain"] = state?.domain; resourceInputs["hostname"] = state?.hostname; resourceInputs["installConfigAfterward"] = state?.installConfigAfterward; resourceInputs["ips"] = state?.ips; resourceInputs["ipv4s"] = state?.ipv4s; resourceInputs["ipv6s"] = state?.ipv6s; resourceInputs["name"] = state?.name; resourceInputs["offer"] = state?.offer; resourceInputs["offerId"] = state?.offerId; resourceInputs["offerName"] = state?.offerName; resourceInputs["options"] = state?.options; resourceInputs["organizationId"] = state?.organizationId; resourceInputs["os"] = state?.os; resourceInputs["osName"] = state?.osName; resourceInputs["partitioning"] = state?.partitioning; 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["protected"] = state?.protected; resourceInputs["reinstallOnConfigChanges"] = state?.reinstallOnConfigChanges; resourceInputs["servicePassword"] = state?.servicePassword; resourceInputs["servicePasswordWo"] = state?.servicePasswordWo; resourceInputs["servicePasswordWoVersion"] = state?.servicePasswordWoVersion; resourceInputs["serviceUser"] = state?.serviceUser; resourceInputs["sshKeyIds"] = state?.sshKeyIds; resourceInputs["tags"] = state?.tags; resourceInputs["user"] = state?.user; resourceInputs["zone"] = state?.zone; } else { const args = argsOrState; if (args?.offer === undefined && !opts.urn) { throw new Error("Missing required property 'offer'"); } resourceInputs["cloudInit"] = args?.cloudInit; resourceInputs["description"] = args?.description; resourceInputs["hostname"] = args?.hostname; resourceInputs["installConfigAfterward"] = args?.installConfigAfterward; resourceInputs["name"] = args?.name; resourceInputs["offer"] = args?.offer; resourceInputs["options"] = args?.options; resourceInputs["os"] = args?.os; resourceInputs["partitioning"] = args?.partitioning; 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["protected"] = args?.protected; resourceInputs["reinstallOnConfigChanges"] = args?.reinstallOnConfigChanges; resourceInputs["servicePassword"] = args?.servicePassword ? pulumi.secret(args.servicePassword) : undefined; resourceInputs["servicePasswordWo"] = args?.servicePasswordWo ? pulumi.secret(args.servicePasswordWo) : undefined; resourceInputs["servicePasswordWoVersion"] = args?.servicePasswordWoVersion; resourceInputs["serviceUser"] = args?.serviceUser; resourceInputs["sshKeyIds"] = args?.sshKeyIds; resourceInputs["tags"] = args?.tags; resourceInputs["user"] = args?.user; resourceInputs["zone"] = args?.zone; resourceInputs["domain"] = undefined /*out*/; resourceInputs["ips"] = undefined /*out*/; resourceInputs["ipv4s"] = undefined /*out*/; resourceInputs["ipv6s"] = undefined /*out*/; resourceInputs["offerId"] = undefined /*out*/; resourceInputs["offerName"] = undefined /*out*/; resourceInputs["organizationId"] = undefined /*out*/; resourceInputs["osName"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password", "passwordWo", "servicePassword", "servicePasswordWo"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(BaremetalServer.__pulumiType, name, resourceInputs, opts); } } exports.BaremetalServer = BaremetalServer; //# sourceMappingURL=baremetalServer.js.map