@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
74 lines • 3.31 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.getIpamPreviewNextCidrOutput = exports.getIpamPreviewNextCidr = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Previews a CIDR from an IPAM address pool. Only works for private IPv4.
*
* > **NOTE:** This functionality is also encapsulated in a resource sharing the same name. The data source can be used when you need to use the cidr in a calculation of the same Root module, `count` for example. However, once a cidr range has been allocated that was previewed, the next refresh will find a **new** cidr and may force new resources downstream. Make sure to use `ignoreChanges` if this is undesirable.
*
* ## Example Usage
*
* Basic usage:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = aws.ec2.getIpamPreviewNextCidr({
* ipamPoolId: testAwsVpcIpamPool.id,
* netmaskLength: 28,
* });
* const testVpcIpamPoolCidrAllocation = new aws.ec2.VpcIpamPoolCidrAllocation("test", {
* ipamPoolId: testAwsVpcIpamPool.id,
* cidr: test.then(test => test.cidr),
* });
* ```
*/
function getIpamPreviewNextCidr(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ec2/getIpamPreviewNextCidr:getIpamPreviewNextCidr", {
"disallowedCidrs": args.disallowedCidrs,
"ipamPoolId": args.ipamPoolId,
"netmaskLength": args.netmaskLength,
"region": args.region,
}, opts);
}
exports.getIpamPreviewNextCidr = getIpamPreviewNextCidr;
/**
* Previews a CIDR from an IPAM address pool. Only works for private IPv4.
*
* > **NOTE:** This functionality is also encapsulated in a resource sharing the same name. The data source can be used when you need to use the cidr in a calculation of the same Root module, `count` for example. However, once a cidr range has been allocated that was previewed, the next refresh will find a **new** cidr and may force new resources downstream. Make sure to use `ignoreChanges` if this is undesirable.
*
* ## Example Usage
*
* Basic usage:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = aws.ec2.getIpamPreviewNextCidr({
* ipamPoolId: testAwsVpcIpamPool.id,
* netmaskLength: 28,
* });
* const testVpcIpamPoolCidrAllocation = new aws.ec2.VpcIpamPoolCidrAllocation("test", {
* ipamPoolId: testAwsVpcIpamPool.id,
* cidr: test.then(test => test.cidr),
* });
* ```
*/
function getIpamPreviewNextCidrOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ec2/getIpamPreviewNextCidr:getIpamPreviewNextCidr", {
"disallowedCidrs": args.disallowedCidrs,
"ipamPoolId": args.ipamPoolId,
"netmaskLength": args.netmaskLength,
"region": args.region,
}, opts);
}
exports.getIpamPreviewNextCidrOutput = getIpamPreviewNextCidrOutput;
//# sourceMappingURL=getIpamPreviewNextCidr.js.map