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

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

Open
NGL321 opened this issue Mar 14, 2022 · 5 comments · May be fixed by #30123
Open

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

NGL321 opened this issue Mar 14, 2022 · 5 comments · May be fixed by #30123
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. p2

Comments

@NGL321
Copy link
Contributor

NGL321 commented Mar 14, 2022

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

@NGL321 NGL321 added bug This issue is a bug. p2 @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service labels Mar 14, 2022
@spksoft
Copy link

spksoft commented Apr 20, 2022

My team and I got this issue too ☹️

@NGL321 May I have any example code for workaround method that you suggested ?

@diranged
Copy link

diranged commented Oct 5, 2022

Chiming in - this has been open for a while and is an outstanding issue. Can someone prioritize fixing this?

@shcherbak
Copy link

No Assignees for more then a year?

@jtdroste
Copy link

The issue seems to be here: https://github.com/aws/aws-cdk/blob/v2.99.1/packages/aws-cdk-lib/aws-eks/lib/cluster-resource-handler/cluster.ts#L317

Mainly around analyzeUpdate not identifying a change in the tags, resulting in a update not processing.

@cablekevin
Copy link

Any updates on this issue? It's been almost 2 years now.

@mrlikl mrlikl linked a pull request May 9, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants