pulumi-awsx icon indicating copy to clipboard operation
pulumi-awsx copied to clipboard

subnets created by awsx.ec2.vpc do not get ipv6 netblocks assigned

Open ritzk opened this issue 2 years ago • 6 comments

What happened?

subnets created by awsx.ec2.vpc do not get ipv6 netblocks assigned.

Sample

const vpc = new awsx.ec2.Vpc(`k3s-vpc-${currentStack}`, {
    assignGeneratedIpv6CidrBlock: true,
    cidrBlock: cidrBlock,
    enableDnsHostnames: true,
    enableDnsSupport: true,
    natGateways: { strategy: "None" },
    subnetSpecs: [
        { type: awsx.ec2.SubnetType.Private, cidrMask: 24 },
        { type: awsx.ec2.SubnetType.Public, cidrMask: 24 }
    ],
});

Expected Behavior

subnets created have an ipv6 address associated with them

Steps to reproduce

run the code

Output of pulumi about

CLI
Version 3.75.0 Go Version go1.20.5 Go Compiler gc

Plugins NAME VERSION aws 5.42.0 aws-native 0.69.0 awsx 1.0.2 docker 3.6.1 nodejs unknown

Backend
Name pulumi.com

Dependencies: NAME VERSION @pulumi/aws 5.42.0 @pulumi/awsx 1.0.2 @pulumi/pulumi 3.76.0 @types/node 18.16.19 ip-num 1.5.1 typescript-string-operations 1.5.0 typescript 5.1.6 @pulumi/aws-native 0.69.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

ritzk avatar Jul 20 '23 23:07 ritzk

Hi @ritzk thanks for reporting this issue. and apologies that you're experiencing this.

I've inspected the codebase closer, and it looks like v1.x of AWSx does not have any references to ipv6 logic, whereas the logic for AWSx v0.40.0 does.

I'll surface this to the team and see if they have any input on this as well.

rquitales avatar Jul 27 '23 06:07 rquitales

@rquitales is there any progress on this ticket? I have created a VPC with subnets through awsx as well and suffer from the same issue. Also, now lambda starts supporting IPv6, I want my subnet to have IPv6 support so I can attach an egress only internet gateway.

Jimmy89 avatar Oct 13 '23 08:10 Jimmy89

+1 - would also need this. There's not much use in assigning an IPv6 cidr block if they aren't enabled in the subnets... I assume it's the assignIpv6AddressOnCreation property that needs to be enabled. Could it simply be exposed in the SubnetSpec interface so we can select it manually per subnet type?

estyrke avatar Nov 23 '23 12:11 estyrke

Hi @rquitales, are there any updates on this issue or a workaround to enable ipv6 support on existing subnets created with awsx? The only solution I have so far is to create a new VPC and subnets with ipv6 support enabled and move all the resources to it.

egjimenezg avatar Jan 12 '24 19:01 egjimenezg

I believe this is actually a regression upgrading from classic provider. According to the old changelog:

An awsx.ec2.Vpc with assignGeneratedIpv6CidrBlock: true will now set assignIpv6AddressOnCreation: true by default for child subnets. This can be overridden by setting that value explicitly to false with the subnet's args.

However, this is not the case for the new awsx:ec2:vpc which creates subnets with assignIpv6AddressOnCreation: false despite setting assignGeneratedIpv6CidrBlock: true in the vpc arg.

My current workaround is to switch back to using awsx.classic.ec2.Vpc which works as expected, but unfortunately isn't ideal.

sweatybridge avatar Oct 02 '24 07:10 sweatybridge

Hey folks, is there any update on this matter?

Is there any workaround instead the one proposed by @@sweatybridge

Thanks in advance.

igorjs avatar Oct 07 '24 19:10 igorjs