@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
221 lines • 7.49 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.getIpamIpOutput = exports.getIpamIp = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* Gets information about IP addresses managed by Scaleway's IP Address Management (IPAM) service. IPAM is used for the DHCP bundled with VPC Private Networks.
*
* For more information about IPAM, see the main [documentation](https://www.scaleway.com/en/docs/vpc/concepts/#ipam).
*
* ## Examples
*
* ### IPAM IP ID
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Get info by ipam ip id
* const byId = scaleway.ipam.getIp({
* ipamIpId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ### Instance Private Network IP
*
* Get an Instance's IP on a Private Network.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Connect your instance to a private network using a private nic.
* const nic = new scaleway.instance.PrivateNic("nic", {
* serverId: server.id,
* privateNetworkId: pn.id,
* });
* // Find server private IPv4 using private-nic mac address
* const byMac = scaleway.ipam.getIpOutput({
* macAddress: nic.macAddress,
* type: "ipv4",
* });
* // Find server private IPv4 using private-nic id
* const byId = scaleway.ipam.getIpOutput({
* resource: {
* id: nic.id,
* type: "instance_private_nic",
* },
* type: "ipv4",
* });
* ```
*
* ### RDB instance
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Find the private IPv4 using resource name
* const pn = new scaleway.network.PrivateNetwork("pn", {});
* const main = new scaleway.databases.Instance("main", {
* name: "test-rdb",
* nodeType: "DB-DEV-S",
* engine: "PostgreSQL-15",
* isHaCluster: true,
* disableBackup: true,
* userName: "my_initial_user",
* password: "thiZ_is_v&ry_s3cret",
* privateNetwork: {
* pnId: pn.id,
* },
* });
* const byName = scaleway.ipam.getIpOutput({
* resource: {
* name: main.name,
* type: "rdb_instance",
* },
* type: "ipv4",
* });
* ```
*/
/** @deprecated scaleway.index/getipamip.getIpamIp has been deprecated in favor of scaleway.ipam/getip.getIp */
function getIpamIp(args, opts) {
pulumi.log.warn("getIpamIp is deprecated: scaleway.index/getipamip.getIpamIp has been deprecated in favor of scaleway.ipam/getip.getIp");
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("scaleway:index/getIpamIp:getIpamIp", {
"attached": args.attached,
"ipamIpId": args.ipamIpId,
"macAddress": args.macAddress,
"privateNetworkId": args.privateNetworkId,
"projectId": args.projectId,
"region": args.region,
"resource": args.resource,
"tags": args.tags,
"type": args.type,
"zonal": args.zonal,
}, opts);
}
exports.getIpamIp = getIpamIp;
/**
* Gets information about IP addresses managed by Scaleway's IP Address Management (IPAM) service. IPAM is used for the DHCP bundled with VPC Private Networks.
*
* For more information about IPAM, see the main [documentation](https://www.scaleway.com/en/docs/vpc/concepts/#ipam).
*
* ## Examples
*
* ### IPAM IP ID
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Get info by ipam ip id
* const byId = scaleway.ipam.getIp({
* ipamIpId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ### Instance Private Network IP
*
* Get an Instance's IP on a Private Network.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Connect your instance to a private network using a private nic.
* const nic = new scaleway.instance.PrivateNic("nic", {
* serverId: server.id,
* privateNetworkId: pn.id,
* });
* // Find server private IPv4 using private-nic mac address
* const byMac = scaleway.ipam.getIpOutput({
* macAddress: nic.macAddress,
* type: "ipv4",
* });
* // Find server private IPv4 using private-nic id
* const byId = scaleway.ipam.getIpOutput({
* resource: {
* id: nic.id,
* type: "instance_private_nic",
* },
* type: "ipv4",
* });
* ```
*
* ### RDB instance
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Find the private IPv4 using resource name
* const pn = new scaleway.network.PrivateNetwork("pn", {});
* const main = new scaleway.databases.Instance("main", {
* name: "test-rdb",
* nodeType: "DB-DEV-S",
* engine: "PostgreSQL-15",
* isHaCluster: true,
* disableBackup: true,
* userName: "my_initial_user",
* password: "thiZ_is_v&ry_s3cret",
* privateNetwork: {
* pnId: pn.id,
* },
* });
* const byName = scaleway.ipam.getIpOutput({
* resource: {
* name: main.name,
* type: "rdb_instance",
* },
* type: "ipv4",
* });
* ```
*/
/** @deprecated scaleway.index/getipamip.getIpamIp has been deprecated in favor of scaleway.ipam/getip.getIp */
function getIpamIpOutput(args, opts) {
pulumi.log.warn("getIpamIp is deprecated: scaleway.index/getipamip.getIpamIp has been deprecated in favor of scaleway.ipam/getip.getIp");
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("scaleway:index/getIpamIp:getIpamIp", {
"attached": args.attached,
"ipamIpId": args.ipamIpId,
"macAddress": args.macAddress,
"privateNetworkId": args.privateNetworkId,
"projectId": args.projectId,
"region": args.region,
"resource": args.resource,
"tags": args.tags,
"type": args.type,
"zonal": args.zonal,
}, opts);
}
exports.getIpamIpOutput = getIpamIpOutput;
//# sourceMappingURL=getIpamIp.js.map