Enabling IPv6 on Resources and VPCs
See original GitHub issueHi,
I’m just starting out to play with the SDK, please forgive if I a missing something. First off, I’d like to probably point out how great this product is and I see a bright future for it. It’s in the early stages and I understand things will be missing. This is not a complaint, just something I noticed while attempting to create an IPv6 enabled app.
It seems like the ability to map an amazonProvidedIpv6CidrBlock
is missing within the @aws-cdk/aws-ec2 VpcNetwork
construct as well as within the SubnetConfiguration
interface.
Something along the lines of the below would be helpful.
import * as ec2 from "@aws-cdk/aws-ec2";
new ec2.VpcNetwork(this, name, {
// other attributes
amazonProvidedIpv6CidrBlock: true,
// other attributes
}
Other values left out on purpose just to keep this concise.
From the subnetConfiguration[] it would be helpful to have.
import * as ec2 from "@aws-cdk/aws-ec2";
new ec2.VpcNetwork(this, name, {
// other attributes
subnetConfiguration: [
{
name: "pub",
cidrMask: 22,
ipv6Cidr: true,
mapIPv6OnLaunch: true,
subnetType: ec2.SubnetType.Public
}
]
// other attributes
}
The ipv6Cidr
could be a boolean
since all subnet cidrs must be /64
and then the obvious addition to map IPv6 address to instances within those subnet .
To get the amazonProvidedIpv6CidrBlock
within the created VpcNetwork I had to do something like this, and in testing, it seems to work. Though going through the documentation, it’s advised to use native constructs, which I’d agree completely.
this.vpc = new ec2.VpcNetwork(this, `${name}Vpc`, args);
new ec2.cloudformation.VPCCidrBlockResource(
this,
`CidrRes`,
{
vpcId: this.vpc.vpcId,
amazonProvidedIpv6CidrBlock: true
}
);
Issue Analytics
- State:
- Created 5 years ago
- Reactions:42
- Comments:17 (5 by maintainers)
Top GitHub Comments
This is pretty unexpected that IPv6 is just not supported in the CDKs core networking construct.
Actually our whole usecase is to have exposable ipv6, to replace NAT with free of cost egress only internet gateway.