To prevent users from deleting their orgs or spaces that still contain resources, we want to add this feature in the provider.
Here are two solutions to add this feature :
First solution, we add the possibility to disable recursive deletion of organizations or spaces thanks to two separated variables AllowRecursiveOrgDeletion and AllowRecursiveSpaceDeletion. Set to false it disables recursive deletion by checking if the concerned resource still has children and returns an error. See PR #527
Second solution, we add the possibility to disable recursive deletion of resources with one variable delete_recursive_allowed. Set to false it disables recursive deletion by checking if the concerned organization or space still has children and returns an error. See PR #528
For the two solutions above, recursive deletion is enabled by default so it won't change the way the plugin works now.
The first solution is our preference because we can choose to enable or disable recursive deletion on specific resources only.
Both solutions were tested on our platform and i updated the delete function for org and space to use the API V3.
To prevent users from deleting their orgs or spaces that still contain resources, we want to add this feature in the provider.
Here are two solutions to add this feature :
First solution, we add the possibility to disable recursive deletion of organizations or spaces thanks to two separated variables
AllowRecursiveOrgDeletion
andAllowRecursiveSpaceDeletion
. Set to false it disables recursive deletion by checking if the concerned resource still has children and returns an error. See PR #527Second solution, we add the possibility to disable recursive deletion of resources with one variable
delete_recursive_allowed
. Set to false it disables recursive deletion by checking if the concerned organization or space still has children and returns an error. See PR #528For the two solutions above, recursive deletion is enabled by default so it won't change the way the plugin works now.
The first solution is our preference because we can choose to enable or disable recursive deletion on specific resources only.
Both solutions were tested on our platform and i updated the delete function for org and space to use the API V3.