IPAM construct for kapua-cdk
npm install kapua-ipamThis package contains constructs for integrating with Amazon IP Address Manager. While the IPAM Service is GA and provides a very useful service, only a handful of services natively support ingesting a IPAM allocated address ( ie, VPC ).
For futher infomation on Amazon IPAM, see the IPAM Documentation
The Cidr ranges for IPSec VPN Tunnels must comply to several constraints.
- they must be a /30
- they must be subnets of 169.254.0.0/16
- they must not conflict with the reserved subnets ( see docs above )
The following example demonstrates how the constructs can be used to create an address Pool and suitable allocations, that met these criteria
``
const tunnelIPAMPool = new kapua_ipam.IpsecTunnelPool(this, 'ipampool', {
ipamScopeId: 'ipam-scope-00112233445566778',
cidr: '169.254.100.0/27',
description: 'Addressing for IPSec Tunnels between ap-southeast-2 and on prem',
name: 'ToOnPremVPNTunnels'
})
var assignedCidrs: string[] = []
const tunnelAllocation = new GetTunnelAddressPair(this, ${name}tunneladdress,{
ipamPoolId: tunnelIPAMPool.attrIpamPoolId,
name: name
})
assignedCidrs = tunnelAllocation.assignedCidrPair
``
assignedCidrPair is consumed as a property kapua_transitGateway.vpnprops