diff --git a/terraform/environments/delius-core/locals_development.tf b/terraform/environments/delius-core/locals_development.tf index b9712fdb457..7f47f581d43 100644 --- a/terraform/environments/delius-core/locals_development.tf +++ b/terraform/environments/delius-core/locals_development.tf @@ -104,7 +104,7 @@ locals { rds_engine_version = "15" rds_instance_class = "db.t3.small" rds_allocated_storage = 30 - rds_username = "postgres" + rds_username = "dbadmin" rds_port = 5432 rds_license_model = "postgresql-license" rds_deletion_protection = false diff --git a/terraform/environments/delius-core/modules/delius_environment/gdpr_api_service.tf b/terraform/environments/delius-core/modules/delius_environment/gdpr_api_service.tf index c11877c12e3..5871d6019d2 100644 --- a/terraform/environments/delius-core/modules/delius_environment/gdpr_api_service.tf +++ b/terraform/environments/delius-core/modules/delius_environment/gdpr_api_service.tf @@ -46,7 +46,7 @@ module "gdpr_api_service" { rds_backup_retention_period = var.delius_microservice_configs.gdpr_api.rds_backup_retention_period rds_backup_window = var.delius_microservice_configs.gdpr_api.rds_backup_window rds_deletion_protection = var.delius_microservice_configs.gdpr_api.rds_deletion_protection - snapshot_identifier = var.delius_microservice_configs.gdpr_api.snapshot_identifier + snapshot_identifier = data.aws_ssm_parameter.gdpr_api_snapshot_identifier.value rds_skip_final_snapshot = var.delius_microservice_configs.gdpr_api.rds_skip_final_snapshot container_vars_default = { @@ -80,3 +80,20 @@ module "gdpr_api_service" { frontend_lb_arn_suffix = aws_lb.delius_core_frontend.arn_suffix enable_platform_backups = var.enable_platform_backups } + +####################### +# GDPR API Params # +####################### + +resource "aws_ssm_parameter" "gpdr_api_snapshot_identifier" { + name = "/delius-core-${var.env_name}/gdpr-api/snapshot_id" + type = "String" + value = "DEFAULT" + lifecycle { + ignore_changes = [value] + } +} + +data "aws_ssm_parameter" "gdpr_api_snapshot_identifier" { + name = aws_ssm_parameter.gpdr_api_snapshot_identifier.name +} \ No newline at end of file diff --git a/terraform/environments/delius-core/modules/delius_environment/merge_api_service.tf b/terraform/environments/delius-core/modules/delius_environment/merge_api_service.tf index be24e3e9fac..fe80a83eff5 100644 --- a/terraform/environments/delius-core/modules/delius_environment/merge_api_service.tf +++ b/terraform/environments/delius-core/modules/delius_environment/merge_api_service.tf @@ -36,7 +36,7 @@ module "merge_api_service" { rds_username = var.delius_microservice_configs.merge_api.rds_username rds_license_model = var.delius_microservice_configs.merge_api.rds_license_model rds_deletion_protection = var.delius_microservice_configs.merge_api.rds_deletion_protection - snapshot_identifier = var.delius_microservice_configs.merge_api.snapshot_identifier + snapshot_identifier = data.aws_ssm_parameter.merge_api_snapshot_identifier.value rds_skip_final_snapshot = var.delius_microservice_configs.merge_api.rds_skip_final_snapshot maintenance_window = var.delius_microservice_configs.merge_api.maintenance_window rds_backup_retention_period = var.delius_microservice_configs.merge_api.rds_backup_retention_period @@ -79,3 +79,20 @@ module "merge_api_service" { frontend_lb_arn_suffix = aws_lb.delius_core_frontend.arn_suffix enable_platform_backups = var.enable_platform_backups } + +####################### +# Merge API Params # +####################### + +resource "aws_ssm_parameter" "merge_api_snapshot_identifier" { + name = "/delius-core-${var.env_name}/merge-api/snapshot_id" + type = "String" + value = "DEFAULT" + lifecycle { + ignore_changes = [value] + } +} + +data "aws_ssm_parameter" "merge_api_snapshot_identifier" { + name = aws_ssm_parameter.merge_api_snapshot_identifier.name +} \ No newline at end of file