Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set max_allocated_storage var and switch to updated Terraform db module #1312

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 5 additions & 2 deletions deployment/terraform/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 (#1316): 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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for leaving a commend here. I'd suggest we also create an issue in this repo so that we use that one to update the source once the PR is merged in the upstream.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I made #1316.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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
Expand Down
5 changes: 5 additions & 0 deletions deployment/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ variable "rds_allocated_storage" {
type = string
}

variable "rds_max_allocated_storage" {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd assume the tfvars in S3 is already updated- right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't updated it yet, but I will before I push the button to deploy to production. I'm going to watch the staging build after I merge and double-check the production vars against the staging ones to make sure they're how we want them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a plan to me 👍🏼

default = 0
type = string
}

variable "rds_engine_version" {
default = "12.4"
type = string
Expand Down