From 5d79cb6a70636ce39ef7fac12cb7e768adbbbdda Mon Sep 17 00:00:00 2001 From: gsboueguia Date: Fri, 18 Oct 2024 09:14:32 -0400 Subject: [PATCH 1/2] update enggine-mode and version in optiional file --- optional.tf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/optional.tf b/optional.tf index 19f863f..fa37354 100644 --- a/optional.tf +++ b/optional.tf @@ -53,8 +53,18 @@ variable "engine_mode" { default = "provisioned" type = string validation { - condition = var.engine_mode != "serverless" - error_message = "This module does not support Aurora Serverless v1. Please switch to Aurora Serverless v2 instead by leaving this value set to the default value." + condition = var.engine_mode == "provisioned" || var.engine_mode == "serverless" + error_message = "This module supports only Aurora provisioned or Serverless v2. Please set engine_mode to 'serverless' for Serverless v2 or 'provisioned' for provisioned mode." + } +} + +variable "engine_version" { + description = "Engine version of the RDS cluster" + default = "14.6" # Use a valid version for Serverless v2 + type = string + validation { + condition = (var.engine_version >= "13.7" && var.engine_version <= "13.7") || (var.engine_version >= "14" && var.engine_version <= "15") + error_message = "Ensure the engine version is compatible with Aurora PostgreSQL versions that support Serverless v2 (>= 13.7 or 14.x)." } } From 5dc917a1dc6a275513245c381b3f92fe9a0d904c Mon Sep 17 00:00:00 2001 From: gsboueguia Date: Fri, 18 Oct 2024 13:15:37 +0000 Subject: [PATCH 2/2] Running document script --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 65ac1b5..393dca3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Use this URL for the source of the module. See the usage examples below for more details. ```hcl -github.com/pbs/terraform-aws-rds-module?ref=0.4.0 +github.com/pbs/terraform-aws-rds-module?ref=x.y.z ``` ### Alternative Installation Methods @@ -28,7 +28,7 @@ Integrate this module like so: ```hcl module "rds" { - source = "github.com/pbs/terraform-aws-rds-module?ref=0.4.0" + source = "github.com/pbs/terraform-aws-rds-module?ref=x.y.z" # Required Parameters private_hosted_zone = "example.local" @@ -47,7 +47,7 @@ module "rds" { If this repo is added as a subtree, then the version of the module should be close to the version shown here: -`0.4.0` +`x.y.z` Note, however that subtrees can be altered as desired within repositories.