1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. Team
MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi

mongodbatlas.Team

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi

    mongodbatlas.Team 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 are limited to a maximum of 250 teams in an organization and 100 teams per project.

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.Team("test", {
        orgId: "<ORGANIZATION-ID>",
        name: "myNewTeam",
        usernames: [
            "user1@email.com",
            "user2@email.com",
            "user3@email.com",
        ],
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.Team("test",
        org_id="<ORGANIZATION-ID>",
        name="myNewTeam",
        usernames=[
            "user1@email.com",
            "user2@email.com",
            "user3@email.com",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewTeam(ctx, "test", &mongodbatlas.TeamArgs{
    			OrgId: pulumi.String("<ORGANIZATION-ID>"),
    			Name:  pulumi.String("myNewTeam"),
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.Team("test", new()
        {
            OrgId = "<ORGANIZATION-ID>",
            Name = "myNewTeam",
            Usernames = new[]
            {
                "user1@email.com",
                "user2@email.com",
                "user3@email.com",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.Team;
    import com.pulumi.mongodbatlas.TeamArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new Team("test", TeamArgs.builder()
                .orgId("<ORGANIZATION-ID>")
                .name("myNewTeam")
                .usernames(            
                    "user1@email.com",
                    "user2@email.com",
                    "user3@email.com")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:Team
        properties:
          orgId: <ORGANIZATION-ID>
          name: myNewTeam
          usernames:
            - user1@email.com
            - user2@email.com
            - user3@email.com
    

    Create Team Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
    @overload
    def Team(resource_name: str,
             args: TeamArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Team(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             org_id: Optional[str] = None,
             usernames: Optional[Sequence[str]] = None,
             name: Optional[str] = None)
    func NewTeam(ctx *Context, name string, args TeamArgs, opts ...ResourceOption) (*Team, error)
    public Team(string name, TeamArgs args, CustomResourceOptions? opts = null)
    public Team(String name, TeamArgs args)
    public Team(String name, TeamArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:Team
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args TeamArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args TeamArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var teamResource = new Mongodbatlas.Team("teamResource", new()
    {
        OrgId = "string",
        Usernames = new[]
        {
            "string",
        },
        Name = "string",
    });
    
    example, err := mongodbatlas.NewTeam(ctx, "teamResource", &mongodbatlas.TeamArgs{
    	OrgId: pulumi.String("string"),
    	Usernames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var teamResource = new Team("teamResource", TeamArgs.builder()
        .orgId("string")
        .usernames("string")
        .name("string")
        .build());
    
    team_resource = mongodbatlas.Team("teamResource",
        org_id="string",
        usernames=["string"],
        name="string")
    
    const teamResource = new mongodbatlas.Team("teamResource", {
        orgId: "string",
        usernames: ["string"],
        name: "string",
    });
    
    type: mongodbatlas:Team
    properties:
        name: string
        orgId: string
        usernames:
            - string
    

    Team Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts 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 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.
    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.
    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.

    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 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.
    id String
    The provider-assigned unique ID for this managed resource.
    teamId String
    The unique identifier for the team.

    Look up 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)
    public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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 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 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.
    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.

    Import

    Teams can be imported using the organization ID and team id, in the format ORGID-TEAMID, e.g.

    $ pulumi import mongodbatlas:index/team:Team my_team 1112222b3bf99403840e8934-1112222b3bf99403840e8935
    

    See detailed information for arguments and attributes: MongoDB API Teams

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi