Previews a CIDR from an IPAM address pool. Only works for private IPv4.
Basic usage:
data "aws_vpc_ipam_preview_next_cidr" "test" {
ipam_pool_id = aws_vpc_ipam_pool.test.id
netmask_length = 28
depends_on = [
aws_vpc_ipam_pool_cidr.test
]
}
resource "aws_vpc_ipam_pool_cidr_allocation" "test" {
ipam_pool_id = aws_vpc_ipam_pool.test.id
cidr = data.aws_vpc_ipam_preview_next_cidr.test.cidr
lifecycle {
ignore_changes = [cidr]
}
}
This data source supports the following arguments:
disallowed_cidrs
- (Optional) Exclude a particular CIDR range from being returned by the pool.ipam_pool_id
- (Required) ID of the pool to which you want to assign a CIDR.netmask_length
- (Optional) Netmask length of the CIDR you would like to preview from the IPAM pool.This data source exports the following attributes in addition to the arguments above:
cidr
- Previewed CIDR from the pool.id
- ID of the preview.read
- (Default 20m
)