-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(eks): EKS tags do not update if edited after initial deploy #19388
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServiceRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.This issue is a bug.p2
Description
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
- Deploy below resource
const cluster = new eks.Cluster(this, 'eks3', {
defaultCapacity: 0,
version: eks.KubernetesVersion.V1_21,
vpc,
//tags: {
// "test": "123"
//}
});- Remove comment of
tagsthen 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes ServiceRelated to Amazon Elastic Kubernetes ServicebugThis issue is a bug.This issue is a bug.p2