Review Alibaba Cloud ActionTrail log coverage

Include the required regions and read and write events in audit logs.

Description

Choose the regions and event types that your Alibaba Cloud ActionTrail trail must cover.

Potential impact

A single-region trail can leave you without records of changes elsewhere.

Remediation

For supported read and write events across regions, set trail_region and event_rw to All. Grant access to the OSS or Simple Log Service destination, start logging and verify delivery and retention. Configure any required data events separately.

Examples

The example expands cn-hangzhou to all regions. event_rw is already All. Supply the OSS bucket name and the ARN of a role that can write to it.

Before

hcl
resource "alicloud_actiontrail_trail" "actiontrail" {
  trail_name         = "action-trail"
  oss_write_role_arn = var.oss_write_role_arn
  oss_bucket_name    = var.oss_bucket_name
  event_rw           = "All"
  trail_region       = "cn-hangzhou"
}

After

hcl
resource "alicloud_actiontrail_trail" "actiontrail" {
  trail_name         = "action-trail"
  oss_write_role_arn = var.oss_write_role_arn
  oss_bucket_name    = var.oss_bucket_name
  event_rw           = "All"
  trail_region       = "All"
}

References