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

CloudFormation reports incorrect drift for AWS::ECS::Cluster regarding aws:cloudformation:* AutoTags generated by CFN

Open rgoltz opened this issue 3 years ago • 3 comments

Name of the resource

AWS::ECS::Cluster

Resource Name

No response

Issue Description

Once generating a new CloudFormation stack containing a AWS::ECS::Cluster resource, CloudFormation will add following automatic default AutoTags aws:cloudformation::

  • aws:cloudformation:stack-name
  • aws:cloudformation:logical-id
  • aws:cloudformation:stack-id

EcsClusterWithCfnAutoTags_githubfixed

Once you trigger a CloudFormation drift detection for such stack, it’s reporting a drift (details see "Observed Behavior").

Expected Behavior

Cloudformation drift detection must be aware of his “own” automatic set tags with naming-pattern aws:cloudformation: and doesn't reported those tags as drift for AWS::ECS::Cluster. Stack must be in state IN_SYNC.

Observed Behavior

Cloudformation reports his own AutoTags as drift, which is a bug. Stack is in state DRIFTED. It’s not possible to set or define tags starting with aws:cloudformation: within a CloudFormation template. Hence, it's not possible to fix this issue yet.

Below you can see the details of the reported drift: EcsClusterDriftDetails_github

Test Cases

Create a new stack with a simple AWS::ECS::Cluster, like:

  EXXXXECSsandboxEXXXXECSsandboxClusterAXXXXXXF:
    Type: AWS::ECS::Cluster
    Properties:
      ClusterName: EXXXXECS-sandbox-Cluster
      Tags:
      - Key: TagKeySetByCustomer1
        Value: SameValue1
      - Key: TagKeySetByCustomer2
        Value: SameValue2

Other Details

No response

rgoltz avatar Jun 24 '22 14:06 rgoltz

This issue should be fixed. Please retry this scenario and let us know if this is still an issue.

kanitkah avatar Aug 02 '22 00:08 kanitkah

Hello @kanitkah. Unfortunately, it doesn't look like anything has been fixed here. The same drift for AWS::ECS::Cluster is still there.

LariWo avatar Aug 02 '22 07:08 LariWo

This is still an issue for us as well. Thanks for looking into it.

seren avatar Sep 13 '22 09:09 seren

The fix is still under deployment.

xaoyuli avatar Oct 06 '22 20:10 xaoyuli

We can not confirm the status "Shipped" (aka. fixed) for region eu-central-1 yet - We will re-test soon and report here.

rgoltz avatar Dec 20 '22 15:12 rgoltz

Issue is resolved. Testing in eu-central-1 is also fine now. Thanks for resolving this issue.

rgoltz avatar Jan 01 '23 18:01 rgoltz