Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Setting up Yandex Cloud Terraform provider authentication
  • Solution library
    • Overview
    • Release notes
          • mdb_mongodb_backup_retention_policy
          • mdb_mongodb_cluster
          • mdb_mongodb_database
          • mdb_mongodb_user

In this article:

  • Example usage
  • Arguments & Attributes Reference
  1. Terraform reference
  2. Resources
  3. Managed Service for MongoDB
  4. Data Sources
  5. mdb_mongodb_user

yandex_mdb_mongodb_user (DataSource)

Written by
Yandex Cloud
Updated at September 23, 2026
View in Markdown
  • Example usage
  • Arguments & Attributes Reference

Manages a MongoDB user within the Yandex Cloud. For more information, see the official documentation.

Example usageExample usage

//
// Get information about existing MDB MongoDB User.
//
data "yandex_mdb_mongodb_user" "my_user" {
  cluster_id = "some_cluster_id"
  name       = "test"
}

output "permission" {
  value = data.yandex_mdb_mongodb_user.my_user.permission
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • auth_type (Read-Only) (String). The authentication type of the user. Either PASSWORD or IAM.
  • cluster_id (Required)(String). The ID of the cluster to which user belongs to.
  • deletion_protection (Read-Only) (Bool). Inhibits deletion of the user.
  • id (Read-Only) (String). The resource identifier.
  • name (Required)(String). The name of the user.
  • password (Read-Only) (String). The password of the user.
  • timeouts [Block].
    • create (String). A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    • delete (String). A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    • update (String). A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
  • permission [Block]. Set of permissions granted to the user.
    • database_name (Required)(String). The name of the database that the permission grants access to.
    • roles (Set Of String). The roles of the user in this database. For more information see the official documentation.

Was the article helpful?

Previous
mdb_mongodb_database
Next
mdb_mongodb_backup_retention_policy
© 2026 Direct Cursus Technology L.L.C.