Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds LDAP user and group policy attachment resources #581

Merged
merged 5 commits into from
Aug 30, 2024

Conversation

ngharo
Copy link
Contributor

@ngharo ngharo commented Aug 30, 2024

This change adds two new resources

  • minio_iam_ldap_group_policy_attachment
  • minio_iam_ldap_user_policy_attachment

The MinIO admin API has marked the SetPolicy function as deprecated that is currently used by the minio_iam_{group,user}_policy_attachment resources. This change moves in a direction towards using the new policy AttachPolicyLDAP/DetachPolicyLDAP APIs which fixes issues around attaching policy to LDAP users and groups.

These resources are specifically here to fix these bugs in the minio_iam_{group,user}_policy_attachment when operating against LDAP groups and users.

  # minio_iam_group_policy_attachment.admin will be created
  + resource "minio_iam_group_policy_attachment" "admin" {
      + group_name  = "cn=policy.consoleAdmin,ou=unit,dc=example,dc=com"
      + id          = (known after apply)
      + policy_name = "consoleAdmin"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions in workspace "localhost"?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

minio_iam_group_policy_attachment.admin: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to minio_iam_group_policy_attachment.admin, provider
│ "provider[\"registry.terraform.io/aminueza/minio\"]" produced an unexpected new value: Root object was
│ present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Copy link
Collaborator

@felladrin felladrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this, @ngharo! And congrats for your first contribution to this repo! 🎉

Your changes will be in the next release, version 2.5.0.

@felladrin felladrin merged commit df3b2d5 into aminueza:main Aug 30, 2024
2 checks passed
@ngharo ngharo deleted the ldap-policy-attachment branch August 30, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants