cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

[AWS::EC2::TransitGatewayRouteTableAssociation] - [BUG] - Association fails when updating TGW route table tags in same template

Open drem-darios opened this issue 1 year ago • 0 comments
trafficstars

Name of the resource

AWS::EC2::TransitGatewayRouteTableAssociation

Resource Name

No response

Issue Description

When updating a transit gateway route table in a CloudFormation template, if the update contains a new AWS::EC2::TransitGatewayRouteTableAssociation resource and an update to a existing AWS::EC2::TransitGatewayRouteTable tags in the same template, the template will eventually time out.

Expected Behavior

The route table tags should be updated and then the desired route table association should be created.

Observed Behavior

Since updates to the transit gateway route table tags require a replacement of the entire route table, the original route table is destroyed and recreated. Once it is recreated, the route table association never takes place. The resource is stuck waiting and will eventually timeout the deployment.

Test Cases

  1. Create a CloudFormation template that contains a AWS::EC2::TransitGatewayRouteTable resource
  2. Deploy the template
  3. Update the template by adding a tag to the existing AWS::EC2::TransitGatewayRouteTable resource
  4. Update the template by adding a AWS::EC2::TransitGatewayRouteTableAssociation
  5. Deploy the template
  6. Notice the template will never successfully deploy

Other Details

I believe resolving the issue with updating tags causing the transit gateway route table to be replace will solve this issue. Relative issues:

  • https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/2085
  • https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1324
  • https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/1166

drem-darios avatar Jul 31 '24 16:07 drem-darios