Data Source: aws_cloudfront_log_delivery_canonical_user_id

The CloudFront Log Delivery Canonical User ID data source allows access to the canonical user ID of the AWS awslogsdelivery account for CloudFront bucket logging. See the Amazon CloudFront Developer Guide for more information.

Example Usage

data "aws_cloudfront_log_delivery_canonical_user_id" "example" {}

resource "aws_s3_bucket" "example" {
  bucket = "example"
}

resource "aws_s3_bucket_acl" "example" {
  bucket = aws_s3_bucket.example.id

  access_control_policy {
    grant {
      grantee {
        id   = data.aws_cloudfront_log_delivery_canonical_user_id.example.id
        type = "CanonicalUser"
      }
      permission = "FULL_CONTROL"
    }
  }
}

Argument Reference

This data source supports the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above: