Skip to content

Commit

Permalink
setup tefca jdbc database connection strings and update db url name
Browse files Browse the repository at this point in the history
  • Loading branch information
alismx committed Sep 18, 2024
1 parent b341656 commit b68a68c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions terraform/aws/implementation/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module "eks" {
ecr_viewer_s3_role_arn = module.s3.ecr_viewer_s3_role_arn
tefca_viewer_db_role_arn = module.rds.tefca_viewer_db_role_arn
tefca_db_connection_string = module.rds.tefca_db_connection_string
tefca_jdbc_db_connection_string = module.rds.tefca_jdbc_db_connection_string
domain_name = local.domain_name
ecr_bucket_name = module.s3.ecr_bucket_name
enable_cognito = var.enable_cognito
Expand Down
11 changes: 9 additions & 2 deletions terraform/aws/implementation/modules/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ data "external" "latest_phdi_release" {
resource "helm_release" "building_blocks" {
depends_on = [terraform_data.wait_for_load_balancer_controller]
for_each = var.services_to_chart
repository = "https://github.com/CDCgov/phdi-charts/tree/alis/upgrades/2565/85"
repository = "https://cdcgov.github.io/phdi-charts/"
name = "phdi-playground-${terraform.workspace}-${each.key}"
chart = each.value
version = data.external.chart_versions.result[each.value]
Expand All @@ -307,7 +307,12 @@ resource "helm_release" "building_blocks" {
cleanup_on_fail = true

set {
name = "databaseUrl"
name = "jdbcDatabaseConnectionString"
value = var.tefca_jdbc_db_connection_string
}

set {
name = "databaseConnectionString"
value = var.tefca_db_connection_string
}

Expand Down Expand Up @@ -337,6 +342,8 @@ resource "helm_release" "building_blocks" {
}

# Values needed for orchestration service
# "phdi-playground-${terraform.workspace}-${each.key}-${each.key}-service"
# phdi-playground-dev-ecr-viewer-ecr-viewer-service
set {
name = "fhirConverterUrl"
value = "https://${var.domain_name}/fhir-converter"
Expand Down
4 changes: 4 additions & 0 deletions terraform/aws/implementation/modules/eks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,8 @@ variable "cognito_domain" {

variable "tefca_db_connection_string" {
description = "Connection string to the tefca database"
}

variable "tefca_jdbc_db_connection_string" {
description = "JDBC connection string for flyway to the tefca database"
}
5 changes: 5 additions & 0 deletions terraform/aws/implementation/modules/rds/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ output "tefca_db_connection_string" {
value = "postgresql://${aws_db_instance.tefca-viewer-db.username}:${aws_db_instance.tefca-viewer-db.password}@${aws_db_instance.tefca-viewer-db.endpoint}:5432/${aws_db_instance.tefca-viewer-db.db_name}"
sensitive = true
}

output "tefca_jdbc_db_connection_string" {
value = "jdbc:postgresql://${aws_db_instance.tefca-viewer-db.endpoint}:5432/${aws_db_instance.tefca-viewer-db.db_name}?user=${aws_db_instance.tefca-viewer-db.username}&password=${aws_db_instance.tefca-viewer-db.password}&ssl=true"
sensitive = true
}

0 comments on commit b68a68c

Please sign in to comment.