-
Notifications
You must be signed in to change notification settings - Fork 178
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
Not able to import mongodbatlas_org_invitation (suggestion of improvement of manage organization users) #633
Comments
@bartier Did you happen to capture debug or trace logs? Just helps us determine the potential issue a bit quicker. Thank you! |
@themantissa Hi. Sure! I added only some part of the DEBUG trace. I discovered that when I request for invites for my organization I got a empty array.
The problem is that I can import other resources using this |
@bartier (re doing comment). Have you had any network errors? It almost looks like an interrupt. But in your comment you note that you can import other resources I'm assuming around the same time, same network config? I can have the team look either way - just want to make sure we check any easy to correct issues. |
@themantissa I haven’t seen any network error. I import other resources using the same network config. Since I got a 200 OK from the API I assume this is not the problem. I'm not sure if I'm missing any detail but if you find useful I can open a support issue in MongoDB Atlas dashboard specifying this problem using my organization account. This way I can share the organization ID facing the issue. |
@themantissa I think I understood what it is going on. If the invitation is pending on the UI, it is going to be possible to import, otherwise it will not be possible. Is this the expected behavior? I mean, I would like to start managing the organization users with only Terraform and the manually created users can't be migrated. |
@bartier correct, you can't import an invitation for a user that already accepted. At that point they are simply a user. This resource is specifically to mange the invitations, not the user beyond that. |
My use case is to import existing users to Terraform code, currently this is not possible. Do you have any suggestions regarding the use of the provider to this? |
@bartier if you can let me know why you want to import the users, i.e. how you want/need to manage them I may be able to point you in a better direction. Right now w/ the provider you can manage invitations (so inviting users to your org) and teams but we do not have resources currently beyond that for Atlas user management. |
@themantissa Sure! Here are the details: As the team is growing, it is becoming unpractical to manage organization users manually (i.e accessing UI and manually creating them without any tracking). Our use case is to manage organization users using Infrastructure as Code, with the benefit of code review and source of truth of existing users. But we already have users in our MongoDB Atlas account and importing existing users would be required to keep track in our code of previous created users. My suggestion is somehow to have an Currently, it only exists
|
We are now at the same point as @bartier. It would be great to be able to manage the users with Terraform. I tried something like this:
The code seems to work fine, but it's kind of pointless to just manage the invitation and not the real user. With the suggestion from @bartier you could manage the whole user in Terraform. Create + Invite and delete them once they leave the project. |
Closing issue - we will continue to improve invitations as is possible and hope to eventually be able to add in Atlas user management as well. Thank you to all for the feedback: cc @Zuhairahmed |
@themantissa Has this been fixed in the provider? Was there a release of terraform that handles the user invitations through terraform? We have a long list of users and would prefer to handle the user access through terraform, can you please provide an update? |
Hi @mallikarjunkantu7 supporting Altas Users resource is Terraform is on our roadmap, but still a few quarters away before we will be able to release. Feel free leave feedback (or upvote an exciting item) at feedback.mongodb.com and we can keep you updated there when this feature has been released. Hope this helps. |
hi @mallikarjunkantu7 and @bartier have you considered Atlas Federated Authentication? This will allow you to configure MongoDB Atlas to authenticate using data passed from your IdP. Hope this helps, if easier and if you would like to share more details to inform our potential future mongodbatlas_atlas_users resource feel free to email me as well and we can find time for a quick zoom call as well. [email protected] |
Terraform CLI and Terraform MongoDB Atlas Provider Version
Terraform Configuration File
Steps to Reproduce
Expected Behavior
Actual Behavior
Import invitation to Terraform with success.
Debug Output
Crash Output
Additional Context
I am using an API Key with
Organization Owner
permissions and the Org ID I copy from theOrganization -> Settings -> Organization ID
.I am able to import other resources, like clusters.
The text was updated successfully, but these errors were encountered: