Closed docbyte86 closed 1 year ago
i don't have access to the URL you provided, but i'm not sure what would you expect the provider to solve in this case?
acceptance tests for user creation & deletion passed last night
the test can be found here:
(note that the test runs both apply and destroy)
pipeline job:
https://github.com/SchwarzIT/terraform-provider-stackit/actions/runs/5684754640/job/15408955334
you may want to reach out to STACKIT support in this case
I think you didn't properly tested with data inside of the database. A simple create and destroy is not problem. But what is about a tf destroy where a database has been created, where the user (created with TF) is the owner?
@docbyte86 again, the question is - what do you expect the provider to do in this case?
statement from the team: "if the user owns an object you are not able to the delete the user because we decided not to use the drop cascade option"
as the provider has no way of knowing of objects it doesn't maintain (and shouldn't delete them as it's an anti pattern), the only thing i would suggest here is that it returns a more informative response of why a failure may happen
Hello,
terraform destroy is not possible while user is still owner of a database.
Error message:
│ Error: failed to delete user │ │ call error: │ HTTP status code: 500 │ HTTP status message: Internal Server Error │ Server response: │ URL: │ https://postgres-flex-service.api.eu01.stackit.cloud/v1/projects/a300eae4-9e89-484b-9dc1-0aefa592de59/instances/de69e53f-7950-40ef-9cf6-7e21ace779a2/users/16691