diff --git a/terraform/environments/performance-hub/application_variables.json b/terraform/environments/performance-hub/application_variables.json index 2f19b37aa52..426032fb547 100644 --- a/terraform/environments/performance-hub/application_variables.json +++ b/terraform/environments/performance-hub/application_variables.json @@ -15,7 +15,7 @@ "container_memory": "3072", "task_definition_volume": "upload_volume", "network_mode": "none", - "db_enabled": false, + "db_enabled": true, "db_instance_class": "db.m5.large", "db_user": "admin", "db_allocated_storage": "100", diff --git a/terraform/environments/performance-hub/database.tf b/terraform/environments/performance-hub/database.tf index 2efc0e34865..d5a6c44d0fa 100644 --- a/terraform/environments/performance-hub/database.tf +++ b/terraform/environments/performance-hub/database.tf @@ -20,7 +20,7 @@ resource "aws_db_instance" "database" { storage_encrypted = true iam_database_authentication_enabled = false vpc_security_group_ids = [aws_security_group.db.id] - snapshot_identifier = format("arn:aws:rds:eu-west-2:%s:snapshot:%s", data.aws_caller_identity.current.account_id, local.app_data.accounts[local.environment].db_snapshot_identifier) + #snapshot_identifier = format("arn:aws:rds:eu-west-2:%s:snapshot:%s", data.aws_caller_identity.current.account_id, local.app_data.accounts[local.environment].db_snapshot_identifier) backup_retention_period = 30 maintenance_window = "Mon:00:00-Mon:03:00" backup_window = "03:00-06:00" @@ -31,7 +31,10 @@ resource "aws_db_instance" "database" { db_subnet_group_name = aws_db_subnet_group.db.id enabled_cloudwatch_logs_exports = ["error"] ca_cert_identifier = "rds-ca-rsa2048-g1" - apply_immediately = true + # BE VERY CAREFUL with apply_immediately = true. Useful if you want to see the results, but can cause a reboot + # of RDS meaning the connected app will fail. + # When apply_immediately=false, RDS changes are applied during the next maintenance_window + apply_immediately = false # timeouts { # create = "40m"