<commit_before>resource "aws_cloudfront_distribution" "frontend_distribution" {
  origin {
    domain_name = "${aws_s3_bucket.frontend.bucket_domain_name}"
    origin_id   = "s3_frontend_origin"

    # s3_origin_config {
    #   origin_access_identity = "origin-access-identity/cloudfront/ABCDEFG1234567"
    # }
  }

  enabled             = true
  is_ipv6_enabled     = true
  comment             = "CloudFront distribution with default SSL for frontend"
  default_root_object = "index.html"

  aliases = ["${var.DOMAIN}"]

  default_cache_behavior {
    allowed_methods  = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"]
    cached_methods   = ["GET", "HEAD"]
    target_origin_id = "s3_frontend_origin"

    forwarded_values {
      query_string = false

      cookies {
        forward = "none"
      }
    }

    viewer_protocol_policy = "allow-all"
    min_ttl                = 0
    default_ttl            = 60 // Short TTL since we are using it for STAGE and CI/CD
    max_ttl                = 300 // Short TTL since we are using it for STAGE and CI/CD
  }

  price_class = "PriceClass_100" // Only availbale in US

  restrictions {
    geo_restriction {
      restriction_type = "whitelist"
      locations        = ["US"] // Only availbale in US
    }
  }

  viewer_certificate {
    cloudfront_default_certificate = true
  }<commit_msg>DEVOPS - Updated Cloudfront TTLs to be 5' and 10' (max)<commit_after>resource "aws_cloudfront_distribution" "frontend_distribution" {
  origin {
    domain_name = "${aws_s3_bucket.frontend.bucket_domain_name}"
    origin_id   = "s3_frontend_origin"

    # s3_origin_config {
    #   origin_access_identity = "origin-access-identity/cloudfront/ABCDEFG1234567"
    # }
  }

  enabled             = true
  is_ipv6_enabled     = true
  comment             = "CloudFront distribution with default SSL for frontend"
  default_root_object = "index.html"

  aliases = ["${var.DOMAIN}"]

  default_cache_behavior {
    allowed_methods  = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"]
    cached_methods   = ["GET", "HEAD"]
    target_origin_id = "s3_frontend_origin"

    forwarded_values {
      query_string = false

      cookies {
        forward = "none"
      }
    }

    viewer_protocol_policy = "allow-all"
    min_ttl                = 0
    default_ttl            = 300 // Short TTL since we are using it for STAGE and CI/CD
    max_ttl                = 600 // Short TTL since we are using it for STAGE and CI/CD
  }

  price_class = "PriceClass_100" // Only availbale in US

  restrictions {
    geo_restriction {
      restriction_type = "whitelist"
      locations        = ["US"] // Only availbale in US
    }
  }

  viewer_certificate {
    cloudfront_default_certificate = true
  }
{'fraction_non_alphanumeric': 0.09591024249004705, 'fraction_numerical': 0.016648570394498734, 'mean_word_length': 2.5255102040816326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3083875', 'n_tokens_mistral': 950, 'n_tokens_neox': 882, 'n_words': 201}