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..413b8a8e68d 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 = "/${var.env_name}/gdpr/api/snapshot_identifier" + 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..bc59b7fd1b9 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 = "/${var.env_name}/merge/api/snapshot_identifier" + 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