Skip to content

Commit

Permalink
Fix database url
Browse files Browse the repository at this point in the history
  • Loading branch information
shri committed Aug 12, 2024
1 parent 68de78b commit 8a1a9ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/aws/tf/modules/rds/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource "aws_db_instance" "app_db" {
locals {
current_secret = jsondecode(data.aws_secretsmanager_secret_version.app_db_password_version_data.secret_string)
encoded_password = urlencode(jsondecode(data.aws_secretsmanager_secret_version.app_db_password_version_data.secret_string).password)
new_secret = merge(local.current_secret, { url = "postgresql+asyncpg://${var.app_db_user}:${local.encoded_password}@${aws_db_instance.app_db.endpoint}:5432/${var.app_db_name}" })
new_secret = merge(local.current_secret, { url = "postgresql+asyncpg://${var.app_db_user}:${local.encoded_password}@${aws_db_instance.app_db.endpoint}/${var.app_db_name}" })

depends_on = [data.aws_secretsmanager_secret_version.app_db_password_version_data]
}
Expand Down

0 comments on commit 8a1a9ae

Please sign in to comment.