Skip to content

Commit 10e2729

Browse files
authored
Update aws_ec2_instances_have_backup_with_lifecyclepolicy_above_35_days.yaml
1 parent 77c6205 commit 10e2729

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

compliance/controls/baseline/aws/backup/aws_ec2_instances_have_backup_with_lifecyclepolicy_above_35_days.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
id: 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
33
type: 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.
55
integration_type:
66
- aws_cloud_account
7-
parameters: []
87
policy:
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,

0 commit comments

Comments
 (0)