Open seansund opened 2 years ago
This does not require manual intervention for ROKS, simply setting the correct property in cluster creation. See: https://github.com/IBM/automation-ibmcloud-infra-openshift/issues/15
Parameter for ROKS cluster is already set, but defaulted to false
when added: https://github.com/cloud-native-toolkit/terraform-ibm-ocp-vpc/pull/63
Edit: above comments are specific to ODF which use cluster services to provision volumes. Not the same for portworx - I have yet to see that module correctly clean up after itself in gitops form.
Unfortunately, there's no easy way to have the portworx module clean up its own volumes when it is destroyed
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 tofalse
by default but always set totrue
in our automation tests. The question is where this flag should be defined. Options are: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).