UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

174 lines 7.05 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.FlexibleIp = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * Creates and manages Scaleway flexible IPs. * For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/elastic-metal-flexible-ip). * * > **Note:** * Flexible IPs are exclusively available for Elastic Metal (bare metal) servers. They are not compatible with other Scaleway products. * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.elasticmetal.Ip("main", {reverse: "my-reverse.com"}); * ``` * * ### With zone * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.elasticmetal.Ip("main", {zone: "fr-par-2"}); * ``` * * ### With IPv6 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.elasticmetal.Ip("main", {isIpv6: true}); * ``` * * ### With baremetal server * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.account.SshKey("main", { * name: "main", * publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILHy/M5FVm5ydLGcal3e5LNcfTalbeN7QL/ZGCvDEdqJ foobar@example.com", * }); * const byId = scaleway.elasticmetal.getOs({ * zone: "fr-par-2", * name: "Ubuntu", * version: "20.04 LTS (Focal Fossa)", * }); * const myOffer = scaleway.elasticmetal.getOffer({ * zone: "fr-par-2", * name: "EM-A210R-HDD", * }); * const base = new scaleway.elasticmetal.Server("base", { * zone: "fr-par-2", * offer: myOffer.then(myOffer => myOffer.offerId), * os: byId.then(byId => byId.osId), * sshKeyIds: main.id, * }); * const mainIp = new scaleway.elasticmetal.Ip("main", { * serverId: base.id, * zone: "fr-par-2", * }); * ``` * * ## Import * * Flexible IPs can be imported using the `{zone}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:index/flexibleIp:FlexibleIp main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/flexibleip.FlexibleIp has been deprecated in favor of scaleway.elasticmetal/ip.Ip */ class FlexibleIp extends pulumi.CustomResource { /** * Get an existing FlexibleIp 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("FlexibleIp is deprecated: scaleway.index/flexibleip.FlexibleIp has been deprecated in favor of scaleway.elasticmetal/ip.Ip"); return new FlexibleIp(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:index/flexibleIp:FlexibleIp'; /** * Returns true if the given object is an instance of FlexibleIp. 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'] === FlexibleIp.__pulumiType; } /** @deprecated scaleway.index/flexibleip.FlexibleIp has been deprecated in favor of scaleway.elasticmetal/ip.Ip */ constructor(name, argsOrState, opts) { pulumi.log.warn("FlexibleIp is deprecated: scaleway.index/flexibleip.FlexibleIp has been deprecated in favor of scaleway.elasticmetal/ip.Ip"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["description"] = state?.description; resourceInputs["ipAddress"] = state?.ipAddress; resourceInputs["isIpv6"] = state?.isIpv6; resourceInputs["organizationId"] = state?.organizationId; resourceInputs["projectId"] = state?.projectId; resourceInputs["reverse"] = state?.reverse; resourceInputs["serverId"] = state?.serverId; resourceInputs["status"] = state?.status; resourceInputs["tags"] = state?.tags; resourceInputs["updatedAt"] = state?.updatedAt; resourceInputs["zone"] = state?.zone; } else { const args = argsOrState; resourceInputs["description"] = args?.description; resourceInputs["isIpv6"] = args?.isIpv6; resourceInputs["projectId"] = args?.projectId; resourceInputs["reverse"] = args?.reverse; resourceInputs["serverId"] = args?.serverId; resourceInputs["tags"] = args?.tags; resourceInputs["zone"] = args?.zone; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["ipAddress"] = undefined /*out*/; resourceInputs["organizationId"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FlexibleIp.__pulumiType, name, resourceInputs, opts); } } exports.FlexibleIp = FlexibleIp; //# sourceMappingURL=flexibleIp.js.map