Description
retention_period controls how long a Simple Log Service Logstore keeps records.
Potential impact
A short retention period can erase the records needed to investigate an outage or complete an audit.
Remediation
Set enough days to cover your investigation and audit requirements, then verify the period in the Logstore properties. Account for storage costs and restrict access to the logs.
Examples
The example extends retention from 60 to 91 days. If your policy requires at least 90 days, 90 meets that minimum.
Before
hcl
resource "alicloud_log_store" "example" {
project = alicloud_log_project.example.name
name = "tf-log-store"
retention_period = 60
shard_count = 3
auto_split = true
max_split_shard_count = 60
append_meta = true
}
After
hcl
resource "alicloud_log_store" "example" {
project = alicloud_log_project.example.name
name = "tf-log-store"
retention_period = 91
shard_count = 3
auto_split = true
max_split_shard_count = 60
append_meta = true
}