mongodbatlas.Team
Explore with Pulumi AI
# Resource: mongodbatlas.Team
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)
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Team resource accepts the following input properties:
- Org
Id 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.
- Org
Id 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 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.
- org
Id 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.
- org
Id 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:
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.
- Name string
- The name of the team you want to create.
- Org
Id string - The unique identifier for the organization you want to associate the team with.
- Team
Id 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.
- Org
Id string - The unique identifier for the organization you want to associate the team with.
- Team
Id 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.
- org
Id String - The unique identifier for the organization you want to associate the team with.
- team
Id 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.
- org
Id string - The unique identifier for the organization you want to associate the team with.
- team
Id 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.
- org
Id String - The unique identifier for the organization you want to associate the team with.
- team
Id 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.