cloud-native-toolkit / cloud-native-toolkit/software-everywhere
Solutions that include Portworx or ODF on IBM Cloud cannot be destroyed cleanly
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
The volumes are left hanging around and prevent the resource group from being destroyed. A separate issue has been opened with the resource group module to address the destroy failure if volumes remain - https://github.com/cloud-native-toolkit/terraform-ibm-resource-group/issues/58
We need a way to destroy the volumes if a `purge_volumes` variable is set. This flag would be set to `false` by default but always set to `true` in our automation tests. The question is where this flag should be defined. Options are:
Option>ProsCons
VPC module
- Volumes are VPC resources
- When the VPC is destroyed likely done with the volumes
- Not sure we can easily tell with which VPC a volume is associated
Cluster module
- Volumes are associated with the cluster through a tag and can be identified
- The point of saving the volumes is so the data can be preserved and restored when one cluster is destroyed and a new one is created in its place
Resource group module
- When the resource group is destroyed then it can be assumed the volume is no longer needed
- Volume management is outside the scope of the resource group module's purpose and design
**EDIT:** After some consideration, I'm going to add this logic to resource group module and repurpose cloud-native-toolkit/terraform-ibm-resource-group#58 to implement this logic. It is somewhat outside the scope of the resource group module but volumes are a special case and we can provide better error information than the IBM Cloud apis in this case (i.e. why the resource group failed to destroy and how to correct it).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.