From 7f5026f9e6c599df2a0eb705f889c988e2d9fa75 Mon Sep 17 00:00:00 2001 From: Josh O'Neal Date: Mon, 24 Jul 2023 16:03:34 -0500 Subject: [PATCH] Added support for RDS version control --- modules/aws_ecs/main.tf | 3 ++- modules/aws_ecs/variables.tf | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/aws_ecs/main.tf b/modules/aws_ecs/main.tf index 6af7987..5dc822a 100644 --- a/modules/aws_ecs/main.tf +++ b/modules/aws_ecs/main.tf @@ -21,7 +21,8 @@ resource "aws_db_instance" "this" { allocated_storage = 80 instance_class = var.rds_instance_class engine = "postgres" - engine_version = "13.7" + engine_version = var.rds_engine_version + auto_minor_version_upgrade = var.rds_auto_minor_version_upgrade db_name = "hammerhead_production" username = aws_secretsmanager_secret_version.rds_username.secret_string password = aws_secretsmanager_secret_version.rds_password.secret_string diff --git a/modules/aws_ecs/variables.tf b/modules/aws_ecs/variables.tf index cfdd41d..3fde69d 100644 --- a/modules/aws_ecs/variables.tf +++ b/modules/aws_ecs/variables.tf @@ -129,6 +129,18 @@ variable "rds_performance_insights_retention_period" { description = "The time in days to retain Performance Insights for RDS. Defaults to 14." } +variable "rds_auto_minor_version_upgrade" { + type = bool + default = true + description = "Whether to enable auto minor version upgrade for RDS. Defaults to true." +} + +variable "rds_engine_version" { + type = string + default = "13.7" + description = "The engine version for RDS. Defaults to 13.7." +} + variable "use_exising_temporal_cluster" { type = bool default = false