File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
compliance/controls/baseline/aws/backup Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 11id : aws_ec2_instances_have_backup_with_lifecyclepolicy_above_35_days
2- title : EC2 Instances Backup Retention > 35 Days
2+ title : Production EC2 Instances Backup Retention > 35 Days
33type : control
4- description : Ensure all EC2 are covered by a backup plan with a minimum of Life Cycle Policy 35 days
4+ description : Ensure all EC2 instances are covered by a backup plan with a minimum of Life Cycle Policy.
55integration_type :
66- aws_cloud_account
7- parameters : []
87policy :
98 language : sql
109 primary_resource : aws_ec2_instance
@@ -16,12 +15,11 @@ policy:
1615 FROM
1716 aws_backup_recovery_point
1817 WHERE
19- now() - creation_date < '35 days'::interval AND
20- (lifecycle ->> 'DeleteAfterDays')::INT >= 35 AND
21- resource_type = 'EC2' AND
22- status = 'COMPLETED'
18+ now() - creation_date < '{{.productionServerSystemRetentionDays}} days'::interval
19+ AND (lifecycle ->> 'DeleteAfterDays')::INT >= {{.productionServerSystemRetentionDays}}
20+ AND resource_type = 'EC2'
21+ AND status = 'COMPLETED'
2322 )
24-
2523 SELECT
2624 i.arn AS resource,
2725 platform_integration_id AS platform_integration_id,
@@ -31,7 +29,7 @@ policy:
3129 ELSE 'ok'
3230 END AS status,
3331 CASE
34- WHEN p.recovery_point_arn IS NULL THEN 'lacks a backup configuration with a minimum of 35 days'
32+ WHEN p.recovery_point_arn IS NULL THEN 'lacks a backup configuration with a minimum of {{.productionServerSystemRetentionDays}} days'
3533 ELSE ''
3634 END AS reason,
3735 region,
You can’t perform that action at this time.
0 commit comments