1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
output "id" {
description = "RDS instance identifier"
value = aws_db_instance.this.id
}
output "arn" {
description = "RDS instance ARN"
value = aws_db_instance.this.arn
}
output "endpoint" {
description = "RDS instance connection endpoint"
value = aws_db_instance.this.endpoint
}
output "address" {
description = "RDS instance hostname"
value = aws_db_instance.this.address
}
output "port" {
description = "RDS instance port"
value = aws_db_instance.this.port
}
output "db_name" {
description = "Initial database name"
value = aws_db_instance.this.db_name
}
output "master_user_secret_arn" {
description = "Secrets Manager secret ARN for the master password (when manage_master_user_password = true)"
value = length(aws_db_instance.this.master_user_secret) > 0 ? aws_db_instance.this.master_user_secret[0].secret_arn : null
}
output "replica_endpoints" {
description = "Map of replica logical key to endpoint"
value = { for k, v in aws_db_instance.replica : k => v.endpoint }
}
|