You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Adds description field to mongodbatlas_database_user (#3280)
* feat: Adds description field to `mongodbatlas_database_user`
* test: Adds description test for database user
* test: Update unit tests
* refactor: Support not sending empty description on create
* update tests
* feat: Adds description field to data sources for `mongodbatlas_database_user`
* chore: Add changelog entry
* doc: Document new description field
* refactor: rename `TfDatabaseUserModel` variables
* rename to local diags
* move importID split to ImportState function
* fix: only switch back to state value when response is empty and state is null
Copy file name to clipboardExpand all lines: docs/data-sources/database_user.md
+1
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ Note: OIDC support is only avalible starting in [MongoDB 7.0](https://www.mongod
75
75
In addition to all arguments above, the following attributes are exported:
76
76
77
77
*`id` - Autogenerated Unique ID for this data source.
78
+
*`description` - Description of this database user.
78
79
*`roles` - 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](#roles) below for more details.
79
80
*`x509_type` - X.509 method by which the provided username is authenticated.
80
81
*`aws_iam_type` - The new database user authenticates with AWS IAM credentials. Default is `NONE`, `USER` means user has AWS IAM user credentials, `ROLE` - means user has credentials associated with an AWS IAM role.
Copy file name to clipboardExpand all lines: docs/data-sources/database_users.md
+1
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,7 @@ In addition to all arguments above, the following attributes are exported:
77
77
78
78
*`project_id` - ID of the Atlas project the user belongs to.
79
79
*`username` - Username for authenticating to MongoDB.
80
+
*`description` - Description of this database user.
80
81
*`roles` - 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](#roles) below for more details.
81
82
*`auth_database_name` - (Required) Database against which Atlas authenticates the user. A user must provide both a username and authentication database to log into MongoDB.
Copy file name to clipboardExpand all lines: docs/resources/database_user.md
+1
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,7 @@ Accepted values include:
125
125
*`roles` - (Required) 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](#roles) below for more details.
126
126
*`username` - (Required) Username for authenticating to MongoDB. USER_ARN or ROLE_ARN if `aws_iam_type` is USER or ROLE.
127
127
*`password` - (Required) User's initial password. A value is required to create the database user, however the argument may be removed from your Terraform configuration after user creation without impacting the user, password or Terraform management. If you do change management of the password to outside of Terraform it is advised to remove the argument from the Terraform configuration. IMPORTANT --- Passwords may show up in Terraform related logs and it will be stored in the Terraform state file as plain-text. Password can be changed after creation using your preferred method, e.g. via the MongoDB Atlas UI, to ensure security.
128
+
*`description` - (Optional) Description of this database user.
128
129
129
130
*`x509_type` - (Optional) 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:
130
131
*`NONE` - The user does not use X.509 authentication.
// description is an optional attribute (i.e. null by default), if it is removed from the config during an update
54
+
// (i.e. user wants to remove the existing description from the database user), we send an empty string ("") as the value in API request for update (dumping null is not supported in the SDK)
0 commit comments