Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • mdb_mongodb_cluster
          • mdb_mongodb_database
          • mdb_mongodb_user

In this article:

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

yandex_mdb_mongodb_user (Data Source)

Written by
Yandex Cloud
Updated at August 7, 2025
  • Example usage
  • Argument Reference
  • Attributes Reference

Get information about a Yandex Managed MongoDB user. 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
}

Argument ReferenceArgument Reference

The following arguments are supported:

  • cluster_id - (Required) The ID of the MongoDB cluster.

  • name - (Required) The name of the MongoDB user.

Attributes ReferenceAttributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • password - The password of the user.
  • permission - Set of permissions granted to the user. The structure is documented below.

The permission block supports:

  • database_name - The name of the database that the permission grants access to.
  • roles - List of strings. 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_cluster
© 2025 Direct Cursus Technology L.L.C.