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

Add max_allocated_storage param, and update some defaults #48

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.0

- Add support for 'max_allocated_storage' parameter

## 3.0.0

- Add support for Terraform 0.12; 0.12 is now the minimum supported version.
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ module "postgresql_rds" {
source = "github.com/azavea/terraform-aws-postgresql-rds"
vpc_id = "vpc-20f74844"
allocated_storage = "32"
engine_version = "9.4.4"
instance_type = "db.t2.micro"
storage_type = "gp2"
max_allocated_storage = "64"
engine_version = "14"
instance_type = "db.t3.micro"
storage_type = "gp3"
database_identifier = "jl23kj32sdf"
database_name = "hector"
database_username = "hector"
Expand Down Expand Up @@ -62,10 +63,11 @@ If you're curious to know more, see the discussion within https://github.com/ter
- `project` - Name of project this VPC is meant to house (default: `Unknown`)
- `environment` - Name of environment this VPC is targeting (default: `Unknown`)
- `allocated_storage` - Storage allocated to database instance (default: `32`)
- `engine_version` - Database engine version (default: `11.5`)
- `max_allocated_storage` - Maximum storage to use with storage auto-scaling. `0` disables storage auto-scaling (default: `0`)
- `engine_version` - Database engine version (default: `14`)
- `instance_type` - Instance type for database instance (default: `db.t3.micro`)
- `storage_type` - Type of underlying storage for database (default: `gp2`)
- `iops` - The amount of provisioned IOPS. Setting this implies a `storage_type` of `io1` (default: `0`)
- `storage_type` - Type of underlying storage for database (default: `gp3`)
- `iops` - The amount of provisioned IOPS. Works with `storage_type` of `io1` or `gp3`. `gp3` volumes below 400GB are locked at 3000 IOPS. (default: `3000`)
- `database_identifier` - Identifier for RDS instance
- `snapshot_identifier` - The name of the snapshot (if any) the database should be created from
- `database_name` - Name of database inside storage engine
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ resource "aws_security_group" "postgresql" {
#
resource "aws_db_instance" "postgresql" {
allocated_storage = var.allocated_storage
max_allocated_storage = var.max_allocated_storage
engine = "postgres"
engine_version = var.engine_version
identifier = var.database_identifier
Expand Down
12 changes: 9 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ variable "allocated_storage" {
description = "Storage allocated to database instance"
}

variable "max_allocated_storage" {
default = 0
type = number
description = "Max storage for auto-allocation"
}

variable "engine_version" {
default = "11.5"
default = "14"
type = string
description = "Database engine version"
}
Expand All @@ -29,13 +35,13 @@ variable "instance_type" {
}

variable "storage_type" {
default = "gp2"
default = "gp3"
type = string
description = "Type of underlying storage for database"
}

variable "iops" {
default = 0
default = 3000
type = number
description = "The amount of provisioned IOPS"
}
Expand Down