Skip to content

Commit b7ecd6f

Browse files
Add PostgreSQL IAM policy output and database outputs for passwordless authentication
- Add postgres_iam_policy_arn output to service_accounts module - Add database_endpoint, database_name, database_username, database_password outputs to root module - Remove all Redis IAM authentication code to keep this branch PostgreSQL-only
1 parent ad4c7a8 commit b7ecd6f

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

modules/service_accounts/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ output "iam_role" {
1212

1313
description = "The IAM role associated with the instance profile."
1414
}
15+
16+
output "postgres_iam_policy_arn" {
17+
value = try(aws_iam_policy.postgres_iam_policy[0].arn, "")
18+
description = "The ARN of the PostgreSQL IAM authentication policy, if created."
19+
}

outputs.tf

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,31 @@ output "s3_bucket" {
9090
value = local.object_storage.s3_bucket
9191
description = "S3 bucket name"
9292
}
93+
94+
# Database outputs for PostgreSQL passwordless authentication
95+
output "database_endpoint" {
96+
value = local.enable_database_module ? module.database[0].endpoint : (var.enable_aurora ? module.aurora_database[0].endpoint : "")
97+
description = "The PostgreSQL database endpoint."
98+
}
99+
100+
output "database_name" {
101+
value = local.enable_database_module ? module.database[0].name : (var.enable_aurora ? module.aurora_database[0].name : "")
102+
description = "The PostgreSQL database name."
103+
}
104+
105+
output "database_username" {
106+
value = local.enable_database_module ? module.database[0].username : (var.enable_aurora ? module.aurora_database[0].username : "")
107+
description = "The PostgreSQL database username."
108+
sensitive = true
109+
}
110+
111+
output "database_password" {
112+
value = local.enable_database_module ? module.database[0].password : (var.enable_aurora ? module.aurora_database[0].password : "")
113+
description = "The PostgreSQL database password."
114+
sensitive = true
115+
}
116+
117+
output "postgres_iam_policy_arn" {
118+
value = module.service_accounts.postgres_iam_policy_arn
119+
description = "The ARN of the PostgreSQL IAM authentication policy, if created."
120+
}

0 commit comments

Comments
 (0)