-
Notifications
You must be signed in to change notification settings - Fork 89
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
Can't import or create auth0_organization_member
on Organizations with more than 50 members
#925
Comments
@sergiught sorry for the ping, I've just noticed that the repository has been quiet for some time and was wondering if you had any idea when maintainers will be able to look at some of the recent issues like this one. In the meantime, I am going to open a PR for this and operate on my own fork! |
Is there any update on this? Just hit this problem |
@james-flwls I've published binaries for my patch here, if you're interested. https://github.com/kherock/terraform-provider-auth0/releases/tag/v1.2.1-beta.0 |
Hey @kherock, I hope you're doing well and having a nice day! I apologize for the delayed response. I just wanted to provide you with an update regarding your PR (#946). While we initially considered your approach, upon further review, we realized that it might be a bit of a workaround. Your idea of checking for specific roles to determine organization membership is a bit indirect. Instead, we've decided to pursue a different approach, as outlined in PR (#961). This new approach involves using checkpoint pagination through the members endpoint, which we believe is a more direct and consistent solution. Given this direction, since we've already merged a similar solution in PR (#961), we won't be merging your PR. However, I want to sincerely thank you for your contribution and effort. If you have any questions or concerns, feel free to reach out. Thanks again for your contribution! Best Regards, |
Hi @kherock , Great news! The issue has been fixed in version 1.2.1. Please take a moment to review, and feel free to reach out if you encounter any further issues. |
Checklist
Description
I have an Organization with many members that I am currently trying to associate new members using the
auth0_organization_member
. When I try to add new members, I get the "inconsistent result after apply" error withThis only happens when there are at least 50 members in the organization. I expect that this correlates with the default page size for the Go SDK. Currently, there is only one query to find organization members, and existence is checked by a simple loop over the results:
terraform-provider-auth0/internal/auth0/organization/resource_member.go
Lines 61 to 71 in 21e8c52
Expectation
Terraform should be able to add
auth0_organization_member
s to Organizations of arbitrary size. Rather than checking for an ID in every page of the member list, I think it would be better to check that theGET /api/v2/organizations/{id}/members/{user_id}/roles
endpoint doesn't return a 404 response. Alternatively, theorganization_id:
field could be used for a Lucene search on the user search endpoint.Reproduction
auth0_organization_member
resourceAuth0 Terraform Provider version
1.2.0
Terraform version
1.3.7
The text was updated successfully, but these errors were encountered: