yandex_mdb_clickhouse_database (Data Source)
Written by
Updated at September 11, 2025
Get information about a Yandex Managed ClickHouse database.
Example usage
data "yandex_mdb_clickhouse_database" "foo" {
cluster_id = "some_cluster_id"
name = "dbname"
}
output "dbname" {
value = data.yandex_mdb_clickhouse_database.foo.id
}
Schema
Required
cluster_id(String) ID of the ClickHouse cluster. Provided by the client when the database is created.name(String) The name of the database.
Optional
timeouts(Attributes) (see below for nested schema)
Read-Only
id(String) The resource identifier.
Nested Schema for timeouts
Optional:
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.
Import
The resource can be imported by using their resource ID. For getting the resource ID you can use Yandex Cloud Web Console
# terraform import yandex_mdb_clickhouse_database.<resource Name> <resource Id>
terraform import yandex_mdb_clickhouse_database.my_db1 cluster_id:my_dbname