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 for business
    • 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
    • Center for Technologies and Society
    • 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_postgresql_cluster
          • mdb_postgresql_database
          • mdb_postgresql_user

In this article:

  • Example usage
  • Schema
  • Required
  • Optional
  • Read-Only
  • Nested Schema for extension
  1. Terraform reference
  2. Resources
  3. Managed Service for PostgreSQL
  4. Data Sources
  5. mdb_postgresql_database

yandex_mdb_postgresql_database (Data Source)

Written by
Yandex Cloud
Updated at August 7, 2025
  • Example usage
  • Schema
    • Required
    • Optional
    • Read-Only
    • Nested Schema for extension

Get information about a Yandex Managed PostgreSQL database. For more information, see the official documentation.

Example usageExample usage

//
// Get information about existing MDB PostgreSQL Database.
//
data "yandex_mdb_postgresql_database" "foo" {
  cluster_id = "some_cluster_id"
  name       = "test"
}

output "owner" {
  value = data.yandex_mdb_postgresql_database.foo.owner
}

SchemaSchema

RequiredRequired

  • cluster_id (String) The ID of the PostgreSQL cluster.
  • name (String) The resource name.

OptionalOptional

  • deletion_protection (String) The true value means that resource is protected from accidental deletion.
  • extension (Block Set) Set of database extensions. (see below for nested schema)
  • lc_collate (String) POSIX locale for string sorting order. Forbidden to change in an existing database.
  • lc_type (String) POSIX locale for character classification. Forbidden to change in an existing database.
  • owner (String) Name of the user assigned as the owner of the database. Forbidden to change in an existing database.
  • template_db (String) Name of the template database.

Read-OnlyRead-Only

  • id (String) The ID of this resource.

Nested Schema for Nested Schema for extension

Required:

  • name (String) Name of the database extension. For more information on available extensions see the official documentation. Name of the database extension. For more information on available extensions see the official documentation.

Was the article helpful?

Previous
mdb_postgresql_cluster
Next
mdb_postgresql_user
© 2025 Direct Cursus Technology L.L.C.