Closed dmaes closed 1 year ago
I think that the better way would be to apply empty policy if none is set for minio_iam_service_account. This way we can avoid cases like:
In this case terraform apply
won't change service account's policy, but it will be changed because user's policy has changed.
Functionally service account without policy has the same permissions as with user's policy.
Tested your PR, looks good.
Description
minio_iam_service_account
resource keeps dropping policy.Steps to Reproduce
Expected behavior: Clean terraform runs when nothing has changed
Actual behavior: The service account's policy is set to the policies from it's user. Terraform picks this up, sees no policy defined in code, and tries to drop it on every run. Policy should be changed if any is defined and differs, but should be ignored when none is defined in code.
Reproduces how often: Always
Versions
Terraform: 1.5.5 Module: 1.18.0
Additional Information
Seems related to/introduced by Issue #501 and PR #502