Skip to content

Commit cbb51f7

Browse files
committed
updating data type
1 parent 85c176c commit cbb51f7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
Description: Check for all AWS RDS Database Instances are covered by configured to be backup for a minimum time period
21
ID: aws_rds_database_instances_have_a_minimum_acceptable_backup_policy
2+
Title: AWS RDS Database Instances have a minimum acceptable backup policy
3+
Description: Check for all AWS RDS Database Instances are configured with a minimum acceptable backup period
34
IntegrationType:
45
- aws_cloud_account
56
Query:
@@ -9,22 +10,23 @@ Query:
910
Parameters:
1011
- Key: awsRdsBaselineRetentionPeriodDays
1112
Required: true
12-
DefaultValue: 7
13+
DefaultValue: "7"
1314
PrimaryTable: aws_rds_db_instance
1415
QueryToExecute: |
1516
SELECT
1617
arn AS resource,
1718
platform_integration_id,
1819
platform_resource_id,
1920
CASE
20-
WHEN backup_retention_period < '{{.awsRdsBaselineRetentionPeriodDays}}'::INT THEN 'alarm'
21+
-- If this param is empty, Postgres will throw an error because ''::INT is invalid.
22+
WHEN backup_retention_period < '{{.awsRdsBaselineRetentionPeriodDays}}'::INT
23+
THEN 'alarm'
2124
ELSE 'ok'
2225
END AS status,
2326
title || ' backup retention period set to ' || backup_retention_period || '.' AS reason,
2427
region,
2528
account_id
26-
FROM
27-
aws_rds_db_instance;
29+
FROM aws_rds_db_instance;
2830
Severity: medium
2931
Tags:
3032
platform_score_cloud_service_name:
@@ -35,4 +37,3 @@ Tags:
3537
- AWS Relational Database Service (RDS)
3638
score_tags:
3739
- Missing Backup
38-
Title: AWS RDS Database Instances have a minimum acceptable backup policy

0 commit comments

Comments
 (0)