From 41e5b25a62eb206475a244573c327559852f89f9 Mon Sep 17 00:00:00 2001 From: Marcin Cuber Date: Wed, 7 Jul 2021 09:08:57 +0100 Subject: [PATCH] Add more cluster instance outputs (#15) * Add more cluster instance outputs * add arn output --- README.md | 3 +++ outputs.tf | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1af1a8..04b90f8 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,10 @@ No modules. | [rds\_cluster\_arn](#output\_rds\_cluster\_arn) | The ID of the aurora cluster | | [rds\_cluster\_endpoint](#output\_rds\_cluster\_endpoint) | The cluster endpoint | | [rds\_cluster\_id](#output\_rds\_cluster\_id) | The ID of the cluster | +| [rds\_cluster\_instance\_arns](#output\_rds\_cluster\_instance\_arns) | A list of all cluster instance ARNs | +| [rds\_cluster\_instance\_dbi\_resource\_ids](#output\_rds\_cluster\_instance\_dbi\_resource\_ids) | A list of all the region-unique, immutable identifiers for the DB instances | | [rds\_cluster\_instance\_endpoints](#output\_rds\_cluster\_instance\_endpoints) | A list of all cluster instance endpoints | +| [rds\_cluster\_instance\_ids](#output\_rds\_cluster\_instance\_ids) | A list of all cluster instance ids | | [rds\_cluster\_master\_password](#output\_rds\_cluster\_master\_password) | The master password | | [rds\_cluster\_master\_username](#output\_rds\_cluster\_master\_username) | The master username | | [rds\_cluster\_port](#output\_rds\_cluster\_port) | The port | diff --git a/outputs.tf b/outputs.tf index 29c110e..d435c1c 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,4 +1,6 @@ -// aws_rds_cluster +##### +# aws_rds_cluster +##### output "rds_cluster_arn" { description = "The ID of the aurora cluster" value = var.enable_global_cluster ? join("", aws_rds_cluster.global.*.arn) : join("", aws_rds_cluster.main.*.arn) @@ -40,11 +42,29 @@ output "rds_cluster_master_username" { value = var.enable_global_cluster ? join("", aws_rds_cluster.global.*.master_username) : join("", aws_rds_cluster.main.*.master_username) } +##### +# aws_rds_cluster_instance +##### output "rds_cluster_instance_endpoints" { description = "A list of all cluster instance endpoints" value = aws_rds_cluster_instance.main.*.endpoint } +output "rds_cluster_instance_arns" { + description = "A list of all cluster instance ARNs" + value = aws_rds_cluster_instance.main.*.arn +} + +output "rds_cluster_instance_ids" { + description = "A list of all cluster instance ids" + value = aws_rds_cluster_instance.main.*.id +} + +output "rds_cluster_instance_dbi_resource_ids" { + description = "A list of all the region-unique, immutable identifiers for the DB instances" + value = aws_rds_cluster_instance.main.*.dbi_resource_id +} + output "security_group_id" { description = "The security group ID of the cluster" value = join("", aws_security_group.main.*.id)