Add Teams to a Project
Allow to add a team to a project and set roles.
Split the creation of the project and the role assignment.
Based on the API: https://www.mongodb.com/docs/atlas/reference/api/project-add-team/
-
Nikita commented
Hi Melissa,
Our team is currently working on MongoDB management and we've encountered a recurring issue. Updating the Terraform resource each time we want to add team access doesn't seem like the most efficient approach. Since there's an API implementation available, it would be great if this functionality could be integrated into the Terraform provider.
-
Roman commented
Hi Melissa!
Is there any chance this could be implemented within the Terraform provider? We have the same use case as Thorben described.
-
Thorben commented
Hi Melissa,
what's needed (and, I think, being asked for in the original request) is a way to non-authoritatively add Teams to a Project.
Right now, the only place you can assign a Team to a Project is in the `project` resource itself. This is a problem in complex Terraform configurations with multiple independent tfstates and, for example, reusable generic IAM modules, as it leaves users with a single place to define both a project and all its properties as well as granting teams access to it.
Something like a `team_project_membership` resource to add a `team` to a `project` and grant it a set of `roles` would solve that.
-
We already have Teams: https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/team and the team is added to the project: https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/project. Are you asking for something different? If not we'll close this as already completed. Thanks!
(Edited by admin) -
François commented
+1 :)