Skip to content

(eks): EKS tags do not update if edited after initial deploy #19388

@NGL321

Description

@NGL321

What is the problem?

When attempting to add tags to an already-deployed EKS cluster, tags never get added to resource. There is no issue when adding tags in the initial resource creation, so this can be worked around by either destroying and redeploying the stack, or by adding tags using the AWS SDKs.

This is likely related to the fix for the previously reported issue.

Reproduction Steps

  1. Deploy below resource
const cluster = new eks.Cluster(this, 'eks3', {
    defaultCapacity: 0,
    version: eks.KubernetesVersion.V1_21,
    vpc,
    //tags: {
    //    "test": "123"
    //}
});
  1. Remove comment of tags then redeploy

What did you expect to happen?

Tags that were not created for first deployment should have been created in the update.

What actually happened?

No tags were added to Cluster resource.

CDK CLI Version

2.16.0

Framework Version

2.16.0

Node.js Version

16.9.1

OS

OSX Sierra

Language

Typescript

Language Version

No response

Other information

Best current workaround is to add tags via the SDK tagResource() property, but this does not exist within the CDK, so is unideal.

Reported internally in ticket P59680747

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions