mongodbatlas.getDatabaseUser
Explore with Pulumi AI
# Data Source: mongodbatlas.DatabaseUser
mongodbatlas.DatabaseUser describes a Database User. This represents a database user which will be applied to all clusters within the project.
Each user has a set of roles that provide access to the project’s databases. User’s roles apply to all the clusters in the project: if two clusters have a products database and a user has a role granting read access on the products database, the user has that access on both clusters.
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 testDatabaseUser = new mongodbatlas.DatabaseUser("test", {
    username: "test-acc-username",
    password: "test-acc-password",
    projectId: "<PROJECT-ID>",
    authDatabaseName: "admin",
    roles: [
        {
            roleName: "readWrite",
            databaseName: "admin",
        },
        {
            roleName: "atlasAdmin",
            databaseName: "admin",
        },
    ],
    labels: [
        {
            key: "key 1",
            value: "value 1",
        },
        {
            key: "key 2",
            value: "value 2",
        },
    ],
});
const test = mongodbatlas.getDatabaseUserOutput({
    projectId: testDatabaseUser.projectId,
    username: testDatabaseUser.username,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_database_user = mongodbatlas.DatabaseUser("test",
    username="test-acc-username",
    password="test-acc-password",
    project_id="<PROJECT-ID>",
    auth_database_name="admin",
    roles=[
        {
            "role_name": "readWrite",
            "database_name": "admin",
        },
        {
            "role_name": "atlasAdmin",
            "database_name": "admin",
        },
    ],
    labels=[
        {
            "key": "key 1",
            "value": "value 1",
        },
        {
            "key": "key 2",
            "value": "value 2",
        },
    ])
test = mongodbatlas.get_database_user_output(project_id=test_database_user.project_id,
    username=test_database_user.username)
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 {
		testDatabaseUser, err := mongodbatlas.NewDatabaseUser(ctx, "test", &mongodbatlas.DatabaseUserArgs{
			Username:         pulumi.String("test-acc-username"),
			Password:         pulumi.String("test-acc-password"),
			ProjectId:        pulumi.String("<PROJECT-ID>"),
			AuthDatabaseName: pulumi.String("admin"),
			Roles: mongodbatlas.DatabaseUserRoleArray{
				&mongodbatlas.DatabaseUserRoleArgs{
					RoleName:     pulumi.String("readWrite"),
					DatabaseName: pulumi.String("admin"),
				},
				&mongodbatlas.DatabaseUserRoleArgs{
					RoleName:     pulumi.String("atlasAdmin"),
					DatabaseName: pulumi.String("admin"),
				},
			},
			Labels: mongodbatlas.DatabaseUserLabelArray{
				&mongodbatlas.DatabaseUserLabelArgs{
					Key:   pulumi.String("key 1"),
					Value: pulumi.String("value 1"),
				},
				&mongodbatlas.DatabaseUserLabelArgs{
					Key:   pulumi.String("key 2"),
					Value: pulumi.String("value 2"),
				},
			},
		})
		if err != nil {
			return err
		}
		_ = mongodbatlas.LookupDatabaseUserOutput(ctx, mongodbatlas.GetDatabaseUserOutputArgs{
			ProjectId: testDatabaseUser.ProjectId,
			Username:  testDatabaseUser.Username,
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() => 
{
    var testDatabaseUser = new Mongodbatlas.DatabaseUser("test", new()
    {
        Username = "test-acc-username",
        Password = "test-acc-password",
        ProjectId = "<PROJECT-ID>",
        AuthDatabaseName = "admin",
        Roles = new[]
        {
            new Mongodbatlas.Inputs.DatabaseUserRoleArgs
            {
                RoleName = "readWrite",
                DatabaseName = "admin",
            },
            new Mongodbatlas.Inputs.DatabaseUserRoleArgs
            {
                RoleName = "atlasAdmin",
                DatabaseName = "admin",
            },
        },
        Labels = new[]
        {
            new Mongodbatlas.Inputs.DatabaseUserLabelArgs
            {
                Key = "key 1",
                Value = "value 1",
            },
            new Mongodbatlas.Inputs.DatabaseUserLabelArgs
            {
                Key = "key 2",
                Value = "value 2",
            },
        },
    });
    var test = Mongodbatlas.GetDatabaseUser.Invoke(new()
    {
        ProjectId = testDatabaseUser.ProjectId,
        Username = testDatabaseUser.Username,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.DatabaseUser;
import com.pulumi.mongodbatlas.DatabaseUserArgs;
import com.pulumi.mongodbatlas.inputs.DatabaseUserRoleArgs;
import com.pulumi.mongodbatlas.inputs.DatabaseUserLabelArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetDatabaseUserArgs;
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 testDatabaseUser = new DatabaseUser("testDatabaseUser", DatabaseUserArgs.builder()
            .username("test-acc-username")
            .password("test-acc-password")
            .projectId("<PROJECT-ID>")
            .authDatabaseName("admin")
            .roles(            
                DatabaseUserRoleArgs.builder()
                    .roleName("readWrite")
                    .databaseName("admin")
                    .build(),
                DatabaseUserRoleArgs.builder()
                    .roleName("atlasAdmin")
                    .databaseName("admin")
                    .build())
            .labels(            
                DatabaseUserLabelArgs.builder()
                    .key("key 1")
                    .value("value 1")
                    .build(),
                DatabaseUserLabelArgs.builder()
                    .key("key 2")
                    .value("value 2")
                    .build())
            .build());
        final var test = MongodbatlasFunctions.getDatabaseUser(GetDatabaseUserArgs.builder()
            .projectId(testDatabaseUser.projectId())
            .username(testDatabaseUser.username())
            .build());
    }
}
resources:
  testDatabaseUser:
    type: mongodbatlas:DatabaseUser
    name: test
    properties:
      username: test-acc-username
      password: test-acc-password
      projectId: <PROJECT-ID>
      authDatabaseName: admin
      roles:
        - roleName: readWrite
          databaseName: admin
        - roleName: atlasAdmin
          databaseName: admin
      labels:
        - key: key 1
          value: value 1
        - key: key 2
          value: value 2
variables:
  test:
    fn::invoke:
      function: mongodbatlas:getDatabaseUser
      arguments:
        projectId: ${testDatabaseUser.projectId}
        username: ${testDatabaseUser.username}
Example of usage with a OIDC federated authentication user
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testDatabaseUser = new mongodbatlas.DatabaseUser("test", {
    username: "64d613677e1ad50839cce4db/testUserOrGroup",
    projectId: "6414908c207f4d22f4d8f232",
    authDatabaseName: "admin",
    oidcAuthType: "IDP_GROUP",
    roles: [{
        roleName: "readWriteAnyDatabase",
        databaseName: "admin",
    }],
});
const test = mongodbatlas.getDatabaseUserOutput({
    username: testDatabaseUser.username,
    projectId: "6414908c207f4d22f4d8f232",
    authDatabaseName: "admin",
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_database_user = mongodbatlas.DatabaseUser("test",
    username="64d613677e1ad50839cce4db/testUserOrGroup",
    project_id="6414908c207f4d22f4d8f232",
    auth_database_name="admin",
    oidc_auth_type="IDP_GROUP",
    roles=[{
        "role_name": "readWriteAnyDatabase",
        "database_name": "admin",
    }])
test = mongodbatlas.get_database_user_output(username=test_database_user.username,
    project_id="6414908c207f4d22f4d8f232",
    auth_database_name="admin")
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 {
		testDatabaseUser, err := mongodbatlas.NewDatabaseUser(ctx, "test", &mongodbatlas.DatabaseUserArgs{
			Username:         pulumi.String("64d613677e1ad50839cce4db/testUserOrGroup"),
			ProjectId:        pulumi.String("6414908c207f4d22f4d8f232"),
			AuthDatabaseName: pulumi.String("admin"),
			OidcAuthType:     pulumi.String("IDP_GROUP"),
			Roles: mongodbatlas.DatabaseUserRoleArray{
				&mongodbatlas.DatabaseUserRoleArgs{
					RoleName:     pulumi.String("readWriteAnyDatabase"),
					DatabaseName: pulumi.String("admin"),
				},
			},
		})
		if err != nil {
			return err
		}
		_ = mongodbatlas.LookupDatabaseUserOutput(ctx, mongodbatlas.GetDatabaseUserOutputArgs{
			Username:         testDatabaseUser.Username,
			ProjectId:        pulumi.String("6414908c207f4d22f4d8f232"),
			AuthDatabaseName: pulumi.String("admin"),
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() => 
{
    var testDatabaseUser = new Mongodbatlas.DatabaseUser("test", new()
    {
        Username = "64d613677e1ad50839cce4db/testUserOrGroup",
        ProjectId = "6414908c207f4d22f4d8f232",
        AuthDatabaseName = "admin",
        OidcAuthType = "IDP_GROUP",
        Roles = new[]
        {
            new Mongodbatlas.Inputs.DatabaseUserRoleArgs
            {
                RoleName = "readWriteAnyDatabase",
                DatabaseName = "admin",
            },
        },
    });
    var test = Mongodbatlas.GetDatabaseUser.Invoke(new()
    {
        Username = testDatabaseUser.Username,
        ProjectId = "6414908c207f4d22f4d8f232",
        AuthDatabaseName = "admin",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.DatabaseUser;
import com.pulumi.mongodbatlas.DatabaseUserArgs;
import com.pulumi.mongodbatlas.inputs.DatabaseUserRoleArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetDatabaseUserArgs;
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 testDatabaseUser = new DatabaseUser("testDatabaseUser", DatabaseUserArgs.builder()
            .username("64d613677e1ad50839cce4db/testUserOrGroup")
            .projectId("6414908c207f4d22f4d8f232")
            .authDatabaseName("admin")
            .oidcAuthType("IDP_GROUP")
            .roles(DatabaseUserRoleArgs.builder()
                .roleName("readWriteAnyDatabase")
                .databaseName("admin")
                .build())
            .build());
        final var test = MongodbatlasFunctions.getDatabaseUser(GetDatabaseUserArgs.builder()
            .username(testDatabaseUser.username())
            .projectId("6414908c207f4d22f4d8f232")
            .authDatabaseName("admin")
            .build());
    }
}
resources:
  testDatabaseUser:
    type: mongodbatlas:DatabaseUser
    name: test
    properties:
      username: 64d613677e1ad50839cce4db/testUserOrGroup
      projectId: 6414908c207f4d22f4d8f232
      authDatabaseName: admin
      oidcAuthType: IDP_GROUP
      roles:
        - roleName: readWriteAnyDatabase
          databaseName: admin
variables:
  test:
    fn::invoke:
      function: mongodbatlas:getDatabaseUser
      arguments:
        username: ${testDatabaseUser.username}
        projectId: 6414908c207f4d22f4d8f232
        authDatabaseName: admin
Note: OIDC support is only avalible starting in MongoDB 7.0 or later. To learn more, see the MongoDB Atlas documentation.
Using getDatabaseUser
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDatabaseUser(args: GetDatabaseUserArgs, opts?: InvokeOptions): Promise<GetDatabaseUserResult>
function getDatabaseUserOutput(args: GetDatabaseUserOutputArgs, opts?: InvokeOptions): Output<GetDatabaseUserResult>def get_database_user(auth_database_name: Optional[str] = None,
                      project_id: Optional[str] = None,
                      username: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDatabaseUserResult
def get_database_user_output(auth_database_name: Optional[pulumi.Input[str]] = None,
                      project_id: Optional[pulumi.Input[str]] = None,
                      username: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseUserResult]func LookupDatabaseUser(ctx *Context, args *LookupDatabaseUserArgs, opts ...InvokeOption) (*LookupDatabaseUserResult, error)
func LookupDatabaseUserOutput(ctx *Context, args *LookupDatabaseUserOutputArgs, opts ...InvokeOption) LookupDatabaseUserResultOutput> Note: This function is named LookupDatabaseUser in the Go SDK.
public static class GetDatabaseUser 
{
    public static Task<GetDatabaseUserResult> InvokeAsync(GetDatabaseUserArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseUserResult> Invoke(GetDatabaseUserInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabaseUserResult> getDatabaseUser(GetDatabaseUserArgs args, InvokeOptions options)
public static Output<GetDatabaseUserResult> getDatabaseUser(GetDatabaseUserArgs args, InvokeOptions options)
fn::invoke:
  function: mongodbatlas:index/getDatabaseUser:getDatabaseUser
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AuthDatabase stringName 
- The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- ProjectId string
- The unique ID for the project to create the database user.
- Username string
- Username for authenticating to MongoDB.
- AuthDatabase stringName 
- The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- ProjectId string
- The unique ID for the project to create the database user.
- Username string
- Username for authenticating to MongoDB.
- authDatabase StringName 
- The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- projectId String
- The unique ID for the project to create the database user.
- username String
- Username for authenticating to MongoDB.
- authDatabase stringName 
- The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- projectId string
- The unique ID for the project to create the database user.
- username string
- Username for authenticating to MongoDB.
- auth_database_ strname 
- The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- project_id str
- The unique ID for the project to create the database user.
- username str
- Username for authenticating to MongoDB.
- authDatabase StringName 
- The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- projectId String
- The unique ID for the project to create the database user.
- username String
- Username for authenticating to MongoDB.
getDatabaseUser Result
The following output properties are available:
- AuthDatabase stringName 
- AwsIam stringType 
- The new database user authenticates with AWS IAM credentials. Default is NONE,USERmeans user has AWS IAM user credentials,ROLE- means user has credentials associated with an AWS IAM role.
- Id string
- Autogenerated Unique ID for this data source.
- Labels
List<GetDatabase User Label> 
- LdapAuth stringType 
- Method by which the provided username is authenticated. Default is NONE. Other valid values are:USER,GROUP.
- OidcAuth stringType 
- (Optional) Human-readable label that indicates whether the new database user authenticates with OIDC (OpenID Connect) federated authentication. If no value is given, Atlas uses the default value of NONE. The accepted types are:- NONE- The user does not use OIDC federated authentication.
- IDP_GROUP- OIDC Workforce federated authentication group. To learn more about OIDC federated authentication, see Set up Workforce Identity Federation with OIDC.
- USER- OIDC Workload federated authentication user. To learn more about OIDC federated authentication, see Set up Workload Identity Federation with OIDC.
 
- ProjectId string
- Roles
List<GetDatabase User Role> 
- List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- Scopes
List<GetDatabase User Scope> 
- Array of clusters and Atlas Data Lakes that this user has access to.
- Username string
- X509Type string
- X.509 method by which the provided username is authenticated.
- AuthDatabase stringName 
- AwsIam stringType 
- The new database user authenticates with AWS IAM credentials. Default is NONE,USERmeans user has AWS IAM user credentials,ROLE- means user has credentials associated with an AWS IAM role.
- Id string
- Autogenerated Unique ID for this data source.
- Labels
[]GetDatabase User Label 
- LdapAuth stringType 
- Method by which the provided username is authenticated. Default is NONE. Other valid values are:USER,GROUP.
- OidcAuth stringType 
- (Optional) Human-readable label that indicates whether the new database user authenticates with OIDC (OpenID Connect) federated authentication. If no value is given, Atlas uses the default value of NONE. The accepted types are:- NONE- The user does not use OIDC federated authentication.
- IDP_GROUP- OIDC Workforce federated authentication group. To learn more about OIDC federated authentication, see Set up Workforce Identity Federation with OIDC.
- USER- OIDC Workload federated authentication user. To learn more about OIDC federated authentication, see Set up Workload Identity Federation with OIDC.
 
- ProjectId string
- Roles
[]GetDatabase User Role 
- List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- Scopes
[]GetDatabase User Scope 
- Array of clusters and Atlas Data Lakes that this user has access to.
- Username string
- X509Type string
- X.509 method by which the provided username is authenticated.
- authDatabase StringName 
- awsIam StringType 
- The new database user authenticates with AWS IAM credentials. Default is NONE,USERmeans user has AWS IAM user credentials,ROLE- means user has credentials associated with an AWS IAM role.
- id String
- Autogenerated Unique ID for this data source.
- labels
List<GetDatabase User Label> 
- ldapAuth StringType 
- Method by which the provided username is authenticated. Default is NONE. Other valid values are:USER,GROUP.
- oidcAuth StringType 
- (Optional) Human-readable label that indicates whether the new database user authenticates with OIDC (OpenID Connect) federated authentication. If no value is given, Atlas uses the default value of NONE. The accepted types are:- NONE- The user does not use OIDC federated authentication.
- IDP_GROUP- OIDC Workforce federated authentication group. To learn more about OIDC federated authentication, see Set up Workforce Identity Federation with OIDC.
- USER- OIDC Workload federated authentication user. To learn more about OIDC federated authentication, see Set up Workload Identity Federation with OIDC.
 
- projectId String
- roles
List<GetDatabase User Role> 
- List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- scopes
List<GetDatabase User Scope> 
- Array of clusters and Atlas Data Lakes that this user has access to.
- username String
- x509Type String
- X.509 method by which the provided username is authenticated.
- authDatabase stringName 
- awsIam stringType 
- The new database user authenticates with AWS IAM credentials. Default is NONE,USERmeans user has AWS IAM user credentials,ROLE- means user has credentials associated with an AWS IAM role.
- id string
- Autogenerated Unique ID for this data source.
- labels
GetDatabase User Label[] 
- ldapAuth stringType 
- Method by which the provided username is authenticated. Default is NONE. Other valid values are:USER,GROUP.
- oidcAuth stringType 
- (Optional) Human-readable label that indicates whether the new database user authenticates with OIDC (OpenID Connect) federated authentication. If no value is given, Atlas uses the default value of NONE. The accepted types are:- NONE- The user does not use OIDC federated authentication.
- IDP_GROUP- OIDC Workforce federated authentication group. To learn more about OIDC federated authentication, see Set up Workforce Identity Federation with OIDC.
- USER- OIDC Workload federated authentication user. To learn more about OIDC federated authentication, see Set up Workload Identity Federation with OIDC.
 
- projectId string
- roles
GetDatabase User Role[] 
- List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- scopes
GetDatabase User Scope[] 
- Array of clusters and Atlas Data Lakes that this user has access to.
- username string
- x509Type string
- X.509 method by which the provided username is authenticated.
- auth_database_ strname 
- aws_iam_ strtype 
- The new database user authenticates with AWS IAM credentials. Default is NONE,USERmeans user has AWS IAM user credentials,ROLE- means user has credentials associated with an AWS IAM role.
- id str
- Autogenerated Unique ID for this data source.
- labels
Sequence[GetDatabase User Label] 
- ldap_auth_ strtype 
- Method by which the provided username is authenticated. Default is NONE. Other valid values are:USER,GROUP.
- oidc_auth_ strtype 
- (Optional) Human-readable label that indicates whether the new database user authenticates with OIDC (OpenID Connect) federated authentication. If no value is given, Atlas uses the default value of NONE. The accepted types are:- NONE- The user does not use OIDC federated authentication.
- IDP_GROUP- OIDC Workforce federated authentication group. To learn more about OIDC federated authentication, see Set up Workforce Identity Federation with OIDC.
- USER- OIDC Workload federated authentication user. To learn more about OIDC federated authentication, see Set up Workload Identity Federation with OIDC.
 
- project_id str
- roles
Sequence[GetDatabase User Role] 
- List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- scopes
Sequence[GetDatabase User Scope] 
- Array of clusters and Atlas Data Lakes that this user has access to.
- username str
- x509_type str
- X.509 method by which the provided username is authenticated.
- authDatabase StringName 
- awsIam StringType 
- The new database user authenticates with AWS IAM credentials. Default is NONE,USERmeans user has AWS IAM user credentials,ROLE- means user has credentials associated with an AWS IAM role.
- id String
- Autogenerated Unique ID for this data source.
- labels List<Property Map>
- ldapAuth StringType 
- Method by which the provided username is authenticated. Default is NONE. Other valid values are:USER,GROUP.
- oidcAuth StringType 
- (Optional) Human-readable label that indicates whether the new database user authenticates with OIDC (OpenID Connect) federated authentication. If no value is given, Atlas uses the default value of NONE. The accepted types are:- NONE- The user does not use OIDC federated authentication.
- IDP_GROUP- OIDC Workforce federated authentication group. To learn more about OIDC federated authentication, see Set up Workforce Identity Federation with OIDC.
- USER- OIDC Workload federated authentication user. To learn more about OIDC federated authentication, see Set up Workload Identity Federation with OIDC.
 
- projectId String
- roles List<Property Map>
- List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- scopes List<Property Map>
- Array of clusters and Atlas Data Lakes that this user has access to.
- username String
- x509Type String
- X.509 method by which the provided username is authenticated.
Supporting Types
GetDatabaseUserLabel   
GetDatabaseUserRole   
- CollectionName string
- Collection for which the role applies. You can specify a collection for the readandreadWriteroles. If you do not specify a collection forreadandreadWrite, the role applies to all collections in the database (excluding some collections in thesystem. database).
- DatabaseName string
- Database on which the user has the specified role. A role on the admindatabase can include privileges that apply to the other databases.
- RoleName string
- CollectionName string
- Collection for which the role applies. You can specify a collection for the readandreadWriteroles. If you do not specify a collection forreadandreadWrite, the role applies to all collections in the database (excluding some collections in thesystem. database).
- DatabaseName string
- Database on which the user has the specified role. A role on the admindatabase can include privileges that apply to the other databases.
- RoleName string
- collectionName String
- Collection for which the role applies. You can specify a collection for the readandreadWriteroles. If you do not specify a collection forreadandreadWrite, the role applies to all collections in the database (excluding some collections in thesystem. database).
- databaseName String
- Database on which the user has the specified role. A role on the admindatabase can include privileges that apply to the other databases.
- roleName String
- collectionName string
- Collection for which the role applies. You can specify a collection for the readandreadWriteroles. If you do not specify a collection forreadandreadWrite, the role applies to all collections in the database (excluding some collections in thesystem. database).
- databaseName string
- Database on which the user has the specified role. A role on the admindatabase can include privileges that apply to the other databases.
- roleName string
- collection_name str
- Collection for which the role applies. You can specify a collection for the readandreadWriteroles. If you do not specify a collection forreadandreadWrite, the role applies to all collections in the database (excluding some collections in thesystem. database).
- database_name str
- Database on which the user has the specified role. A role on the admindatabase can include privileges that apply to the other databases.
- role_name str
- collectionName String
- Collection for which the role applies. You can specify a collection for the readandreadWriteroles. If you do not specify a collection forreadandreadWrite, the role applies to all collections in the database (excluding some collections in thesystem. database).
- databaseName String
- Database on which the user has the specified role. A role on the admindatabase can include privileges that apply to the other databases.
- roleName String
GetDatabaseUserScope   
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the mongodbatlasTerraform Provider.