From e2c282182d9d60e4c248e84972840593b7177062 Mon Sep 17 00:00:00 2001 From: Kumar Kavish <108507473+kkavish@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:42:23 +0530 Subject: [PATCH 1/2] TF-11115, TF-11117, TF-11116] Adding S3 bucket to output (#342) * object store integration for writing release tests in TFE * object store integration for writing release tests in TFE --- outputs.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/outputs.tf b/outputs.tf index 1598af6e..fc0e7af0 100644 --- a/outputs.tf +++ b/outputs.tf @@ -85,3 +85,8 @@ output "key" { value = data.aws_kms_key.main.id description = "The KMS key used to encrypt data." } + +output "s3_bucket" { + value = local.object_storage.s3_bucket + description = "S3 bucket name" +} From 7fb831d660699d3f3e0d1f07519750a2fdd04023 Mon Sep 17 00:00:00 2001 From: Harshit Gupta Date: Tue, 10 Dec 2024 19:32:23 +0530 Subject: [PATCH 2/2] Amazon RDS deployment strategy (#341) * trying to reduce postgres setup time * adding the default values --------- Co-authored-by: Nikolas Rieble --- main.tf | 2 ++ modules/database/main.tf | 4 ++-- modules/database/variables.tf | 12 ++++++++++++ variables.tf | 12 ++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 5f1d1df8..e0484860 100644 --- a/main.tf +++ b/main.tf @@ -111,6 +111,8 @@ module "database" { network_subnets_private = local.network_private_subnets tfe_instance_sg = module.vm.tfe_instance_sg kms_key_arn = local.kms_key_arn + allow_major_version_upgrade = var.allow_major_version_upgrade + allow_multiple_azs = var.allow_multiple_azs } # ----------------------------------------------------------------------------- diff --git a/modules/database/main.tf b/modules/database/main.tf index 5abb1a30..84ca0292 100644 --- a/modules/database/main.tf +++ b/modules/database/main.tf @@ -62,7 +62,7 @@ resource "aws_db_instance" "postgresql" { # no special characters allowed username = var.db_username - allow_major_version_upgrade = false + allow_major_version_upgrade = var.allow_major_version_upgrade apply_immediately = true auto_minor_version_upgrade = true backup_retention_period = var.db_backup_retention @@ -73,7 +73,7 @@ resource "aws_db_instance" "postgresql" { engine_version = var.engine_version identifier_prefix = "${var.friendly_name_prefix}-tfe" max_allocated_storage = 0 - multi_az = true + multi_az = var.allow_multiple_azs # no special characters allowed db_name = var.db_name port = 5432 diff --git a/modules/database/variables.tf b/modules/database/variables.tf index 27b696ed..5361416e 100644 --- a/modules/database/variables.tf +++ b/modules/database/variables.tf @@ -65,3 +65,15 @@ variable "kms_key_arn" { description = "The Amazon Resource Name of the KMS key which will be used by the Redis Elasticache replication group to encrypt data at rest." type = string } + +variable "allow_major_version_upgrade" { + type = bool + description = "Determine whether postgres major version upgrade is required or not." + default = false +} + +variable "allow_multiple_azs" { + type = bool + description = "Determine Amazon RDS Postgres deployment strategy." + default = true +} diff --git a/variables.tf b/variables.tf index 00d7e299..17c76e21 100644 --- a/variables.tf +++ b/variables.tf @@ -189,6 +189,18 @@ variable "postgres_engine_version" { description = "PostgreSQL version." } +variable "allow_major_version_upgrade" { + type = bool + description = "Determine whether postgres major version upgrade is required or not." + default = false +} + +variable "allow_multiple_azs" { + type = bool + description = "Determine Amazon RDS Postgres deployment strategy." + default = true +} + # Aurora # ------ variable "enable_aurora" {