From 9193d7a56d91d7f995f8267779c28536276b95b4 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Thu, 18 Jul 2024 20:14:46 +0200 Subject: [PATCH] fix: pass var.db_port to RDS cluster instances (#222) * Pass var.db_port to cluster instances * Add input variable description for postgres example --- examples/postgres/variables.tf | 3 ++- main.tf | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/postgres/variables.tf b/examples/postgres/variables.tf index bbd73dac..bd02955b 100644 --- a/examples/postgres/variables.tf +++ b/examples/postgres/variables.tf @@ -4,7 +4,8 @@ variable "region" { } variable "availability_zones" { - type = list(string) + type = list(string) + description = "Availability Zones for the instance" } variable "instance_type" { diff --git a/main.tf b/main.tf index 30792377..d9845747 100644 --- a/main.tf +++ b/main.tf @@ -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 = [ @@ -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,