Deleting a resource a SGDistributedLogs depends on should not be possible
Summary
On the web console, when Users try to delete a resource associated to any SGCluster, the REST API returns an error and the DELETE
is forbidden.
SGInstanceProfiles or SGPostgresConfigs are also dependencies for SGDistributedLogs, but in such cases the User is allowed to delete them, even if those are associated to a given SGDistributedLogs.
Since both SGCluster and SGDistributedLogs depend on such resources, then both should behave in the same way, this is, the resources they depend on should not be deletable through the REST API.
Steps to reproduce
- Create a SGDistributedLogs and assign a SGInstanceProfile or SGPostgresConfig not used by any other SGCluster or SGDistributedLogs.
- Delete the chosen SGInstanceProfile/SGPostgresConfig.
Expected Behaviour
The User should receive an error when trying to delete a resource that a SGDistributedLogs depends on.
Environment
- StackGres version: 1.3.0
Edited by Matteo Melli