octopusdeploy_user_role resource tries to remove and add permissions if they are out of order #539
Labels
category/list-ordering
Issues that relate to the order of lists not being deterministic and causing unnecessary state-drift
category/state-drift
Problems with inconsistent state across multiple import/plan/apply runs
kind/bug
Something isn't working
Describe the bug
When adding permissions to a user role, if you add the permissions out of order to what is in the UI the terraform apply will remove the permissions that are out of order and re-add them. This creates unnecessary removal and addition of permissions and noise in the log files.
See below for an example of the removal and re-add of permissions.
Steps to reproduce
4.. Run the terraform apply and you will see the permissions added correctly:
Expected behavior
The Octopus Terraform provider should not be removing permissions to then re-add them, it should apply the permissions (if new) regardless of the order in which they are listed in the main file.
Known Workarounds
Whilst this is not ideal the easiest way to resolve this would be to re-order your main file so the permissions match the order in the UI, this way when you run the terraform apply it wont remove any permissions it will just add the ones required.
Software Versions
Terraform Version - 1.3.4
Octopus Terraform Plugin Version - 0.12.6
The text was updated successfully, but these errors were encountered: