Get started with Pulumi in a free one hour introductory workshop. Register Now

Team

mongodbatlas.Teams provides a Team resource. The resource lets you create, edit and delete Teams. Also, Teams can be assigned to multiple projects, and team members’ access to the project is determined by the team’s project role.

IMPORTANT: MongoDB Atlas Team limits: max 250 teams in an organization and max 100 teams per project.

NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.

MongoDB Atlas Team limits: max 250 teams in an organization and max 100 teams per project.

Example Usage

using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Mongodbatlas.Teams("test", new Mongodbatlas.TeamsArgs
        {
            OrgId = "<ORGANIZATION-ID>",
            Usernames = 
            {
                "user1@email.com",
                "user2@email.com",
                "user3@email.com",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-mongodbatlas/sdk/go/mongodbatlas"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := mongodbatlas.NewTeams(ctx, "test", &mongodbatlas.TeamsArgs{
            OrgId: pulumi.String("<ORGANIZATION-ID>"),
            Usernames: pulumi.StringArray{
                pulumi.String("user1@email.com"),
                pulumi.String("user2@email.com"),
                pulumi.String("user3@email.com"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas

test = mongodbatlas.Teams("test",
    org_id="<ORGANIZATION-ID>",
    usernames=[
        "user1@email.com",
        "user2@email.com",
        "user3@email.com",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const test = new mongodbatlas.Teams("test", {
    orgId: "<ORGANIZATION-ID>",
    usernames: [
        "user1@email.com",
        "user2@email.com",
        "user3@email.com",
    ],
});

Create a Team Resource

new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
def Team(resource_name: str, opts: Optional[ResourceOptions] = None, name: Optional[str] = None, org_id: Optional[str] = None, usernames: Optional[Sequence[str]] = None)
func NewTeam(ctx *Context, name string, args TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Team Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Team resource accepts the following input properties:

OrgId string

The unique identifier for the organization you want to associate the team with.

Usernames List<string>

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

Name string

The name of the team you want to create.

OrgId string

The unique identifier for the organization you want to associate the team with.

Usernames []string

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

Name string

The name of the team you want to create.

orgId string

The unique identifier for the organization you want to associate the team with.

usernames string[]

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

name string

The name of the team you want to create.

org_id str

The unique identifier for the organization you want to associate the team with.

usernames Sequence[str]

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

name str

The name of the team you want to create.

Outputs

All input properties are implicitly available as output properties. Additionally, the Team resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
TeamId string

The unique identifier for the team.

Id string
The provider-assigned unique ID for this managed resource.
TeamId string

The unique identifier for the team.

id string
The provider-assigned unique ID for this managed resource.
teamId string

The unique identifier for the team.

id str
The provider-assigned unique ID for this managed resource.
team_id str

The unique identifier for the team.

Look up an Existing Team Resource

Get an existing Team resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, name: Optional[str] = None, org_id: Optional[str] = None, team_id: Optional[str] = None, usernames: Optional[Sequence[str]] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Name string

The name of the team you want to create.

OrgId string

The unique identifier for the organization you want to associate the team with.

TeamId string

The unique identifier for the team.

Usernames List<string>

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

Name string

The name of the team you want to create.

OrgId string

The unique identifier for the organization you want to associate the team with.

TeamId string

The unique identifier for the team.

Usernames []string

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

name string

The name of the team you want to create.

orgId string

The unique identifier for the organization you want to associate the team with.

teamId string

The unique identifier for the team.

usernames string[]

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

name str

The name of the team you want to create.

org_id str

The unique identifier for the organization you want to associate the team with.

team_id str

The unique identifier for the team.

usernames Sequence[str]

The Atlas usernames (email address). You can only add Atlas users who are part of the organization. Users who have not accepted an invitation to join the organization cannot be added as team members. There is a maximum of 250 Atlas users per team.

Package Details

Repository
https://github.com/pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.