Skip to content

Commit

Permalink
Set log retention policy to 7 days
Browse files Browse the repository at this point in the history
  • Loading branch information
varunch77 committed Jan 24, 2025
1 parent 6293de5 commit d1f8797
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion test/cloudwatchlogs/resources/config_auto_removal.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion test/cloudwatchlogs/resources/config_log.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion test/cloudwatchlogs/resources/config_log_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"type": "include",
"expression": "foo"
}
]
],
"retention_in_days": 7
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion test/cloudwatchlogs/resources/config_log_rotated.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down

0 comments on commit d1f8797

Please sign in to comment.