Skip to content

Commit

Permalink
Merge pull request #62 from schubergphilis/fvb/global-tweaks
Browse files Browse the repository at this point in the history
fix: Add Global Writer endpoint to the outputs
  • Loading branch information
fatbasstard authored Jan 7, 2025
2 parents f666b77 + 23cdb74 commit c54f37f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ This can be changed by updating `var.instance_count`. By default all instances u
| <a name="output_database"></a> [database](#output\_database) | Name of the first database created when the cluster was created |
| <a name="output_endpoint"></a> [endpoint](#output\_endpoint) | DNS address of the RDS instance |
| <a name="output_global_cluster_identifier"></a> [global\_cluster\_identifier](#output\_global\_cluster\_identifier) | If the cluster is the primary of a global cluster, the global cluster ID |
| <a name="output_global_cluster_writer_endpoint"></a> [global\_cluster\_writer\_endpoint](#output\_global\_cluster\_writer\_endpoint) | If the cluster is the primary of a global cluster, the global cluster writer endpoint |
| <a name="output_id"></a> [id](#output\_id) | ID of the Aurora cluster |
| <a name="output_instance_ids"></a> [instance\_ids](#output\_instance\_ids) | Aurora instances IDs |
| <a name="output_master_user_secret"></a> [master\_user\_secret](#output\_master\_user\_secret) | The generated database master user secret when `var.manage_master_user` is set to `true` |
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ output "global_cluster_identifier" {
description = "If the cluster is the primary of a global cluster, the global cluster ID"
}

output "global_cluster_writer_endpoint" {
value = var.global_database_primary ? aws_rds_global_cluster.default[0].endpoint : null
description = "If the cluster is the primary of a global cluster, the global cluster writer endpoint"
}

output "endpoint" {
value = aws_rds_cluster.default.endpoint
description = "DNS address of the RDS instance"
Expand Down

0 comments on commit c54f37f

Please sign in to comment.