aws-cdk: (aws-eks): Tag Update in EKS-based Stack triggers "Version and ReleaseVersion updates cannot be combined with other updates"

Hello guys,

We have a CDK Stack that, among others, it bundles together the creation of an EKS Cluster with an EKS Managed NodeGroup. For cost/analytic purposes we have some mandatory tags being applied to all the resources of a Stack. If a Tag is being added/changed/removed, the change is propagated in the CDK tree to all the resources as you can see below.

[~] AWS::EKS::Nodegroup awsrefeksCluster/Cluster/NodegroupNodeGroup awsrefeksClusterNodegroupNodeGroup36246D59
 └─ [~] Tags
     └─ [~] .CiCd:CdkLibPpbVersion:
         ├─ [-] 7.40.0
         └─ [+] 7.41.0
.........
[~] AWS::EC2::LaunchTemplate awsrefeksCluster/NodeGroup-LaunchTemplate awsrefeksClusterNodeGroupLaunchTemplate4E8E0D48
 └─ [~] LaunchTemplateData
     └─ [~] .TagSpecifications:
         └─ @@ -24,7 +24,7 @@
            [ ] },
            [ ] {
            [ ]   "Key": "CiCd:CdkLibPpbVersion",
            [-]   "Value": "7.40.0"
            [+]   "Value": "7.41.0"
            [ ] },
            [ ] {
            [ ]   "Key": "CiCd:Product",
            @@ -65,7 +65,7 @@
            [ ] },
            [ ] {
            [ ]   "Key": "CiCd:CdkLibPpbVersion",
            [-]   "Value": "7.40.0"
            [+]   "Value": "7.41.0"
            [ ] },
            [ ] {
            [ ]   "Key": "CiCd:Product",

Basically the only change is one of the Tag’s values which is applied to all the resources, but we are interested in particular about the AWS::EKS::NodeGroup and AWS::EC2::LaunchTemplate as the Stack update fails with the following error:

AwsrefeksStack-ephemeral-tauta: creating CloudFormation changeset...
14:32:16 | UPDATE_FAILED        | AWS::EKS::Nodegroup                   | awsrefeksClusterNo...pNodeGroup36246D59
Version and ReleaseVersion updates cannot be combined with other updates

Did someone else face this issue before and might be able to advise? Thank you a lot!

What did you expect to happen?

Have the Tags updated without their change to cause the NodeGroup and the LaunchTemplate update.

Environment

  • CDK CLI Version : 1.122.0
  • Framework Version:
  • Node.js Version: v16.4.0
  • OS : MacOS
  • Language (Version): TypeScript (3.8.3)

This is 🐛 Bug Report

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 19
  • Comments: 21 (12 by maintainers)

Most upvoted comments

AWS CDK seems to reveal so many flaws of CloudFormation. Since it could take years until AWS would fix all that bugs (or build a better base for turning the actual state to the target state), we removed as workaround tags from the NodeGroup (and also the problematic CfnUserGroup) with following aspect on our Stack construct:

@jsii.implements(aws_cdk.IAspect)
class TagRemoverAspect:
    def visit(self, node):
        # Per default we exclude following resource types from tagging:
        # * Elasticache::UserGroup - has the error: "extraneous key [tags] is not
        if isinstance(node, aws_cdk.aws_elasticache.CfnUserGroup):
            node.add_deletion_override("Properties.Tags")
        if isinstance(node, aws_cdk.aws_eks.Nodegroup):
            node.node.default_child.add_deletion_override("Properties.Tags")

aws_cdk.Aspects.of(self).add(TagRemoverAspect())

@otaviomacedo any news from the cloudformation team?

I had created a custom resource lambda. Maybe I can publish it. It handles the nodegroup updates for us…

Am Mo., 23. Jan. 2023 um 15:59 Uhr schrieb dbaumgarten < @.***>:

Is there at least a way I can (semi)manually change the tags of my ressources? In a way that works fine with future runs of cdk? I am currently in the situation were I would need to change some tags and can’t do this without completely re-creating the whole stack…

— Reply to this email directly, view it on GitHub https://github.com/aws/aws-cdk/issues/16644#issuecomment-1400491229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7LKUDG3GVNP7WN3B3DSD3WT2MFNANCNFSM5EV5JPPA . You are receiving this because you were mentioned.Message ID: @.***>

– Freundliche Grüße

Markus Siebert

@otaviomacedo Hi! Any news from the team(s)? Thanks