11module "nhse_backup_vault" {
2- source = " git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/aws-backup-source?ref=v1.0.6"
2+ # source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/aws-backup-source?ref=v1.0.6"
3+ source = " /Users/aiden.vaines/Clients/NHS/notify/nhs-notify-shared-modules/infrastructure/modules/aws-backup-source"
34 count = var. destination_vault_arn != null ? 1 : 0
45
56 project_name = local. csi
@@ -10,49 +11,28 @@ module "nhse_backup_vault" {
1011
1112 reports_bucket = local. acct . s3_buckets [" backup_reports" ][" bucket" ]
1213 notifications_target_email_address = var. backup_report_recipient
14+ notification_kms_key = module. kms . key_id
1315
14- bootstrap_kms_key_arn = module. kms . key_id
15- terraform_role_arn = local. bootstrap . iam_github_deploy_role [" arn" ]
16+ management_ci_role_arn = local. bootstrap . iam_github_deploy_role [" arn" ]
1617
17- backup_plan_config = {
18- " compliance_resource_types" : [
19- " S3"
20- ],
21- " rules" : [
22- {
23- " copy_action" : {
24- " delete_after" : var.retention_period
25- },
26- " lifecycle" : {
27- " delete_after" : var.retention_period
28- },
29- " name" : " ${ local . csi } -backup-rule" ,
30- " schedule" : var.backup_schedule_cron
31- }
32- ],
33- " selection_tag" : " NHSE-Enable-Backup"
34- }
35-
36- # Note here that we need to explicitly disable DynamoDB backups in the source account.
37- # The default config in the module enables backups for all resource types.
3818 backup_plan_config_dynamodb = {
3919 " compliance_resource_types" : [
4020 " DynamoDB"
4121 ],
4222 " rules" : [
4323 {
24+ " name" : " ${ local . csi } -backup-rule" ,
25+ " schedule" : var.backup_schedule_cron,
4426 " copy_action" : {
4527 " delete_after" : var.retention_period
4628 },
4729 " lifecycle" : {
4830 " delete_after" : var.retention_period
49- },
50- " name" : " ${ local . csi } -backup-rule" ,
51- " schedule" : var.backup_schedule_cron
31+ }
5232 }
5333 ],
5434 " enable" : true ,
55- " selection_tag" : " NHSE-Enable-Backup"
35+ " selection_tag" : " NHSE-Enable-Dynamo- Backup"
5636 }
5737}
5838
0 commit comments