Skip to content

Commit

Permalink
Merge pull request #4595 from ministryofjustice/chaps-preprod-db
Browse files Browse the repository at this point in the history
set skip_final_snapshot to true before restoring
  • Loading branch information
roncitrus authored Jan 17, 2024
2 parents f59a298 + a1fff87 commit 1d9ebc4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion terraform/environments/cdpt-chaps/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ resource "aws_db_instance" "database" {
engine_version = "14.00.3381.3.v1"
instance_class = local.application_data.accounts[local.environment].db_instance_class
identifier = local.application_data.accounts[local.environment].db_instance_identifier
skip_final_snapshot = true
lifecycle {
ignore_changes = [username, identifier]
}
username = local.application_data.accounts[local.environment].db_user
password = data.aws_secretsmanager_secret_version.db_password.secret_string
vpc_security_group_ids = [aws_security_group.db.id]
depends_on = [aws_security_group.db]
snapshot_identifier = "arn:aws:rds:eu-west-2:613903586696:snapshot:cdpt-dev-staging-snapshot-9-1-24"
# snapshot_identifier = "arn:aws:rds:eu-west-2:613903586696:snapshot:cdpt-dev-staging-snapshot-9-1-24"
db_subnet_group_name = aws_db_subnet_group.db.id
final_snapshot_identifier = "${local.application_data.accounts[local.environment].db_instance_identifier}-db-snapshot"
publicly_accessible = true
Expand Down

0 comments on commit 1d9ebc4

Please sign in to comment.