Resource: awsVpcIpamPreviewNextCidr
Previews a CIDR from an IPAM address pool. Only works for private IPv4.
Example Usage
Basic usage:
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsRegionCurrent = new aws.dataAwsRegion.DataAwsRegion(
this,
"current",
{}
);
const awsVpcIpamExample = new aws.vpcIpam.VpcIpam(this, "example", {
operatingRegions: [
{
regionName: dataAwsRegionCurrent.name,
},
],
});
const awsVpcIpamPoolExample = new aws.vpcIpamPool.VpcIpamPool(
this,
"example_2",
{
addressFamily: "ipv4",
ipamScopeId: awsVpcIpamExample.privateDefaultScopeId,
locale: dataAwsRegionCurrent.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsVpcIpamPoolExample.overrideLogicalId("example");
const awsVpcIpamPoolCidrExample = new aws.vpcIpamPoolCidr.VpcIpamPoolCidr(
this,
"example_3",
{
cidr: "172.2.0.0/16",
ipamPoolId: awsVpcIpamPoolExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsVpcIpamPoolCidrExample.overrideLogicalId("example");
const awsVpcIpamPreviewNextCidrExample =
new aws.vpcIpamPreviewNextCidr.VpcIpamPreviewNextCidr(this, "example_4", {
depends_on: [`\${${awsVpcIpamPoolCidrExample.fqn}}`],
disallowedCidrs: ["172.2.0.0/32"],
ipamPoolId: awsVpcIpamPoolExample.id,
netmaskLength: 28,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsVpcIpamPreviewNextCidrExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
disallowedCidrs
- (Optional) Exclude a particular CIDR range from being returned by the pool.ipamPoolId
- (Required) The ID of the pool to which you want to assign a CIDR.netmaskLength
- (Optional) The netmask length of the CIDR you would like to preview from the IPAM pool.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
cidr
- The previewed CIDR from the pool.id
- The ID of the preview.