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_database

yandex_mdb_mongodb_database (DataSource)

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

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

Example usageExample usage

//
// Get information about existing MDB MongoDB Database.
//
data "yandex_mdb_mongodb_database" "my_db" {
  cluster_id = "some_cluster_id"
  name       = "test"
}

output "owner" {
  value = data.yandex_mdb_mongodb_database.my_db.name
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • cluster_id (Required)(String). The ID of MongoDB Cluster.
  • deletion_protection (Read-Only) (Bool). Inhibits deletion of the database.
  • id (Read-Only) (String). The resource identifier.
  • name (Required)(String). The name of the database.
  • 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.

Was the article helpful?

Previous
mdb_mongodb_cluster
Next
mdb_mongodb_user
© 2026 Direct Cursus Technology L.L.C.