yandex_mdb_mysql_cluster (Data Source)
- 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 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
}
Schema
Optional
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) Thetruevalue 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 providerfolder-idis 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-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 typeyandex_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) TheVPC Network IDof 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 typeyandex_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 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 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 database
Read-Only:
name(String) The name of the database.
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 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 whennameis 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 maintenance_window
Read-Only:
-
day(String) Day of the week (inDDDformat). Allowed values:MON,TUE,WED,THU,FRI,SAT,SUN -
hour(Number) Hour of the day in UTC (inHHformat). Allowed value is between 1 and 24. -
type(String) Type of maintenance window. Can be eitherANYTIMEorWEEKLY. A day and hour of window need to be specified with weekly window.
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 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 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.7MYSQL_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_ADMINfor 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 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 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.