@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
173 lines • 7.03 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.getVpcPublicPatRuleOutput = exports.getVpcPublicPatRule = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* Gets information about a Public Gateway PAT rule. For further information, please see the
* [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#path-pat-rules-list-pat-rules).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const sg01 = new scaleway.instance.SecurityGroup("sg01", {
* inboundDefaultPolicy: "drop",
* outboundDefaultPolicy: "accept",
* inboundRules: [{
* action: "accept",
* port: 22,
* protocol: "TCP",
* }],
* });
* const srv01 = new scaleway.instance.Server("srv01", {
* name: "my-server",
* type: "PLAY2-NANO",
* image: "ubuntu_jammy",
* securityGroupId: sg01.id,
* });
* const pn01 = new scaleway.network.PrivateNetwork("pn01", {name: "my-pn"});
* const pnic01 = new scaleway.instance.PrivateNic("pnic01", {
* serverId: srv01.id,
* privateNetworkId: pn01.id,
* });
* const dhcp01 = new scaleway.network.PublicGatewayDhcp("dhcp01", {subnet: "192.168.0.0/24"});
* const ip01 = new scaleway.network.PublicGatewayIp("ip01", {});
* const pg01 = new scaleway.network.PublicGateway("pg01", {
* name: "my-pg",
* type: "VPC-GW-S",
* ipId: ip01.id,
* });
* const gn01 = new scaleway.network.GatewayNetwork("gn01", {
* gatewayId: pg01.id,
* privateNetworkId: pn01.id,
* dhcpId: dhcp01.id,
* cleanupDhcp: true,
* enableMasquerade: true,
* });
* const rsv01 = new scaleway.network.PublicGatewayDhcpReservation("rsv01", {
* gatewayNetworkId: gn01.id,
* macAddress: pnic01.macAddress,
* ipAddress: "192.168.0.7",
* });
* const pat01 = new scaleway.network.PublicGatewayPatRule("pat01", {
* gatewayId: pg01.id,
* privateIp: rsv01.ipAddress,
* privatePort: 22,
* publicPort: 2202,
* protocol: "tcp",
* });
* const main = scaleway.network.getPublicGatewayPatRuleOutput({
* patRuleId: pat01.id,
* });
* ```
*/
/** @deprecated scaleway.index/getvpcpublicpatrule.getVpcPublicPatRule has been deprecated in favor of scaleway.network/getpublicgatewaypatrule.getPublicGatewayPatRule */
function getVpcPublicPatRule(args, opts) {
pulumi.log.warn("getVpcPublicPatRule is deprecated: scaleway.index/getvpcpublicpatrule.getVpcPublicPatRule has been deprecated in favor of scaleway.network/getpublicgatewaypatrule.getPublicGatewayPatRule");
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("scaleway:index/getVpcPublicPatRule:getVpcPublicPatRule", {
"patRuleId": args.patRuleId,
"zone": args.zone,
}, opts);
}
exports.getVpcPublicPatRule = getVpcPublicPatRule;
/**
* Gets information about a Public Gateway PAT rule. For further information, please see the
* [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#path-pat-rules-list-pat-rules).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const sg01 = new scaleway.instance.SecurityGroup("sg01", {
* inboundDefaultPolicy: "drop",
* outboundDefaultPolicy: "accept",
* inboundRules: [{
* action: "accept",
* port: 22,
* protocol: "TCP",
* }],
* });
* const srv01 = new scaleway.instance.Server("srv01", {
* name: "my-server",
* type: "PLAY2-NANO",
* image: "ubuntu_jammy",
* securityGroupId: sg01.id,
* });
* const pn01 = new scaleway.network.PrivateNetwork("pn01", {name: "my-pn"});
* const pnic01 = new scaleway.instance.PrivateNic("pnic01", {
* serverId: srv01.id,
* privateNetworkId: pn01.id,
* });
* const dhcp01 = new scaleway.network.PublicGatewayDhcp("dhcp01", {subnet: "192.168.0.0/24"});
* const ip01 = new scaleway.network.PublicGatewayIp("ip01", {});
* const pg01 = new scaleway.network.PublicGateway("pg01", {
* name: "my-pg",
* type: "VPC-GW-S",
* ipId: ip01.id,
* });
* const gn01 = new scaleway.network.GatewayNetwork("gn01", {
* gatewayId: pg01.id,
* privateNetworkId: pn01.id,
* dhcpId: dhcp01.id,
* cleanupDhcp: true,
* enableMasquerade: true,
* });
* const rsv01 = new scaleway.network.PublicGatewayDhcpReservation("rsv01", {
* gatewayNetworkId: gn01.id,
* macAddress: pnic01.macAddress,
* ipAddress: "192.168.0.7",
* });
* const pat01 = new scaleway.network.PublicGatewayPatRule("pat01", {
* gatewayId: pg01.id,
* privateIp: rsv01.ipAddress,
* privatePort: 22,
* publicPort: 2202,
* protocol: "tcp",
* });
* const main = scaleway.network.getPublicGatewayPatRuleOutput({
* patRuleId: pat01.id,
* });
* ```
*/
/** @deprecated scaleway.index/getvpcpublicpatrule.getVpcPublicPatRule has been deprecated in favor of scaleway.network/getpublicgatewaypatrule.getPublicGatewayPatRule */
function getVpcPublicPatRuleOutput(args, opts) {
pulumi.log.warn("getVpcPublicPatRule is deprecated: scaleway.index/getvpcpublicpatrule.getVpcPublicPatRule has been deprecated in favor of scaleway.network/getpublicgatewaypatrule.getPublicGatewayPatRule");
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("scaleway:index/getVpcPublicPatRule:getVpcPublicPatRule", {
"patRuleId": args.patRuleId,
"zone": args.zone,
}, opts);
}
exports.getVpcPublicPatRuleOutput = getVpcPublicPatRuleOutput;
//# sourceMappingURL=getVpcPublicPatRule.js.map