Hello. I was using Terraform AWS provider resource aws_cloudfront_distribution and it allows to configure Standard logging using argument block logging_config{} . I know that CloudFront provides two versions of Standard (Access) logs: Legacy and v2.
I was curious, what version does this argument block logging_config uses ? And if it uses v2 how can I use legacy for example and vice versa ?
The latest documentation shows that the logging_config block is using the Legacy.
The logging configuration that controls how logs are written to your distribution (maximum one). AWS provides two versions of access logs for CloudFront: Legacy and v2. This argument configures legacy version standard logs.
I have actually added this documentation myself by Pull Request to AWS provider repository. It turns out this is legacy version and v2 is not implemented yet. And for Real-time logs there is a separate resource aws_cloudfront_realtime_log_config{}.