Skip to content

Conversation

@clark42
Copy link

@clark42 clark42 commented Dec 8, 2025

Description

Add support for CloudFront Standard Logging using CloudWatch Log Delivery resources. This replaces the legacy logging_config and allows logging to S3, CloudWatch Logs, or Firehose as destinations.

Standard logging is automatically enabled when std_logging_destination or std_logging_destination_arn is provided (no separate enable flag needed).

New variables:

  • std_logging_region - Region for logging resources (default: us-east-1)
  • std_logging_source_name - Optional custom name for delivery source
  • std_logging_destination_arn - Use existing destination (skip creation)
  • std_logging_destination - Destination configuration (name, output_format, destination_arn)
  • std_logging_delivery - Delivery configuration (field_delimiter, record_fields, s3_delivery_configuration)

New outputs:

  • cloudfront_std_logging_source_arn
  • cloudfront_std_logging_source_name
  • cloudfront_std_logging_destination_arn
  • cloudfront_std_logging_delivery_id
  • cloudfront_std_logging_delivery_arn

Motivation and Context

AWS announced CloudFront Standard Logging in November 2024, providing significant improvements over legacy logging:

  • Support for multiple destinations: S3, CloudWatch Logs, Firehose
  • Multiple output formats: JSON, Parquet, Plain, W3C, Raw
  • Hive-compatible S3 paths for better integration with analytics tools
  • Customizable record fields
  • Ability to send logs to opt-in AWS regions

Related:

Breaking Changes

No breaking changes. This is an additive feature. Existing logging_config (legacy logging) continues to work unchanged.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Add support for CloudFront Standard Logging using CloudWatch Log Delivery resources.
This replaces the legacy logging_config and allows logging to S3, CloudWatch Logs,
or Firehose as destinations.

Standard logging is automatically enabled when std_logging_destination or
std_logging_destination_arn is provided (no separate enable flag needed).

New variables:
- std_logging_region: region for logging resources (default: us-east-1)
- std_logging_source_name: optional custom name for delivery source
- std_logging_destination_arn: use existing destination (skip creation)
- std_logging_destination: destination configuration (name, output_format, destination_arn)
- std_logging_delivery: delivery configuration (field_delimiter, record_fields, s3_delivery_configuration)

New outputs:
- cloudfront_std_logging_source_arn
- cloudfront_std_logging_source_name
- cloudfront_std_logging_destination_arn
- cloudfront_std_logging_delivery_id
- cloudfront_std_logging_delivery_arn
@clark42 clark42 changed the title feat: add support for CloudFront Standard Logging feat: Add support for CloudFront Standard Logging Dec 8, 2025
…types

- Remove dedicated tags from logging variables, use var.tags instead
- Add delivery_destination_type parameter for X-Ray trace delivery support
- Make destination_arn optional (not required for X-Ray)
- Make delivery_destination_configuration a dynamic block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant