Expand description
Allocates (reserves) a CIDR from an IPAM address pool, preventing usage by IPAM. Only works for private IPv4.
§Example Usage
Basic usage:
resources:
example:
type: aws:ec2:VpcIpamPoolCidrAllocation
properties:
ipamPoolId: ${exampleVpcIpamPool.id}
cidr: 172.20.0.0/24
options:
dependsOn:
- ${exampleVpcIpamPoolCidr}
exampleVpcIpamPoolCidr:
type: aws:ec2:VpcIpamPoolCidr
name: example
properties:
ipamPoolId: ${exampleVpcIpamPool.id}
cidr: 172.20.0.0/16
exampleVpcIpamPool:
type: aws:ec2:VpcIpamPool
name: example
properties:
addressFamily: ipv4
ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}
locale: ${current.name}
exampleVpcIpam:
type: aws:ec2:VpcIpam
name: example
properties:
operatingRegions:
- regionName: ${current.name}
variables:
current:
fn::invoke:
function: aws:getRegion
arguments: {}
With the disallowed_cidrs
attribute:
resources:
example:
type: aws:ec2:VpcIpamPoolCidrAllocation
properties:
ipamPoolId: ${exampleVpcIpamPool.id}
netmaskLength: 28
disallowedCidrs:
- 172.20.0.0/28
options:
dependsOn:
- ${exampleVpcIpamPoolCidr}
exampleVpcIpamPoolCidr:
type: aws:ec2:VpcIpamPoolCidr
name: example
properties:
ipamPoolId: ${exampleVpcIpamPool.id}
cidr: 172.20.0.0/16
exampleVpcIpamPool:
type: aws:ec2:VpcIpamPool
name: example
properties:
addressFamily: ipv4
ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}
locale: ${current.name}
exampleVpcIpam:
type: aws:ec2:VpcIpam
name: example
properties:
operatingRegions:
- regionName: ${current.name}
variables:
current:
fn::invoke:
function: aws:getRegion
arguments: {}
§Import
Using pulumi import
, import IPAM allocations using the allocation id
and pool id
, separated by _
. For example:
$ pulumi import aws:ec2/vpcIpamPoolCidrAllocation:VpcIpamPoolCidrAllocation example ipam-pool-alloc-0dc6d196509c049ba8b549ff99f639736_ipam-pool-07cfb559e0921fcbe
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments