Skip to content

Commit 7acb02d

Browse files
Add output variable for master_user_secret (#260)
Co-authored-by: Joe Niland <joe@originalmind.com.au>
1 parent 58d4057 commit 7acb02d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ Review the [complete example](examples/complete) to see how to use this module.
475475
|------|-------------|
476476
| <a name="output_activity_stream_arn"></a> [activity\_stream\_arn](#output\_activity\_stream\_arn) | Activity Stream ARN |
477477
| <a name="output_activity_stream_name"></a> [activity\_stream\_name](#output\_activity\_stream\_name) | Activity Stream Name |
478+
| <a name="output_admin_user_secret"></a> [admin\_user\_secret](#output\_admin\_user\_secret) | The secret manager attributes for the managed admin user password (`master_user_secret`). |
478479
| <a name="output_arn"></a> [arn](#output\_arn) | Amazon Resource Name (ARN) of the cluster |
479480
| <a name="output_cluster_identifier"></a> [cluster\_identifier](#output\_cluster\_identifier) | Cluster Identifier |
480481
| <a name="output_cluster_resource_id"></a> [cluster\_resource\_id](#output\_cluster\_resource\_id) | The region-unique, immutable identifie of the cluster |

outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ output "port" {
3434
description = "DB port"
3535
}
3636

37+
# See: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster.html#master_user_secret
38+
output "admin_user_secret" {
39+
value = var.manage_admin_user_password ? concat(aws_rds_cluster.primary[*].master_user_secret) : []
40+
description = "The secret manager attributes for the managed admin user password (`master_user_secret`)."
41+
}
42+
3743
output "master_host" {
3844
value = module.dns_master.hostname
3945
description = "DB Master hostname"

0 commit comments

Comments
 (0)