Skip to content

Commit

Permalink
fix: do not force sslmode at infrastructure level
Browse files Browse the repository at this point in the history
  • Loading branch information
ships committed May 2, 2024
1 parent 856d50e commit 047b223
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion core/.env.docker
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${PGDATABASE}?sslmode=require
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${PGDATABASE}
6 changes: 0 additions & 6 deletions infrastructure/terraform/aws/modules/core-services/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ locals {
db_user = aws_db_instance.core_postgres.username
db_name = aws_db_instance.core_postgres.db_name
db_host = aws_db_instance.core_postgres.address
db_sslmode = "require"
}

output "secrets" {
Expand All @@ -23,17 +22,12 @@ output "asset_uploader_key_id" {
value = aws_iam_access_key.asset_uploader.id
}

output "rds_connection_string_sans_password" {
value = "postgresql://${local.db_user}@${local.db_host}:5432/${local.db_name}?sslmode=${local.db_sslmode}"
}

output "rds_connection_components" {
value = {
user = local.db_user
database = local.db_name
host = local.db_host
port = "5432"
sslmode = local.db_sslmode
id = aws_db_instance.core_postgres.id
}
}
2 changes: 0 additions & 2 deletions infrastructure/terraform/aws/modules/deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ module "service_core" {
configuration = {
container_port = 3000
environment = [
# { name = "DATABASE_URL", value = module.core_dependency_services.rds_connection_string_sans_password },
{ name = "PGUSER", value = module.core_dependency_services.rds_connection_components.user },
{ name = "PGDATABASE", value = module.core_dependency_services.rds_connection_components.database },
{ name = "PGHOST", value = module.core_dependency_services.rds_connection_components.host },
Expand Down Expand Up @@ -205,7 +204,6 @@ module "service_flock" {

configuration = {
environment = [
# { name = "DATABASE_URL", value = module.core_dependency_services.rds_connection_string_sans_password },
{ name = "PGUSER", value = module.core_dependency_services.rds_connection_components.user },
{ name = "PGDATABASE", value = module.core_dependency_services.rds_connection_components.database },
{ name = "PGHOST", value = module.core_dependency_services.rds_connection_components.host },
Expand Down

0 comments on commit 047b223

Please sign in to comment.