Closed ceriath closed 2 years ago
Hi @ceriath, thank you very much for your collaboration but since there is a solution for that issue we've closed it. The Opsgenie behavior and response are correct actually. It's an ordering and dependency problem caused by the Terraform.
Sorry but as mentioned the solution is NOT a solution, managing the order within the terraform provider is much more convenient. Also the process of removal of user is mostly (as per what terraform can offer) an automated process, needing to do that in two steps takes it back to do it manually which removes all the interest of automation. Please consider doing something so automation and managing users as code can be done the way it should
Hi all, any users that already have dependency on schedule, escalation, team or other resources can not be removed easily. Please correct me if I am wrong but your PR will remove the relation of user with teams even if it is still in terraform configuration.
Even if it solves your problem, it can not solve the problem that remove the user but keep the relation of user with teams.
Please consider the terraform configuration that keep the user email inside the team but you removed the user completely.
According to your PR, the first deployment will remove user everywhere and second deployment will fail because there is no user to add the team. To sum up, if we break the idempotency in between modules, it will cause another problem even if it is solved.
Unfortunately, there are no option to keep the order in between modules in the plugin. However, we have created the internal ticket and find out the better solution to solve it.
Hi @ceriath, could you please check the latest version to confirm? Your commit was merged also. Thanks for your contribution.
@frknyldz That works. Thank you!
This fixes #184 by simply removing the user from all their teams when deleting the user.