Closed alexeygumirov closed 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?
Hi guys. Did you have a change to look into it?
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 totrue
. If TGW is created by the hubandspoke module - it alwaystrue
, even if set tofalse
(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.