Ensure Alibaba Cloud RDS Instance SQL Collector Retention Period should be greater than 180

Error: Alibaba Cloud RDS Instance SQL Collector Retention Period is less than 180

Bridgecrew Policy ID: BC_ALI_LOGGING_3
Checkov Check ID: CKV_ALI_25
Severity: LOW

Alibaba Cloud RDS Instance SQL Collector Retention Period is less than 180

Description

The SQL Collector is a feature of RDS that allows you to collect and analyze SQL performance data for your instance. The SQL Collector Retention Period is the length of time that SQL performance data is retained in the RDS instance.

By setting the SQL Collector Retention Period to a value greater than 180, you can ensure that the instance has a longer history of SQL performance data, which can be useful for troubleshooting and performance optimization.

Fix - Buildtime

Terraform

resource "alicloud_db_instance" "pass" {
  engine                     = "MySQL"
  engine_version             = "5.6"
  instance_type              = "rds.mysql.t1.small"
  instance_storage           = "10"
  sql_collector_status       = "Enabled"
  sql_collector_config_value = 180
  parameters = [{
    name  = "innodb_large_prefix"
    value = "ON"
    }, {
    name  = "connect_timeout"
    value = "50"
    }, {
    name  = "log_connections"
    value = "ON"
  }]
}