Skip to content

Commit

Permalink
Add more cluster instance outputs (#15)
Browse files Browse the repository at this point in the history
* Add more cluster instance outputs
* add arn output
  • Loading branch information
marcincuber authored Jul 7, 2021
1 parent ec25e87 commit 41e5b25
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ No modules.
| <a name="output_rds_cluster_arn"></a> [rds\_cluster\_arn](#output\_rds\_cluster\_arn) | The ID of the aurora cluster |
| <a name="output_rds_cluster_endpoint"></a> [rds\_cluster\_endpoint](#output\_rds\_cluster\_endpoint) | The cluster endpoint |
| <a name="output_rds_cluster_id"></a> [rds\_cluster\_id](#output\_rds\_cluster\_id) | The ID of the cluster |
| <a name="output_rds_cluster_instance_arns"></a> [rds\_cluster\_instance\_arns](#output\_rds\_cluster\_instance\_arns) | A list of all cluster instance ARNs |
| <a name="output_rds_cluster_instance_dbi_resource_ids"></a> [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 |
| <a name="output_rds_cluster_instance_endpoints"></a> [rds\_cluster\_instance\_endpoints](#output\_rds\_cluster\_instance\_endpoints) | A list of all cluster instance endpoints |
| <a name="output_rds_cluster_instance_ids"></a> [rds\_cluster\_instance\_ids](#output\_rds\_cluster\_instance\_ids) | A list of all cluster instance ids |
| <a name="output_rds_cluster_master_password"></a> [rds\_cluster\_master\_password](#output\_rds\_cluster\_master\_password) | The master password |
| <a name="output_rds_cluster_master_username"></a> [rds\_cluster\_master\_username](#output\_rds\_cluster\_master\_username) | The master username |
| <a name="output_rds_cluster_port"></a> [rds\_cluster\_port](#output\_rds\_cluster\_port) | The port |
Expand Down
22 changes: 21 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 41e5b25

Please sign in to comment.