Skip to content

Commit

Permalink
Merge pull request #2 from willingham/master
Browse files Browse the repository at this point in the history
Parameterize DB engine_version
  • Loading branch information
joseph-wortmann authored Jan 8, 2019
2 parents 0b42a21 + 95df875 commit a91f283
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource "aws_db_instance" "rds" {
copy_tags_to_snapshot = true
db_subnet_group_name = "${aws_db_subnet_group.rds.name}"
engine = "postgres"
engine_version = "10.1"
engine_version = "${var.engine_version}"
final_snapshot_identifier = "${var.name}-final"
identifier = "${var.name}"
instance_class = "${var.instance_class}"
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ variable "database_name" {
type = "string"
}

variable "engine_version" {
default = "10.1"
description = "The version of PostgreSQL used when the DB instance is created."
type = "string"
}

variable "instance_class" {
description = "The instance type of the RDS instance."
type = "string"
Expand Down Expand Up @@ -38,4 +44,4 @@ variable "username" {
variable "vpc_id" {
description = "The VPC ID of the DB's aws_security_group."
type = "string"
}
}

0 comments on commit a91f283

Please sign in to comment.