@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
83 lines • 2.7 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getIpamIpOutput = exports.getIpamIp = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Gets information about IP managed by IPAM service. IPAM service is used for dhcp bundled in VPCs' private networks.
*
* ## Examples
*
* ### Instance Private Network IP
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
* import * as scaleway from "@pulumi/scaleway";
*
* // Get Instance IP in a private network
* const nic = new scaleway.InstancePrivateNic("nic", {
* serverId: scaleway_instance_server.server.id,
* privateNetworkId: scaleway_vpc_private_network.pn.id,
* });
* const byMac = scaleway.getIpamIpOutput({
* macAddress: nic.macAddress,
* type: "ipv4",
* });
* const byId = scaleway.getIpamIpOutput({
* resource: {
* id: nic.id,
* type: "instance_private_nic",
* },
* type: "ipv4",
* });
* ```
*/
function getIpamIp(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("scaleway:index/getIpamIp:getIpamIp", {
"macAddress": args.macAddress,
"privateNetworkId": args.privateNetworkId,
"region": args.region,
"resource": args.resource,
"type": args.type,
}, opts);
}
exports.getIpamIp = getIpamIp;
/**
* Gets information about IP managed by IPAM service. IPAM service is used for dhcp bundled in VPCs' private networks.
*
* ## Examples
*
* ### Instance Private Network IP
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
* import * as scaleway from "@pulumi/scaleway";
*
* // Get Instance IP in a private network
* const nic = new scaleway.InstancePrivateNic("nic", {
* serverId: scaleway_instance_server.server.id,
* privateNetworkId: scaleway_vpc_private_network.pn.id,
* });
* const byMac = scaleway.getIpamIpOutput({
* macAddress: nic.macAddress,
* type: "ipv4",
* });
* const byId = scaleway.getIpamIpOutput({
* resource: {
* id: nic.id,
* type: "instance_private_nic",
* },
* type: "ipv4",
* });
* ```
*/
function getIpamIpOutput(args, opts) {
return pulumi.output(args).apply((a) => getIpamIp(a, opts));
}
exports.getIpamIpOutput = getIpamIpOutput;
//# sourceMappingURL=getIpamIp.js.map