Commit 87df570
authored
Delete orphaned subnets in eksctl_delete_cluster_cf_stack (#749)
*Issue #, if available:*
Cluster deletion fails with `DependencyViolation` when CloudFormation
tries to delete the VPC. This happens when a previous stack creation
partially failed and rolled back, leaving orphaned subnets behind that
CloudFormation no longer tracks but that still block VPC deletion.
*Description of changes:*
In `eksctl_delete_cluster_cf_stack`, before initiating the
`CloudFormation` stack deletion, we now query and delete any subnets
tagged with the stack name. These are subnets that were created by
CloudFormation during a failed/rolled-back stack creation and were not
cleaned up, causing subsequent VPC deletion to fail.
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
Signed-off-by: Renan Magagnin <renanmag@amazon.co.uk>1 parent 0c91582 commit 87df570
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
212 | 227 | | |
213 | 228 | | |
214 | 229 | | |
| |||
0 commit comments