From 25d9f421421413f5b1f141a36aa4129da8ce0a64 Mon Sep 17 00:00:00 2001 From: Klaas Hoekema Date: Tue, 20 Jun 2023 13:53:44 -0400 Subject: [PATCH] Set max_allocated_storage var and switch to updated Terraform db module --- CHANGELOG.md | 2 ++ deployment/terraform/database.tf | 7 +++++-- deployment/terraform/variables.tf | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aebd2c7..56eab9e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Updated database Terraform module to use the 'max_allocated_storage' param [#1312](https://github.com/PublicMapping/districtbuilder/pull/1312) + ### Fixed ## [1.19.1] diff --git a/deployment/terraform/database.tf b/deployment/terraform/database.tf index 02f6b09e..b3d8e10d 100644 --- a/deployment/terraform/database.tf +++ b/deployment/terraform/database.tf @@ -75,14 +75,17 @@ resource "aws_db_parameter_group" "default" { } module "database" { - source = "github.com/azavea/terraform-aws-postgresql-rds?ref=3.0.0" + # TODO: go back to github.com/azavea/terraform-aws-postgresql-rds once it's updated + # (see https://github.com/azavea/terraform-aws-postgresql-rds/pull/48) + source = "github.com/KlaasH/terraform-aws-postgresql-rds?ref=max-allocated-storage" vpc_id = module.vpc.id allocated_storage = var.rds_allocated_storage + max_allocated_storage = var.rds_max_allocated_storage engine_version = var.rds_engine_version instance_type = var.rds_instance_type storage_type = var.rds_storage_type - iops = var.rds_storage_type == "io1" ? var.rds_iops : null + iops = var.rds_iops database_identifier = var.rds_database_identifier database_name = var.rds_database_name database_username = var.rds_database_username diff --git a/deployment/terraform/variables.tf b/deployment/terraform/variables.tf index 636dfa58..cf9d3e12 100644 --- a/deployment/terraform/variables.tf +++ b/deployment/terraform/variables.tf @@ -58,6 +58,11 @@ variable "rds_allocated_storage" { type = string } +variable "rds_max_allocated_storage" { + default = 0 + type = string +} + variable "rds_engine_version" { default = "12.4" type = string