hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.75k stars 9.11k forks source link

Add aws_ec2_transit_gateway association_default_route_table_id and propagation_default_route_table_id parameters #24817

Closed ZsoltPath closed 2 months ago

ZsoltPath commented 2 years ago

Community Note

Description

The AWS API has the option that after creation of the TG and an additional Route table, change the default route tables. Currently when the TG is created one common route table is both the default association and propagation table. In some cases it isn't right. The console/cli/sdk allows it to change after creation and set different tables for both default. Although it's possible to disable automatic association and propagation, that makes the code more complicated.

Unfortunately it's pretty messed up in the API, so won't be easy to support in TF.

New or Affected Resource(s)

Potential Terraform Configuration

I'm not sure what would be the best way.

References

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTransitGateway.html https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyTransitGateway.html

KevinDHunter commented 2 years ago

It's worth noting that this probably WOULD require the creation of new resources, since otherwise you have a circular dependency. A route table can't be created until after the gateway is created, which means that the aws_ec2_transit_gateway resource wouldn't be able to reference the aws_ec2_transit_gateway_route_table resource.

But very much a +1 to this enhancement request. At present, the only way to manage these tables is with post-creation provisioners which, of course, is fraught with peril.

github-actions[bot] commented 3 months ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.