iam_access_group_members not working expected: deletes all existing users and replaces them #5887
Labels
service/IAM
Issues related to IAM
service/Resource Management
Issues related to Resource Manager or Resource controller Issues
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
When running the resource ibm_iam_access_group to create an access group and adding policies via ibm_iam_access_group_policy to it, it leaves policies in place that were created outside of terraform (e.g., manually via the IBM Cloud GUI by a user). In this case you have the set of policies that are in place, plus the ones defined in terraform. But when using iam_access_group_members, it actually removes all existing users, also those that have been added manually. You end up with only the users that were defined in terraform, not those that were added manually. This is incoherent and unexpected.
Actual Behavior
Steps to Reproduce
You need of course to connect the script via an api key to the IBM Cloud and then run:
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: