[New Resources]: Default TGW association and propagation route table settings #35085
Labels
new-resource
Introduces a new resource.
service/transitgateway
Issues and PRs that pertain to the transitgateway service.
Milestone
Description
By default, a transit gateway is created with one route table, with new attachments being automatically set up to associate with that route table and to propagate routes to it. Each of those two behaviors can be suppressed at creation, and if both are disabled the route table is not created. After creation, it’s possible to turn that behavior on and off, with enabling it requiring the user to specify a route table ID. Splitting up the route table can be desirable for use cases such as forcing all traffic through a firewall, inspection appliance, etc. (by having the default association RT be one that sends everything to the central VPC, with the appliance then sending it back through the TGW, where that connection is the only one associated with the default propagation RT). There currently seems to be no way to achieve this in Terraform - the author of my team’s module resorted to taking a region and profile name as variables and making the changes using a null resource with local-exec provisioners to make AWS CLI calls.
Conceptually this would ideally be an argument to the TGW resource itself, but in practice that doesn’t seem likely to be possible because route tables are created in the context of a TGW so you couldn’t reference one on the resource itself.
Requested Resource(s) and/or Data Source(s)
aws_ec2_transit_gateway_default_{propagation,association}
Potential Terraform Configuration
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: