pulumi / pulumi-awsx

AWS infrastructure best practices in component form!
https://www.pulumi.com/docs/guides/crosswalk/aws/
Apache License 2.0
222 stars 104 forks source link

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

Open ritzk opened 1 year ago

ritzk commented 1 year ago

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).

rquitales commented 1 year ago

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.

Jimmy89 commented 12 months ago

@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.

estyrke commented 10 months ago

+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?

egjimenezg commented 8 months ago

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.

sweatybridge commented 5 days ago

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.

igorjs commented 7 minutes ago

Hey folks, is there any update on this matter?

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

Thanks in advance.