Skip to content

Commit

Permalink
Merge pull request #68 from albumprinter/feature/allow-rds-upgrades
Browse files Browse the repository at this point in the history
BEAM-5171 - Allow major version upgrades of RDS instances
  • Loading branch information
rheusinkveld authored Feb 20, 2024
2 parents f74b227 + c908930 commit 7b68817
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
33 changes: 17 additions & 16 deletions apps/rds_mysql/rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,23 @@ resource "aws_db_subnet_group" "database" {
resource "aws_db_instance" "database" {
db_name = "${var.app_name}"
// depends_on = ["aws_db_subnet_group.database", "aws_security_group.database"]
identifier = "${var.environment}-${var.app_name}"
allocated_storage = "${var.db_storage_size}"
engine = "mysql"
engine_version = "${var.db_engine_version}"
instance_class = "${var.db_instance_size}"
username = "${var.db_admin_username}"
password = "${var.db_admin_password}"
db_subnet_group_name = "${aws_db_subnet_group.database.name}"
parameter_group_name = "${var.db_parameter_group}"
final_snapshot_identifier = "${var.environment}-${var.app_name}"
backup_retention_period = "${var.db_backup_retention_period}"
backup_window = "${var.db_backup_window}"
maintenance_window = "${var.db_maintenance_window}"
multi_az = "${var.db_multi_az}"
vpc_security_group_ids = ["${aws_security_group.database.id}"]
publicly_accessible = false
identifier = "${var.environment}-${var.app_name}"
allocated_storage = "${var.db_storage_size}"
engine = "mysql"
engine_version = "${var.db_engine_version}"
instance_class = "${var.db_instance_size}"
username = "${var.db_admin_username}"
password = "${var.db_admin_password}"
db_subnet_group_name = "${aws_db_subnet_group.database.name}"
parameter_group_name = "${var.db_parameter_group}"
final_snapshot_identifier = "${var.environment}-${var.app_name}"
backup_retention_period = "${var.db_backup_retention_period}"
backup_window = "${var.db_backup_window}"
maintenance_window = "${var.db_maintenance_window}"
multi_az = "${var.db_multi_az}"
vpc_security_group_ids = ["${aws_security_group.database.id}"]
allow_major_version_upgrade = "${var.db_allow_major_version_upgrade}"
publicly_accessible = false
lifecycle {
prevent_destroy = true
}
Expand Down
4 changes: 4 additions & 0 deletions apps/rds_mysql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ variable "db_engine_version" {
default = "5.6.22"
}

variable "db_allow_major_version_upgrade" {
default = false
}

variable "db_instance_size" {
default = "db.t2.micro"
}
Expand Down

0 comments on commit 7b68817

Please sign in to comment.