1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. CloudUserProjectAssignment
MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi
mongodbatlas logo
MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi

    mongodbatlas.CloudUserProjectAssignment provides a Cloud User Project Assignment resource. It lets you manage the association between a cloud user and a project, enabling you to import, assign, remove, or update the user’s membership.

    Depending on the user’s current membership status in the project’s organization, MongoDB Cloud handles invitations and access in different ways:

    • If the user has a pending invitation to join the project’s organization, MongoDB Cloud modifies it and grants project access.
    • If the user doesn’t have an invitation to join the organization, MongoDB Cloud sends a new invitation that grants the user organization and project access.
    • If the user is already active in the project’s organization, MongoDB Cloud grants access to the project.

    NOTE: Users with pending invitations created using the deprecated mongodbatlas.ProjectInvitation resource or via the deprecated Invite One MongoDB Cloud User to One Project endpoint cannot be managed with this resource. See MongoDB Atlas API for details. To manage such users with this resource, refer to our Project Invitation to Cloud User Project Assignment Migration Guide.

    Example Usage

    S

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const example = new mongodbatlas.CloudUserProjectAssignment("example", {
        projectId: projectId,
        username: userEmail,
        roles: [
            "GROUP_OWNER",
            "GROUP_DATA_ACCESS_ADMIN",
        ],
    });
    const exampleUsername = example.username.apply(username => mongodbatlas.getCloudUserProjectAssignmentOutput({
        projectId: projectId,
        username: username,
    }));
    const exampleUserId = example.userId.apply(userId => mongodbatlas.getCloudUserProjectAssignmentOutput({
        projectId: projectId,
        userId: userId,
    }));
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    example = mongodbatlas.CloudUserProjectAssignment("example",
        project_id=project_id,
        username=user_email,
        roles=[
            "GROUP_OWNER",
            "GROUP_DATA_ACCESS_ADMIN",
        ])
    example_username = example.username.apply(lambda username: mongodbatlas.get_cloud_user_project_assignment_output(project_id=project_id,
        username=username))
    example_user_id = example.user_id.apply(lambda user_id: mongodbatlas.get_cloud_user_project_assignment_output(project_id=project_id,
        user_id=user_id))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := mongodbatlas.NewCloudUserProjectAssignment(ctx, "example", &mongodbatlas.CloudUserProjectAssignmentArgs{
    			ProjectId: pulumi.Any(projectId),
    			Username:  pulumi.Any(userEmail),
    			Roles: pulumi.StringArray{
    				pulumi.String("GROUP_OWNER"),
    				pulumi.String("GROUP_DATA_ACCESS_ADMIN"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = example.Username.ApplyT(func(username string) (mongodbatlas.GetCloudUserProjectAssignmentResult, error) {
    			return mongodbatlas.GetCloudUserProjectAssignmentResult(interface{}(mongodbatlas.LookupCloudUserProjectAssignment(ctx, &mongodbatlas.LookupCloudUserProjectAssignmentArgs{
    				ProjectId: projectId,
    				Username:  pulumi.StringRef(pulumi.StringRef(username)),
    			}, nil))), nil
    		}).(mongodbatlas.GetCloudUserProjectAssignmentResultOutput)
    		_ = example.UserId.ApplyT(func(userId string) (mongodbatlas.GetCloudUserProjectAssignmentResult, error) {
    			return mongodbatlas.GetCloudUserProjectAssignmentResult(interface{}(mongodbatlas.LookupCloudUserProjectAssignment(ctx, &mongodbatlas.LookupCloudUserProjectAssignmentArgs{
    				ProjectId: projectId,
    				UserId:    pulumi.StringRef(pulumi.StringRef(userId)),
    			}, nil))), nil
    		}).(mongodbatlas.GetCloudUserProjectAssignmentResultOutput)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Mongodbatlas.CloudUserProjectAssignment("example", new()
        {
            ProjectId = projectId,
            Username = userEmail,
            Roles = new[]
            {
                "GROUP_OWNER",
                "GROUP_DATA_ACCESS_ADMIN",
            },
        });
    
        var exampleUsername = Mongodbatlas.GetCloudUserProjectAssignment.Invoke(new()
        {
            ProjectId = projectId,
            Username = example.Username,
        });
    
        var exampleUserId = Mongodbatlas.GetCloudUserProjectAssignment.Invoke(new()
        {
            ProjectId = projectId,
            UserId = example.UserId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.CloudUserProjectAssignment;
    import com.pulumi.mongodbatlas.CloudUserProjectAssignmentArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetCloudUserProjectAssignmentArgs;
    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 example = new CloudUserProjectAssignment("example", CloudUserProjectAssignmentArgs.builder()
                .projectId(projectId)
                .username(userEmail)
                .roles(            
                    "GROUP_OWNER",
                    "GROUP_DATA_ACCESS_ADMIN")
                .build());
    
            final var exampleUsername = example.username().applyValue(_username -> MongodbatlasFunctions.getCloudUserProjectAssignment(GetCloudUserProjectAssignmentArgs.builder()
                .projectId(projectId)
                .username(_username)
                .build()));
    
            final var exampleUserId = example.userId().applyValue(_userId -> MongodbatlasFunctions.getCloudUserProjectAssignment(GetCloudUserProjectAssignmentArgs.builder()
                .projectId(projectId)
                .userId(_userId)
                .build()));
    
        }
    }
    
    resources:
      example:
        type: mongodbatlas:CloudUserProjectAssignment
        properties:
          projectId: ${projectId}
          username: ${userEmail}
          roles:
            - GROUP_OWNER
            - GROUP_DATA_ACCESS_ADMIN
    variables:
      exampleUsername:
        fn::invoke:
          function: mongodbatlas:getCloudUserProjectAssignment
          arguments:
            projectId: ${projectId}
            username: ${example.username}
      exampleUserId:
        fn::invoke:
          function: mongodbatlas:getCloudUserProjectAssignment
          arguments:
            projectId: ${projectId}
            userId: ${example.userId}
    

    Further Examples

    • Cloud User Project Assignment

    Create CloudUserProjectAssignment Resource

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

    Constructor syntax

    new CloudUserProjectAssignment(name: string, args: CloudUserProjectAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def CloudUserProjectAssignment(resource_name: str,
                                   args: CloudUserProjectAssignmentArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudUserProjectAssignment(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   project_id: Optional[str] = None,
                                   roles: Optional[Sequence[str]] = None,
                                   username: Optional[str] = None)
    func NewCloudUserProjectAssignment(ctx *Context, name string, args CloudUserProjectAssignmentArgs, opts ...ResourceOption) (*CloudUserProjectAssignment, error)
    public CloudUserProjectAssignment(string name, CloudUserProjectAssignmentArgs args, CustomResourceOptions? opts = null)
    public CloudUserProjectAssignment(String name, CloudUserProjectAssignmentArgs args)
    public CloudUserProjectAssignment(String name, CloudUserProjectAssignmentArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:CloudUserProjectAssignment
    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 CloudUserProjectAssignmentArgs
    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 CloudUserProjectAssignmentArgs
    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 CloudUserProjectAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudUserProjectAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudUserProjectAssignmentArgs
    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 cloudUserProjectAssignmentResource = new Mongodbatlas.CloudUserProjectAssignment("cloudUserProjectAssignmentResource", new()
    {
        ProjectId = "string",
        Roles = new[]
        {
            "string",
        },
        Username = "string",
    });
    
    example, err := mongodbatlas.NewCloudUserProjectAssignment(ctx, "cloudUserProjectAssignmentResource", &mongodbatlas.CloudUserProjectAssignmentArgs{
    	ProjectId: pulumi.String("string"),
    	Roles: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Username: pulumi.String("string"),
    })
    
    var cloudUserProjectAssignmentResource = new CloudUserProjectAssignment("cloudUserProjectAssignmentResource", CloudUserProjectAssignmentArgs.builder()
        .projectId("string")
        .roles("string")
        .username("string")
        .build());
    
    cloud_user_project_assignment_resource = mongodbatlas.CloudUserProjectAssignment("cloudUserProjectAssignmentResource",
        project_id="string",
        roles=["string"],
        username="string")
    
    const cloudUserProjectAssignmentResource = new mongodbatlas.CloudUserProjectAssignment("cloudUserProjectAssignmentResource", {
        projectId: "string",
        roles: ["string"],
        username: "string",
    });
    
    type: mongodbatlas:CloudUserProjectAssignment
    properties:
        projectId: string
        roles:
            - string
        username: string
    

    CloudUserProjectAssignment 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 CloudUserProjectAssignment resource accepts the following input properties:

    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    Roles List<string>
    One or more project-level roles to assign the MongoDB Cloud user.
    Username string
    Email address that represents the username of the MongoDB Cloud user.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    Roles []string
    One or more project-level roles to assign the MongoDB Cloud user.
    Username string
    Email address that represents the username of the MongoDB Cloud user.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles List<String>
    One or more project-level roles to assign the MongoDB Cloud user.
    username String
    Email address that represents the username of the MongoDB Cloud user.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles string[]
    One or more project-level roles to assign the MongoDB Cloud user.
    username string
    Email address that represents the username of the MongoDB Cloud user.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles Sequence[str]
    One or more project-level roles to assign the MongoDB Cloud user.
    username str
    Email address that represents the username of the MongoDB Cloud user.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles List<String>
    One or more project-level roles to assign the MongoDB Cloud user.
    username String
    Email address that represents the username of the MongoDB Cloud user.

    Outputs

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

    Country string
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    CreatedAt string
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    FirstName string
    First or given name that belongs to the MongoDB Cloud user.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvitationCreatedAt string
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InvitationExpiresAt string
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InviterUsername string
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    LastAuth string
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    LastName string
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    MobileNumber string
    Mobile phone number that belongs to the MongoDB Cloud user.
    OrgMembershipStatus string
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    UserId string
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    Country string
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    CreatedAt string
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    FirstName string
    First or given name that belongs to the MongoDB Cloud user.
    Id string
    The provider-assigned unique ID for this managed resource.
    InvitationCreatedAt string
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InvitationExpiresAt string
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InviterUsername string
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    LastAuth string
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    LastName string
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    MobileNumber string
    Mobile phone number that belongs to the MongoDB Cloud user.
    OrgMembershipStatus string
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    UserId string
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    country String
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    createdAt String
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    firstName String
    First or given name that belongs to the MongoDB Cloud user.
    id String
    The provider-assigned unique ID for this managed resource.
    invitationCreatedAt String
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitationExpiresAt String
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviterUsername String
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    lastAuth String
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    lastName String
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobileNumber String
    Mobile phone number that belongs to the MongoDB Cloud user.
    orgMembershipStatus String
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    userId String
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    country string
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    createdAt string
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    firstName string
    First or given name that belongs to the MongoDB Cloud user.
    id string
    The provider-assigned unique ID for this managed resource.
    invitationCreatedAt string
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitationExpiresAt string
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviterUsername string
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    lastAuth string
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    lastName string
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobileNumber string
    Mobile phone number that belongs to the MongoDB Cloud user.
    orgMembershipStatus string
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    userId string
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    country str
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    created_at str
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    first_name str
    First or given name that belongs to the MongoDB Cloud user.
    id str
    The provider-assigned unique ID for this managed resource.
    invitation_created_at str
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitation_expires_at str
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviter_username str
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    last_auth str
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    last_name str
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobile_number str
    Mobile phone number that belongs to the MongoDB Cloud user.
    org_membership_status str
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    user_id str
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    country String
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    createdAt String
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    firstName String
    First or given name that belongs to the MongoDB Cloud user.
    id String
    The provider-assigned unique ID for this managed resource.
    invitationCreatedAt String
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitationExpiresAt String
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviterUsername String
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    lastAuth String
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    lastName String
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobileNumber String
    Mobile phone number that belongs to the MongoDB Cloud user.
    orgMembershipStatus String
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    userId String
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.

    Look up Existing CloudUserProjectAssignment Resource

    Get an existing CloudUserProjectAssignment 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?: CloudUserProjectAssignmentState, opts?: CustomResourceOptions): CloudUserProjectAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            country: Optional[str] = None,
            created_at: Optional[str] = None,
            first_name: Optional[str] = None,
            invitation_created_at: Optional[str] = None,
            invitation_expires_at: Optional[str] = None,
            inviter_username: Optional[str] = None,
            last_auth: Optional[str] = None,
            last_name: Optional[str] = None,
            mobile_number: Optional[str] = None,
            org_membership_status: Optional[str] = None,
            project_id: Optional[str] = None,
            roles: Optional[Sequence[str]] = None,
            user_id: Optional[str] = None,
            username: Optional[str] = None) -> CloudUserProjectAssignment
    func GetCloudUserProjectAssignment(ctx *Context, name string, id IDInput, state *CloudUserProjectAssignmentState, opts ...ResourceOption) (*CloudUserProjectAssignment, error)
    public static CloudUserProjectAssignment Get(string name, Input<string> id, CloudUserProjectAssignmentState? state, CustomResourceOptions? opts = null)
    public static CloudUserProjectAssignment get(String name, Output<String> id, CloudUserProjectAssignmentState state, CustomResourceOptions options)
    resources:  _:    type: mongodbatlas:CloudUserProjectAssignment    get:      id: ${id}
    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:
    Country string
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    CreatedAt string
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    FirstName string
    First or given name that belongs to the MongoDB Cloud user.
    InvitationCreatedAt string
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InvitationExpiresAt string
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InviterUsername string
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    LastAuth string
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    LastName string
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    MobileNumber string
    Mobile phone number that belongs to the MongoDB Cloud user.
    OrgMembershipStatus string
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    Roles List<string>
    One or more project-level roles to assign the MongoDB Cloud user.
    UserId string
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    Username string
    Email address that represents the username of the MongoDB Cloud user.
    Country string
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    CreatedAt string
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    FirstName string
    First or given name that belongs to the MongoDB Cloud user.
    InvitationCreatedAt string
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InvitationExpiresAt string
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    InviterUsername string
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    LastAuth string
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    LastName string
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    MobileNumber string
    Mobile phone number that belongs to the MongoDB Cloud user.
    OrgMembershipStatus string
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    Roles []string
    One or more project-level roles to assign the MongoDB Cloud user.
    UserId string
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    Username string
    Email address that represents the username of the MongoDB Cloud user.
    country String
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    createdAt String
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    firstName String
    First or given name that belongs to the MongoDB Cloud user.
    invitationCreatedAt String
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitationExpiresAt String
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviterUsername String
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    lastAuth String
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    lastName String
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobileNumber String
    Mobile phone number that belongs to the MongoDB Cloud user.
    orgMembershipStatus String
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles List<String>
    One or more project-level roles to assign the MongoDB Cloud user.
    userId String
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    username String
    Email address that represents the username of the MongoDB Cloud user.
    country string
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    createdAt string
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    firstName string
    First or given name that belongs to the MongoDB Cloud user.
    invitationCreatedAt string
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitationExpiresAt string
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviterUsername string
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    lastAuth string
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    lastName string
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobileNumber string
    Mobile phone number that belongs to the MongoDB Cloud user.
    orgMembershipStatus string
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles string[]
    One or more project-level roles to assign the MongoDB Cloud user.
    userId string
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    username string
    Email address that represents the username of the MongoDB Cloud user.
    country str
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    created_at str
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    first_name str
    First or given name that belongs to the MongoDB Cloud user.
    invitation_created_at str
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitation_expires_at str
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviter_username str
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    last_auth str
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    last_name str
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobile_number str
    Mobile phone number that belongs to the MongoDB Cloud user.
    org_membership_status str
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles Sequence[str]
    One or more project-level roles to assign the MongoDB Cloud user.
    user_id str
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    username str
    Email address that represents the username of the MongoDB Cloud user.
    country String
    Two-character alphabetical string that identifies the MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
    createdAt String
    Date and time when MongoDB Cloud created the current account. This value is in the ISO 8601 timestamp format in UTC.
    firstName String
    First or given name that belongs to the MongoDB Cloud user.
    invitationCreatedAt String
    Date and time when MongoDB Cloud sent the invitation. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    invitationExpiresAt String
    Date and time when the invitation from MongoDB Cloud expires. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.
    inviterUsername String
    Username of the MongoDB Cloud user who sent the invitation to join the organization.
    lastAuth String
    Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
    lastName String
    Last name, family name, or surname that belongs to the MongoDB Cloud user.
    mobileNumber String
    Mobile phone number that belongs to the MongoDB Cloud user.
    orgMembershipStatus String
    String enum that indicates whether the MongoDB Cloud user has a pending invitation to join the organization or they are already active in the organization.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.
    roles List<String>
    One or more project-level roles to assign the MongoDB Cloud user.
    userId String
    Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user.
    username String
    Email address that represents the username of the MongoDB Cloud user.

    Import

    Cloud User Project Assignment resource can be imported using the Project ID & Username OR Project ID & User ID, in the format PROJECT_ID/USERNAME OR PROJECT_ID/USER_ID.

    $ pulumi import mongodbatlas:index/cloudUserProjectAssignment:CloudUserProjectAssignment test 9f3a7c2e54b8d1a0e6f4b3c2/test-user@example.com
    

    OR

    $ pulumi import mongodbatlas:index/cloudUserProjectAssignment:CloudUserProjectAssignment test 9f3a7c2e54b8d1a0e6f4b3c2/5f18367ccb7a503a2b481b7a
    

    For more information, see: MongoDB Atlas API - Cloud Users Documentation.

    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 v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate