-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from terraform-yacloud-modules/output
Переработал output
- Loading branch information
Showing
3 changed files
with
149 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
output "id" { | ||
description = "The ID of the MySQL cluster" | ||
value = module.mysql.id | ||
} | ||
|
||
output "name" { | ||
description = "The name of the MySQL cluster" | ||
value = module.mysql.name | ||
} | ||
|
||
output "fqdn" { | ||
description = "The fully qualified domain name of the MySQL cluster" | ||
value = module.mysql.fqdn | ||
} | ||
|
||
output "hosts" { | ||
description = "List of host FQDNs in the MySQL cluster" | ||
value = module.mysql.hosts | ||
} | ||
|
||
output "network_id" { | ||
description = "The ID of the network to which the MySQL cluster belongs" | ||
value = module.mysql.network_id | ||
} | ||
|
||
output "security_group_id" { | ||
description = "The ID of the security group assigned to the MySQL cluster" | ||
value = module.mysql.security_group_id | ||
} | ||
|
||
output "environment" { | ||
description = "The deployment environment of the MySQL cluster" | ||
value = module.mysql.environment | ||
} | ||
|
||
output "version" { | ||
description = "The version of the MySQL cluster" | ||
value = module.mysql.version | ||
} | ||
|
||
output "resources" { | ||
description = "The resources allocated to the MySQL cluster" | ||
value = module.mysql.resources | ||
} | ||
|
||
output "maintenance_window" { | ||
description = "The maintenance window settings of the MySQL cluster" | ||
value = module.mysql.maintenance_window | ||
} | ||
|
||
output "backup_window_start" { | ||
description = "The backup window start time of the MySQL cluster" | ||
value = module.mysql.backup_window_start | ||
} | ||
|
||
output "backup_retain_period_days" { | ||
description = "The number of days to retain backups for the MySQL cluster" | ||
value = module.mysql.backup_retain_period_days | ||
} | ||
|
||
output "access" { | ||
description = "The access settings of the MySQL cluster" | ||
value = module.mysql.access | ||
} | ||
|
||
output "performance_diagnostics" { | ||
description = "The performance diagnostics settings of the MySQL cluster" | ||
value = module.mysql.performance_diagnostics | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,88 @@ | ||
output "db_info" { | ||
value = yandex_mdb_mysql_cluster.mysql | ||
description = "Full information about the cluster" | ||
output "id" { | ||
description = "The ID of the MySQL cluster" | ||
value = yandex_mdb_mysql_cluster.mysql.id | ||
} | ||
|
||
output "hosts_fqdn" { | ||
output "name" { | ||
description = "The name of the MySQL cluster" | ||
value = yandex_mdb_mysql_cluster.mysql.name | ||
} | ||
|
||
output "fqdn" { | ||
description = "The fully qualified domain name of the MySQL cluster" | ||
value = "c-${yandex_mdb_mysql_cluster.mysql.id}.rw.mdb.yandexcloud.net" | ||
} | ||
|
||
output "hosts" { | ||
description = "List of host FQDNs in the MySQL cluster" | ||
value = [for host in yandex_mdb_mysql_cluster.mysql.host : host.fqdn] | ||
description = "List of server FQDN" | ||
} | ||
|
||
output "hosts_name" { | ||
value = [for host in yandex_mdb_mysql_cluster.mysql.host : host.name] | ||
description = "List of server names" | ||
output "network_id" { | ||
description = "The ID of the network to which the MySQL cluster belongs" | ||
value = yandex_mdb_mysql_cluster.mysql.network_id | ||
} | ||
|
||
output "id" { | ||
value = yandex_mdb_mysql_cluster.mysql.id | ||
description = "cluster ID" | ||
output "security_group_id" { | ||
description = "The ID of the security group assigned to the MySQL cluster" | ||
value = yandex_vpc_security_group.mysql.id | ||
} | ||
|
||
output "name" { | ||
value = yandex_mdb_mysql_cluster.mysql.name | ||
description = "cluster name" | ||
output "environment" { | ||
description = "The deployment environment of the MySQL cluster" | ||
value = yandex_mdb_mysql_cluster.mysql.environment | ||
} | ||
|
||
output "version" { | ||
description = "The version of the MySQL cluster" | ||
value = yandex_mdb_mysql_cluster.mysql.version | ||
} | ||
|
||
output "resources" { | ||
description = "The resources allocated to the MySQL cluster" | ||
value = { | ||
resource_preset_id = yandex_mdb_mysql_cluster.mysql.resources[0].resource_preset_id | ||
disk_type_id = yandex_mdb_mysql_cluster.mysql.resources[0].disk_type_id | ||
disk_size = yandex_mdb_mysql_cluster.mysql.resources[0].disk_size | ||
} | ||
} | ||
|
||
output "maintenance_window" { | ||
description = "The maintenance window settings of the MySQL cluster" | ||
value = { | ||
type = yandex_mdb_mysql_cluster.mysql.maintenance_window[0].type | ||
day = yandex_mdb_mysql_cluster.mysql.maintenance_window[0].day | ||
hour = yandex_mdb_mysql_cluster.mysql.maintenance_window[0].hour | ||
} | ||
} | ||
|
||
output "backup_window_start" { | ||
description = "The backup window start time of the MySQL cluster" | ||
value = { | ||
hours = yandex_mdb_mysql_cluster.mysql.backup_window_start[0].hours | ||
minutes = yandex_mdb_mysql_cluster.mysql.backup_window_start[0].minutes | ||
} | ||
} | ||
|
||
output "backup_retain_period_days" { | ||
description = "The number of days to retain backups for the MySQL cluster" | ||
value = yandex_mdb_mysql_cluster.mysql.backup_retain_period_days | ||
} | ||
|
||
output "access" { | ||
description = "The access settings of the MySQL cluster" | ||
value = { | ||
data_lens = yandex_mdb_mysql_cluster.mysql.access[0].data_lens | ||
web_sql = yandex_mdb_mysql_cluster.mysql.access[0].web_sql | ||
data_transfer = yandex_mdb_mysql_cluster.mysql.access[0].data_transfer | ||
} | ||
} | ||
|
||
output "performance_diagnostics" { | ||
description = "The performance diagnostics settings of the MySQL cluster" | ||
value = { | ||
enabled = yandex_mdb_mysql_cluster.mysql.performance_diagnostics[0].enabled | ||
sessions_sampling_interval = yandex_mdb_mysql_cluster.mysql.performance_diagnostics[0].sessions_sampling_interval | ||
statements_sampling_interval = yandex_mdb_mysql_cluster.mysql.performance_diagnostics[0].statements_sampling_interval | ||
} | ||
} |