@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
185 lines • 7.76 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.VpcPublicGateway = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* Creates and manages Scaleway Public Gateways.
* For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/public-gateway).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.network.PublicGateway("main", {
* name: "public_gateway_demo",
* type: "VPC-GW-S",
* tags: [
* "demo",
* "terraform",
* ],
* });
* ```
*
* ### With bastion
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
* import * as std from "@pulumi/std";
*
* const key1 = new scaleway.iam.SshKey("key1", {
* name: "key1",
* publicKey: std.file({
* input: "~/.ssh/id_rsa.pub",
* }).result,
* });
* const key2 = new scaleway.iam.SshKey("key2", {
* name: "key2",
* publicKey: std.file({
* input: "~/.ssh/another_key.pub",
* }).result,
* });
* const sshKeysHash = std.sha256({
* input: std.join({
* separator: ",",
* input: [
* key1.publicKey,
* key2.publicKey,
* ],
* }).result,
* }).result;
* const main = new scaleway.network.PublicGateway("main", {
* name: "public_gateway_demo",
* type: "VPC-GW-S",
* tags: [
* "demo",
* "terraform",
* ],
* bastionEnabled: true,
* bastionPort: 61000,
* refreshSshKeys: sshKeysHash,
* });
* ```
*
* ## Import
*
* Public Gateways can be imported using `{zone}/{id}`, e.g.
*
* ```sh
* $ pulumi import scaleway:index/vpcPublicGateway:VpcPublicGateway main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/vpcpublicgateway.VpcPublicGateway has been deprecated in favor of scaleway.network/publicgateway.PublicGateway
*/
class VpcPublicGateway extends pulumi.CustomResource {
/**
* Get an existing VpcPublicGateway 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("VpcPublicGateway is deprecated: scaleway.index/vpcpublicgateway.VpcPublicGateway has been deprecated in favor of scaleway.network/publicgateway.PublicGateway");
return new VpcPublicGateway(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'scaleway:index/vpcPublicGateway:VpcPublicGateway';
/**
* Returns true if the given object is an instance of VpcPublicGateway. 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'] === VpcPublicGateway.__pulumiType;
}
/** @deprecated scaleway.index/vpcpublicgateway.VpcPublicGateway has been deprecated in favor of scaleway.network/publicgateway.PublicGateway */
constructor(name, argsOrState, opts) {
pulumi.log.warn("VpcPublicGateway is deprecated: scaleway.index/vpcpublicgateway.VpcPublicGateway has been deprecated in favor of scaleway.network/publicgateway.PublicGateway");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowedIpRanges"] = state?.allowedIpRanges;
resourceInputs["bandwidth"] = state?.bandwidth;
resourceInputs["bastionEnabled"] = state?.bastionEnabled;
resourceInputs["bastionPort"] = state?.bastionPort;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["enableSmtp"] = state?.enableSmtp;
resourceInputs["ipId"] = state?.ipId;
resourceInputs["moveToIpam"] = state?.moveToIpam;
resourceInputs["name"] = state?.name;
resourceInputs["organizationId"] = state?.organizationId;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["refreshSshKeys"] = state?.refreshSshKeys;
resourceInputs["status"] = state?.status;
resourceInputs["tags"] = state?.tags;
resourceInputs["type"] = state?.type;
resourceInputs["updatedAt"] = state?.updatedAt;
resourceInputs["upstreamDnsServers"] = state?.upstreamDnsServers;
resourceInputs["zone"] = state?.zone;
}
else {
const args = argsOrState;
if (args?.type === undefined && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["allowedIpRanges"] = args?.allowedIpRanges;
resourceInputs["bastionEnabled"] = args?.bastionEnabled;
resourceInputs["bastionPort"] = args?.bastionPort;
resourceInputs["enableSmtp"] = args?.enableSmtp;
resourceInputs["ipId"] = args?.ipId;
resourceInputs["moveToIpam"] = args?.moveToIpam;
resourceInputs["name"] = args?.name;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["refreshSshKeys"] = args?.refreshSshKeys;
resourceInputs["tags"] = args?.tags;
resourceInputs["type"] = args?.type;
resourceInputs["zone"] = args?.zone;
resourceInputs["bandwidth"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["organizationId"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
resourceInputs["upstreamDnsServers"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcPublicGateway.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcPublicGateway = VpcPublicGateway;
//# sourceMappingURL=vpcPublicGateway.js.map