Skip to content

Commit

Permalink
Merge pull request #8183 from ministryofjustice/feature/DPR2-1284
Browse files Browse the repository at this point in the history
[DPR2-1284] Environment-specific RedShift report table expiration
  • Loading branch information
stalwartstu authored Oct 11, 2024
2 parents 617151e + 04c6d4d commit bb35429
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
"enable_cp_bodmis_k8s_secrets": true,
"enable_dbt_k8s_secrets": true,
"dpr_generic_athena_workgroup": true,
"analytics_generic_athena_workgroup": true
"analytics_generic_athena_workgroup": true,
"redshift_table_expiry_seconds": "604800"
},
"test": {
"project_short_id": "dpr",
Expand Down Expand Up @@ -346,7 +347,8 @@
"enable_cp_bodmis_k8s_secrets": false,
"enable_dbt_k8s_secrets": true,
"dpr_generic_athena_workgroup": true,
"analytics_generic_athena_workgroup": true
"analytics_generic_athena_workgroup": true,
"redshift_table_expiry_seconds": "604800"
},
"preproduction": {
"project_short_id": "dpr",
Expand Down Expand Up @@ -540,7 +542,8 @@
}
]
}
]
],
"redshift_table_expiry_seconds": "604800"
},
"production": {
"project_short_id": "dpr",
Expand Down Expand Up @@ -729,7 +732,8 @@
}
]
}
]
],
"redshift_table_expiry_seconds": "86400"
}
}
}
2 changes: 1 addition & 1 deletion terraform/environments/digital-prison-reporting/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ locals {
lambda_redshift_table_expiry_cluster_id = module.datamart.cluster_id
lambda_redshift_table_expiry_database_name = module.datamart.cluster_database_name
lambda_redshift_table_expiry_schedule_expression = "rate(1 hour)"
lambda_redshift_table_expiry_seconds = "86400"
lambda_redshift_table_expiry_seconds = local.application_data.accounts[local.environment].redshift_table_expiry_seconds
lambda_redshift_table_expiry_timeout_seconds = 900
lambda_redshift_table_expiry_memory_size = 1024

Expand Down

0 comments on commit bb35429

Please sign in to comment.