Skip to content

Commit

Permalink
feat: add db port
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLi-Expedia committed Nov 25, 2024
1 parent c00d6e3 commit 221d55a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config-templates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data "template_file" "beekeeper_scheduler_apiary_config" {
template = file("${path.module}/files/beekeeper-scheduler-apiary-config.json")

vars = {
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : var.beekeeper_db_external_hostname
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : "${var.beekeeper_db_external_hostname}:${var.beekeeper_db_port}"
db_name = var.beekeeper_db_name
db_username = var.db_username
queue = aws_sqs_queue.beekeeper.id
Expand All @@ -31,7 +31,7 @@ data "template_file" "beekeeper_path_cleanup_config" {
template = file("${path.module}/files/beekeeper-path-cleanup-config.json")

vars = {
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : var.beekeeper_db_external_hostname
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : "${var.beekeeper_db_external_hostname}:${var.beekeeper_db_port}"
db_name = var.beekeeper_db_name
db_username = var.db_username
scheduler_delay_ms = var.scheduler_delay_ms
Expand All @@ -44,7 +44,7 @@ data "template_file" "beekeeper_metadata_cleanup_config" {
template = file("${path.module}/files/beekeeper-metadata-cleanup-config.json")

vars = {
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : var.beekeeper_db_external_hostname
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : "${var.beekeeper_db_external_hostname}:${var.beekeeper_db_port}"
db_name = var.beekeeper_db_name
db_username = var.db_username
scheduler_delay_ms = var.scheduler_delay_ms
Expand All @@ -58,7 +58,7 @@ data "template_file" "beekeeper_api_config" {
template = file("${path.module}/files/beekeeper-api-config.json")

vars = {
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : var.beekeeper_db_external_hostname
db_endpoint = var.beekeeper_db_external_hostname == "" ? aws_db_instance.beekeeper[0].endpoint : "${var.beekeeper_db_external_hostname}:${var.beekeeper_db_port}"
db_name = var.beekeeper_db_name
db_username = var.db_username
scheduler_delay_ms = var.scheduler_delay_ms
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -634,3 +634,9 @@ variable "beekeeper_db_name" {
type = string
default = "beekeeper"
}

variable "beekeeper_db_port" {
description = "Port number of the beekeeper background Database"
type = number
default = 3306
}

0 comments on commit 221d55a

Please sign in to comment.