aws-ia / terraform-aws-vpc

AWS VPC Module
https://registry.terraform.io/modules/aws-ia/vpc/aws/latest
Apache License 2.0
92 stars 98 forks source link

fix: fixed bug on ipv6_subnets_cwan_routed local variable #112

Closed darrenhorwitz1 closed 1 year ago

darrenhorwitz1 commented 1 year ago

I noticed there was a minor bug on core_network_routes , when one passes a map of the routes to go to the cwan , the ipv6 routes local variable references the the ipv4 routes which throws an unexpected error whilst trying to deploy ipv4 routes only it also tries to deploy ipv6 routes.

Moreover, I updated the example to have a hybrid sort of example to test the expected behavior .

Love the module btw!

drewmullen commented 1 year ago

Thanks for reporting this issue, opening a PR, and for the kind words! This looks right to me but I would like @pablo19sc to confirm since he did the majority of the work involving ipv6. However, he is currently away on leave. We may not hear from him for a short stint

darrenhorwitz1 commented 1 year ago

That makes sense , will revert those changes ! @tlindsay42

darrenhorwitz1 commented 1 year ago

@pablo19sc my mistake , my thoughts were to show that the changes work with ipv4 but did not actually deploy the changes . Thanks for pointing that out ! I will revert them now thanks.

Just out of curiosity , I haven't worked with ipv6 much at all but when creating tgw's or cwan's with ipv6 support enabled, can one not attach ipv4 networks to the them without the vpc having ipv6 support ?

pablo19sc commented 1 year ago

Thanks @darrenhorwitz1! Let me ping the reviewers to merge this ASAP. Sorry for the delay, I went PTO for some weeks.

Regarding your question, both TGW and CWAN will need a dual-stack subnet to enable IPv6. That means that you can use IPv4 as well to consume IPv4 services connected to Cloud WAN. What you cannot do is enable IPv6 in the attachments is the subnet is only IPv4-only - and it will not work if the subnet is IPv6-only.