aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 56 forks source link

Updating AWS::EC2::TransitGatewayRouteTable Tags with "cloudformation deploy" fail with "Internal Failure" #1515

Closed bplessis-swi closed 1 year ago

bplessis-swi commented 1 year ago

Name of the resource

Other

Resource Name

AWS::EC2::TransitGatewayRouteTable

Issue Description

When using the "aws cloudformation deploy" command to update tags (add tags/update values/remove tags) on a AWS::EC2::TransitGatewayRouteTable, the update process fail with "Internal Failure".

Same update with "update-stack" work but with a replacement of the resource (see #1166).

Also, and probably related, tags applied to the stack with "--tags" aren't applied to the resource

Expected Behavior

Tags should be added/removed/updated without issue as it is the case in the WebUI

Observed Behavior

Update fail with "Internal Failure"

Test Cases

Create the follow stack:

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  TransitGateway:
    Type: AWS::EC2::TransitGateway
    Properties:
      Description: "Transit Gateway ${AWS::Region}"
      DnsSupport: enable
      MulticastSupport: disable
      Tags:
        - Key: Name
          Value: !Sub "${AWS::StackName}-transit-gw"

  TransitGatewayApnRouteTable:
    Type: AWS::EC2::TransitGatewayRouteTable
    Properties:
      TransitGatewayId: !Ref TransitGateway
      Tags:
        - Key: Name
          Value: !Sub "${AWS::StackName}-tgw-route-table"

Then add/remove/update tags within and redeploy using "aws cloudformation deploy",

You can also use "aws cloudformation deploy --tags Key=xxx,Value=yyy", to see the tag propagation failure and "aws cloudformation update-stack" to see the replacement problem (issue #1166).

Other Details

No response

JoelRummel commented 1 year ago

This is a code bug that we've since resolved!