Ce produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Metadata

Id: terraform-alicloud-oss-bucket-logging-disabled

Provider: Alicloud

Platform: Terraform

Severity: Medium

Category: Observability

Learn More

Description

OSS buckets should have logging enabled to improve visibility into resource and object access. The alicloud_oss_bucket resource must include a logging block with logging_isenable set to true. If the logging block is missing or logging_isenable is false, access logging is not enabled. To remediate, add the block or update logging_isenable from false to true.

Compliant Code Examples

resource "alicloud_oss_bucket" "bucket_logging1" {
  bucket = "bucket-170309-logging"

  logging {
    target_bucket = alicloud_oss_bucket.bucket-target.id
    target_prefix = "log/"
  }
}

Non-Compliant Code Examples

resource "alicloud_oss_bucket" "bucket_logging2" {
  bucket = "bucket-170309-acl"
  acl    = "public-read"
}
resource "alicloud_oss_bucket" "bucket_logging1" {
  bucket = "bucket-170309-logging"
  logging_isenable = false

  logging {
    target_bucket = alicloud_oss_bucket.bucket-target.id
    target_prefix = "log/"
  }
}