aws-ia / terraform-aws-network-hubandspoke

https://registry.terraform.io/modules/aws-ia/network-hubandspoke/aws
Apache License 2.0
28 stars 10 forks source link

Conditional creation of TGW route tables for Central VPCs #25

Closed alexeygumirov closed 11 months ago

alexeygumirov commented 1 year ago

In my project we are using your module for creation of central Inspection VPC, as well ass central Ingress and Egress VPCs. But the TGW we create using our own module (we have quite complex logic there), as well as association and propagation of VPC attachments to our TGW we maintain with our own modules. Hence, we don't need for the hubandspoke module to create TGW Route Tables and make association and propagation for the Central VPCs. I have added this capability in the module with the associate_and_propagate_to_tgw boolean parameter for Central VPCs. This modification is backward compatible. When this parameter is not provided - it is implicitly set to true. If TGW is created by the hubandspoke module - it always true, even if set to false (I assume that if someone wants to created TGW with the hubandspoke module, then he trusts it to do the routing in TGW as well).

I did your tests with the modified module as well as I wrote two new tests to check that option works correctly.

drewmullen commented 1 year ago

Hi @alexeygumirov thanks for taking the time to submit this PR. The feature makes sense to me. Please give us some time to review. If possible can you join the slack channel Cloud networking as Code?

alexeygumirov commented 1 year ago

Hi guys. Did you have a change to look into it?