Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Terraform в Yandex Cloud
  • Начало работы
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • mdb_mysql_cluster
          • mdb_mysql_database
          • mdb_mysql_user

В этой статье:

  • Example usage
  • Schema
  • Optional
  • Read-Only
  • Nested Schema for access
  • Nested Schema for backup_window_start
  • Nested Schema for database
  • Nested Schema for disk_size_autoscaling
  • Nested Schema for host
  • Nested Schema for maintenance_window
  • Nested Schema for performance_diagnostics
  • Nested Schema for resources
  • Nested Schema for user
  • Nested Schema for user.connection_limits
  • Nested Schema for user.permission
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Managed Service for MySQL
  4. Data Sources
  5. mdb_mysql_cluster

yandex_mdb_mysql_cluster (Data Source)

Статья создана
Yandex Cloud
Обновлена 17 ноября 2025 г.
  • Example usage
  • Schema
    • Optional
    • Read-Only
    • Nested Schema for access
    • Nested Schema for backup_window_start
    • Nested Schema for database
    • Nested Schema for disk_size_autoscaling
    • Nested Schema for host
    • Nested Schema for maintenance_window
    • Nested Schema for performance_diagnostics
    • Nested Schema for resources
    • Nested Schema for user
    • Nested Schema for user.connection_limits
    • Nested Schema for user.permission

Get information about a Yandex Managed MySQL cluster. For more information, see the official documentation.

Важно

Either cluster_id or name should be specified.

Example usageExample usage

//
// Get information about existing MDB MySQL Cluster.
//
data "yandex_mdb_mysql_cluster" "my_cluster" {
  name = "test"
}

output "network_id" {
  value = data.yandex_mdb_mysql_cluster.my_cluster.network_id
}

SchemaSchema

OptionalOptional

  • access (Block List, Max: 1) Access policy to the MySQL cluster. (see below for nested schema)
  • cluster_id (String) The ID of the MySQL cluster.
  • deletion_protection (Boolean) The true value means that resource is protected from accidental deletion.
  • description (String) The resource description.
  • disk_encryption_key_id (String) ID of the KMS key for cluster disk encryption. Restoring without an encryption key will disable encryption if any exists.
  • folder_id (String) The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • labels (Map of String) A set of key/value label pairs which assigned to resource.
  • mysql_config (Map of String) MySQL cluster config block.
  • name (String) The resource name.

Read-OnlyRead-Only

  • backup_retain_period_days (Number) The period in days during which backups are stored.
  • backup_window_start (List of Object) Time to start the daily backup, in the UTC. (see below for nested schema)
  • created_at (String) The creation timestamp of the resource.
  • database (Set of Object) To manage databases, please switch to using a separate resource type yandex_mdb_mysql_databases. (see below for nested schema)
  • disk_size_autoscaling (List of Object) Cluster disk size autoscaling settings. (see below for nested schema)
  • environment (String) Deployment environment of the MySQL cluster.
  • health (String) Aggregated health of the cluster.
  • host (List of Object) A host of the MySQL cluster. (see below for nested schema)
  • host_group_ids (Set of String) A list of host group IDs to place VMs of the cluster on.
  • id (String) The ID of this resource.
  • maintenance_window (List of Object) Maintenance policy of the MySQL cluster. (see below for nested schema)
  • network_id (String) The VPC Network ID of subnets which resource attached to.
  • performance_diagnostics (List of Object) Cluster performance diagnostics settings. YC Documentation. (see below for nested schema)
  • resources (List of Object) Resources allocated to hosts of the MySQL cluster. (see below for nested schema)
  • security_group_ids (Set of String) The list of security groups applied to resource or their components.
  • status (String) Status of the cluster.
  • user (List of Object) To manage users, please switch to using a separate resource type yandex_mdb_mysql_user. (see below for nested schema)
  • version (String) Version of the MySQL cluster. (allowed versions are: 5.7, 8.0, 8.4).

Nested Schema for Nested Schema for access

Optional:

  • data_lens (Boolean) Allow access for Yandex DataLens. Allow access for Yandex DataLens.

  • data_transfer (Boolean) Allow access for DataTransfer. Allow access for DataTransfer.

  • web_sql (Boolean) Allows access for SQL queries in the management console. Allows access for SQL queries in the management console.

Nested Schema for Nested Schema for backup_window_start

Read-Only:

  • hours (Number) The hour at which backup will be started (UTC).

  • minutes (Number) The minute at which backup will be started (UTC).

Nested Schema for Nested Schema for database

Read-Only:

  • name (String) The name of the database.

Nested Schema for Nested Schema for disk_size_autoscaling

Read-Only:

  • disk_size_limit (Number) Limit of disk size after autoscaling (GiB).

  • emergency_usage_threshold (Number) Immediate autoscaling disk usage (percent).

  • planned_usage_threshold (Number) Maintenance window autoscaling disk usage (percent).

Nested Schema for Nested Schema for host

Read-Only:

  • assign_public_ip (Boolean) Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.

  • backup_priority (Number) Host backup priority. Value is between 0 and 100, default is 0.

  • fqdn (String) The fully qualified domain name of the host.

  • priority (Number) Host master promotion priority. Value is between 0 and 100, default is 0.

  • replication_source (String) Host replication source (fqdn), when replication_source is empty then host is in HA group.

  • subnet_id (String) The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.

  • zone (String) The availability zone where resource is located. If it is not provided, the default provider zone will be used.

Nested Schema for Nested Schema for maintenance_window

Read-Only:

  • day (String) Day of the week (in DDD format). Allowed values: MON, TUE, WED, THU, FRI, SAT, SUN

  • hour (Number) Hour of the day in UTC (in HH format). Allowed value is between 1 and 24.

  • type (String) Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.

Nested Schema for Nested Schema for performance_diagnostics

Read-Only:

  • enabled (Boolean) Enable performance diagnostics.

  • sessions_sampling_interval (Number) Interval (in seconds) for my_stat_activity sampling Acceptable values are 1 to 86400, inclusive.

  • statements_sampling_interval (Number) Interval (in seconds) for my_stat_statements sampling Acceptable values are 1 to 86400, inclusive.

Nested Schema for Nested Schema for resources

Read-Only:

  • disk_size (Number) Volume of the storage available to a MySQL host, in gigabytes.

  • disk_type_id (String) Type of the storage of MySQL hosts.

  • resource_preset_id (String) The ID of the preset for computational resources available to a MySQL host (CPU, memory etc.). For more information, see the official documentation.

Nested Schema for Nested Schema for user

Read-Only:

  • authentication_plugin (String) Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD, MYSQL_NO_LOGIN, MDB_IAMPROXY_AUTH (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD, MYSQL_NO_LOGIN, MDB_IAMPROXY_AUTH).

  • connection_limits (Block List, Max: 1) User's connection limits. If not specified there will be no changes. Default value is -1. When these parameters are set to -1, backend default values will be actually used. (see below for nested schema)

  • global_permissions (Set of String) List user's global permissions. Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS, FLUSH_OPTIMIZER_COSTS, SHOW_ROUTINE, MDB_ADMIN for clear list use empty list. If the attribute is not specified there will be no changes.

  • name (String) The name of the user.

  • password (String) The password of the user.

  • permission (Block Set) Set of permissions granted to the user. (see below for nested schema)

Nested Schema for Nested Schema for user.connection_limits

Read-Only:

  • max_connections_per_hour (Number) Max connections per hour.

  • max_questions_per_hour (Number) Max questions per hour.

  • max_updates_per_hour (Number) Max updates per hour.

  • max_user_connections (Number) Max user connections.

Nested Schema for Nested Schema for user.permission

Read-Only:

  • database_name (String) The name of the database that the permission grants access to.

  • roles (List of String) List user's roles in the database. Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES, CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE,REFERENCES.

Была ли статья полезна?

Предыдущая
mdb_mongodb_user
Следующая
mdb_mysql_database
Проект Яндекса
© 2025 ООО «Яндекс.Облако»