Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS::CloudFormation::ResourceVersion tag changes causing "internal failure" errors #58

Open
jarreds opened this issue Apr 12, 2021 · 0 comments

Comments

@jarreds
Copy link

jarreds commented Apr 12, 2021

Seeing internal failure errors when updating tags on AWS::CloudFormation::ResourceVersion resources.

Repro

Define a resource version similar to the following in a CloudFormation stack. As you can see, there are no tags defined:

    "ClientResourceVersion": {
      "Type": "AWS::CloudFormation::ResourceVersion",
      "Properties": {
        "ExecutionRoleArn": {
          "Fn::Sub": "${ResourceRole.Arn}"
        },
        "LoggingConfig": {
          "LogGroupName": "###-resource-group",
          "LogRoleArn": {
            "Fn::Sub": "${ResourceLogRole.Arn}"
          }
        },
        "SchemaHandlerPackage": "s3://###/###_resource.zip",
        "TypeName": "###::###::###"
      }
    },

Deploy the stack.

Next, generate a changeset for the stack with new tags. Eg:

aws cloudformation create-change-set \
    --stack-name my-stack \
    --change-set-name my-change-set \
    --template-body file://template.yaml \
    --tags my_tag=12345
    --capabilities CAPABILITY_IAM

Execute the changeset and observe the "internal failure" error. It's also possible that the internal failure doesn't occur until a subsequent update, but I have not confirmed.

Here is a sample changeset generated that causes an "internal failure" error in our system.

  {
    "resourceChange": {
      "logicalResourceId": "ClientResourceVersion",
      "action": "Modify",
      "physicalResourceId": "arn:aws:cloudformation:us-east-1:###########:type/resource/#########/00000007",
      "resourceType": "AWS::CloudFormation::ResourceVersion",
      "replacement": "Conditional",
      "moduleInfo": null,
      "details": [
        {
          "target": {
            "name": "LoggingConfig",
            "requiresRecreation": "Always",
            "attribute": "Properties"
          },
          "causingEntity": "ResourceLogRole.Arn",
          "evaluation": "Dynamic",
          "changeSource": "ResourceAttribute"
        },
        {
          "target": {
            "name": "ExecutionRoleArn",
            "requiresRecreation": "Always",
            "attribute": "Properties"
          },
          "causingEntity": "ResourceRole.Arn",
          "evaluation": "Dynamic",
          "changeSource": "ResourceAttribute"
        },
        {
          "target": {
            "name": null,
            "requiresRecreation": "Never",
            "attribute": "Tags"
          },
          "causingEntity": null,
          "evaluation": "Static",
          "changeSource": null
        }
      ],
      "changeSetId": null,
      "scope": [
        "Properties",
        "Tags"
      ]
    },
    "hookInvocationCount": null,
    "type": "Resource"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant