DatabaseUser
Create a DatabaseUser Resource
new DatabaseUser(name: string, args: DatabaseUserArgs, opts?: CustomResourceOptions);def DatabaseUser(resource_name, opts=None, auth_database_name=None, database_name=None, labels=None, password=None, project_id=None, roles=None, username=None, x509_type=None, __props__=None);func NewDatabaseUser(ctx *Context, name string, args DatabaseUserArgs, opts ...ResourceOption) (*DatabaseUser, error)public DatabaseUser(string name, DatabaseUserArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DatabaseUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabaseUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
DatabaseUser Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DatabaseUser resource accepts the following input properties:
- Project
Id string The unique ID for the project to create the database user.
- Username string
Username for authenticating to MongoDB.
- Auth
Database 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 always the admin database.
- Database
Name string Database on which the user has the specified role. A role on the
admindatabase can include privileges that apply to the other databases.- Labels
List<Database
User Label Args> - Password string
- Roles
List<Database
User Role Args> 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.
- X509Type string
X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
- Project
Id string The unique ID for the project to create the database user.
- Username string
Username for authenticating to MongoDB.
- Auth
Database 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 always the admin database.
- Database
Name string Database on which the user has the specified role. A role on the
admindatabase can include privileges that apply to the other databases.- Labels
[]Database
User Label - Password string
- Roles
[]Database
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.
- X509Type string
X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
- project
Id string The unique ID for the project to create the database user.
- username string
Username for authenticating to MongoDB.
- auth
Database 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 always the admin database.
- database
Name string Database on which the user has the specified role. A role on the
admindatabase can include privileges that apply to the other databases.- labels
Database
User Label[] - password string
- roles
Database
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.
- x509Type string
X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
- project_
id str The unique ID for the project to create the database user.
- username str
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 always the admin 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.- labels
List[Database
User Label] - password str
- roles
List[Database
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.
- x509_
type str X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseUser resource produces the following output properties:
Look up an Existing DatabaseUser Resource
Get an existing DatabaseUser 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?: DatabaseUserState, opts?: CustomResourceOptions): DatabaseUserstatic get(resource_name, id, opts=None, auth_database_name=None, database_name=None, labels=None, password=None, project_id=None, roles=None, username=None, x509_type=None, __props__=None);func GetDatabaseUser(ctx *Context, name string, id IDInput, state *DatabaseUserState, opts ...ResourceOption) (*DatabaseUser, error)public static DatabaseUser Get(string name, Input<string> id, DatabaseUserState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Auth
Database 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 always the admin database.
- Database
Name string Database on which the user has the specified role. A role on the
admindatabase can include privileges that apply to the other databases.- Labels
List<Database
User Label Args> - Password string
- Project
Id string The unique ID for the project to create the database user.
- Roles
List<Database
User Role Args> 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.
- Username string
Username for authenticating to MongoDB.
- X509Type string
X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
- Auth
Database 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 always the admin database.
- Database
Name string Database on which the user has the specified role. A role on the
admindatabase can include privileges that apply to the other databases.- Labels
[]Database
User Label - Password string
- Project
Id string The unique ID for the project to create the database user.
- Roles
[]Database
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.
- Username string
Username for authenticating to MongoDB.
- X509Type string
X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
- auth
Database 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 always the admin database.
- database
Name string Database on which the user has the specified role. A role on the
admindatabase can include privileges that apply to the other databases.- labels
Database
User Label[] - password string
- project
Id string The unique ID for the project to create the database user.
- roles
Database
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.
- username string
Username for authenticating to MongoDB.
- x509Type string
X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
- 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 always the admin 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.- labels
List[Database
User Label] - password str
- project_
id str The unique ID for the project to create the database user.
- roles
List[Database
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.
- username str
Username for authenticating to MongoDB.
- x509_
type str X.509 method by which the provided username is authenticated. If no value is given, Atlas uses the default value of NONE. The accepted types are:
Supporting Types
DatabaseUserLabel
DatabaseUserRole
- Collection
Name 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).- Database
Name string 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 string Name of the role to grant. See Create a Database User
roles.roleNamefor valid values and restrictions.
- Collection
Name 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).- Database
Name string 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 string Name of the role to grant. See Create a Database User
roles.roleNamefor valid values and restrictions.
- collection
Name 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).- database
Name string 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 string Name of the role to grant. See Create a Database User
roles.roleNamefor valid values and restrictions.
- 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 Name of the role to grant. See Create a Database User
roles.roleNamefor valid values and restrictions.
Package Details
- Repository
- https://github.com/pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.