From d1f8797b112fea7bcea1e898563031d41413c75e Mon Sep 17 00:00:00 2001 From: Varun C Date: Fri, 24 Jan 2025 23:09:20 +0000 Subject: [PATCH] Set log retention policy to 7 days --- test/cloudwatchlogs/resources/config_auto_removal.json | 3 ++- test/cloudwatchlogs/resources/config_log.json | 3 ++- test/cloudwatchlogs/resources/config_log_filter.json | 3 ++- .../cloudwatchlogs/resources/config_log_infrequent_access.json | 3 ++- .../resources/config_log_no_class_specification.json | 3 ++- test/cloudwatchlogs/resources/config_log_rotated.json | 3 ++- test/cloudwatchlogs/resources/config_log_standard_access.json | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/test/cloudwatchlogs/resources/config_auto_removal.json b/test/cloudwatchlogs/resources/config_auto_removal.json index acec8efaf..cfdf7a653 100644 --- a/test/cloudwatchlogs/resources/config_auto_removal.json +++ b/test/cloudwatchlogs/resources/config_auto_removal.json @@ -11,7 +11,8 @@ "log_group_name": "{instance_id}", "log_stream_name": "{instance_id}", "timezone": "UTC", - "auto_removal": true + "auto_removal": true, + "retention_in_days": 7 } ] } diff --git a/test/cloudwatchlogs/resources/config_log.json b/test/cloudwatchlogs/resources/config_log.json index 0cb8fbb4f..c0b690bb6 100644 --- a/test/cloudwatchlogs/resources/config_log.json +++ b/test/cloudwatchlogs/resources/config_log.json @@ -11,7 +11,8 @@ "file_path": "/tmp/cwagent_log_test.log", "log_group_name": "{instance_id}", "log_stream_name": "{instance_id}", - "timezone": "UTC" + "timezone": "UTC", + "retention_in_days": 7 } ] } diff --git a/test/cloudwatchlogs/resources/config_log_filter.json b/test/cloudwatchlogs/resources/config_log_filter.json index 20d4b7aaa..d287a8f85 100644 --- a/test/cloudwatchlogs/resources/config_log_filter.json +++ b/test/cloudwatchlogs/resources/config_log_filter.json @@ -17,7 +17,8 @@ "type": "include", "expression": "foo" } - ] + ], + "retention_in_days": 7 } ] } diff --git a/test/cloudwatchlogs/resources/config_log_infrequent_access.json b/test/cloudwatchlogs/resources/config_log_infrequent_access.json index a79b0f431..e441c2d9b 100644 --- a/test/cloudwatchlogs/resources/config_log_infrequent_access.json +++ b/test/cloudwatchlogs/resources/config_log_infrequent_access.json @@ -12,7 +12,8 @@ "log_group_name": "infrequent_access-{instance_id}", "log_stream_name": "{instance_id}", "timezone": "UTC", - "log_group_class": "INFREQUENT_ACCESS" + "log_group_class": "INFREQUENT_ACCESS", + "retention_in_days": 7 } ] } diff --git a/test/cloudwatchlogs/resources/config_log_no_class_specification.json b/test/cloudwatchlogs/resources/config_log_no_class_specification.json index 2d9b239b0..73d54175b 100644 --- a/test/cloudwatchlogs/resources/config_log_no_class_specification.json +++ b/test/cloudwatchlogs/resources/config_log_no_class_specification.json @@ -11,7 +11,8 @@ "file_path": "/tmp/cwagent_log_test.log", "log_group_name": "standard-no-specification-{instance_id}", "log_stream_name": "{instance_id}", - "timezone": "UTC" + "timezone": "UTC", + "retention_in_days": 7 } ] } diff --git a/test/cloudwatchlogs/resources/config_log_rotated.json b/test/cloudwatchlogs/resources/config_log_rotated.json index 35d8fffe6..810d0f237 100644 --- a/test/cloudwatchlogs/resources/config_log_rotated.json +++ b/test/cloudwatchlogs/resources/config_log_rotated.json @@ -11,7 +11,8 @@ "file_path": "/tmp/rotate_me.log*", "log_group_name": "{instance_id}", "log_stream_name": "{instance_id}Rotated", - "timezone": "UTC" + "timezone": "UTC", + "retention_in_days": 7 } ] } diff --git a/test/cloudwatchlogs/resources/config_log_standard_access.json b/test/cloudwatchlogs/resources/config_log_standard_access.json index 5cba798eb..5e534874e 100644 --- a/test/cloudwatchlogs/resources/config_log_standard_access.json +++ b/test/cloudwatchlogs/resources/config_log_standard_access.json @@ -12,7 +12,8 @@ "log_group_name": "standard-with-specification-{instance_id}", "log_stream_name": "{instance_id}", "timezone": "UTC", - "log_group_class": "STANDARD" + "log_group_class": "STANDARD", + "retention_in_days": 7 } ] }