-
Notifications
You must be signed in to change notification settings - Fork 4.5k
eks: a destructive update of the eks cluster and fails to do so #24174
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.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp2
Description
Describe the bug
When updating an eks Cluster, there is no permission to DeleteCluster from Role if there are destructive changes to the cluster.
The following rolls failed. Probably because of the following
- The "resource" in the IAM policy is changed to the new cluster.
- Attempting to "eks:DeleteCluster" on the old cluster
- the deletion fails because the access rights to the old cluster were revoked in 1.
Expected Behavior
Successful deletion
Current Behavior
Failure to do this.
Reproduction Steps
First deployed as follows.
new eks.Cluster(this, 'hello-eks', {
version: eks.KubernetesVersion.V1_24,
kubectlLayer: new KubectlV24Layer(this, 'kubectl'),
});Then update by rewriting it like this (changing the cluster name is a destructive change)
new eks.Cluster(this, 'hello-eks', {
clusterName: "sample",
version: eks.KubernetesVersion.V1_24,
kubectlLayer: new KubectlV24Layer(this, 'kubectl'),
});Possible Solution
EKS:DeleteCluster's Statement separation, Resouce='*'
Additional Information/Context
No response
CDK CLI Version
2.62.2
Framework Version
No response
Node.js Version
any
OS
any
Language
Typescript
Language Version
No response
Other information
No response
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.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp2