You must be logged in to view saved presets
Allocates a specific CIDR block within an IPAM pool to prevent its usage elsewhere in the network.
data "aws_region" "current" {
}
resource "aws_vpc_ipam" "example" {
operating_regions {
region_name = data.aws_region.current.name
}
}
resource "aws_vpc_ipam_pool" "example" {
address_family = "ipv4"
ipam_scope_id = aws_vpc_ipam.example.private_default_scope_id
locale = data.aws_region.current.name
}
resource "aws_vpc_ipam_pool_cidr" "example" {
cidr = "172.20.0.0/16"
ipam_pool_id = aws_vpc_ipam_pool.example.id
}
resource "aws_vpc_ipam_pool_cidr_allocation" "example" {
cidr = "172.20.0.0/24"
depends_on = ["aws_vpc_ipam_pool_cidr.example"]
ipam_pool_id = aws_vpc_ipam_pool.example.id
}