@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
104 lines • 3.46 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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVpcIpamPoolOutput = exports.getVpcIpamPool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* `aws.ec2.VpcIpamPool` provides details about an IPAM pool.
*
* This resource can prove useful when an ipam pool was created in another root
* module and you need the pool's id as an input variable. For example, pools
* can be shared via RAM and used to create vpcs with CIDRs from that pool.
*
* ## Example Usage
*
* The following example shows an account that has only 1 pool, perhaps shared
* via RAM, and using that pool id to create a VPC with a CIDR derived from
* AWS IPAM.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = aws.ec2.getVpcIpamPool({
* filters: [
* {
* name: "description",
* values: ["*test*"],
* },
* {
* name: "address-family",
* values: ["ipv4"],
* },
* ],
* });
* const testVpc = new aws.ec2.Vpc("test", {
* ipv4IpamPoolId: test.then(test => test.id),
* ipv4NetmaskLength: 28,
* });
* ```
*/
function getVpcIpamPool(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ec2/getVpcIpamPool:getVpcIpamPool", {
"allocationResourceTags": args.allocationResourceTags,
"filters": args.filters,
"id": args.id,
"ipamPoolId": args.ipamPoolId,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getVpcIpamPool = getVpcIpamPool;
/**
* `aws.ec2.VpcIpamPool` provides details about an IPAM pool.
*
* This resource can prove useful when an ipam pool was created in another root
* module and you need the pool's id as an input variable. For example, pools
* can be shared via RAM and used to create vpcs with CIDRs from that pool.
*
* ## Example Usage
*
* The following example shows an account that has only 1 pool, perhaps shared
* via RAM, and using that pool id to create a VPC with a CIDR derived from
* AWS IPAM.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = aws.ec2.getVpcIpamPool({
* filters: [
* {
* name: "description",
* values: ["*test*"],
* },
* {
* name: "address-family",
* values: ["ipv4"],
* },
* ],
* });
* const testVpc = new aws.ec2.Vpc("test", {
* ipv4IpamPoolId: test.then(test => test.id),
* ipv4NetmaskLength: 28,
* });
* ```
*/
function getVpcIpamPoolOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ec2/getVpcIpamPool:getVpcIpamPool", {
"allocationResourceTags": args.allocationResourceTags,
"filters": args.filters,
"id": args.id,
"ipamPoolId": args.ipamPoolId,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getVpcIpamPoolOutput = getVpcIpamPoolOutput;
//# sourceMappingURL=getVpcIpamPool.js.map