Skip to content

Commit

Permalink
fix: pass var.db_port to RDS cluster instances (#222)
Browse files Browse the repository at this point in the history
* Pass var.db_port to cluster instances

* Add input variable description for postgres example
  • Loading branch information
echibuogwu authored Jul 18, 2024
1 parent 896af79 commit 9193d7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/postgres/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ variable "region" {
}

variable "availability_zones" {
type = list(string)
type = list(string)
description = "Availability Zones for the instance"
}

variable "instance_type" {
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ resource "aws_rds_cluster" "primary" {
iam_roles = var.iam_roles
backtrack_window = var.backtrack_window
enable_http_endpoint = local.is_serverless && var.enable_http_endpoint
port = var.db_port
enable_global_write_forwarding = var.enable_global_write_forwarding

depends_on = [
Expand Down Expand Up @@ -197,6 +198,7 @@ resource "aws_rds_cluster" "secondary" {
iam_roles = var.iam_roles
backtrack_window = var.backtrack_window
enable_http_endpoint = local.is_serverless && var.enable_http_endpoint
port = var.db_port

depends_on = [
aws_db_subnet_group.default,
Expand Down

0 comments on commit 9193d7a

Please sign in to comment.