github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/avd_docs/aws/cloudfront/AVD-AWS-0012/Terraform.md (about)

     1  
     2  Only allow HTTPS for CloudFront distribution communication
     3  
     4  ```hcl
     5   resource "aws_cloudfront_distribution" "good_example" {
     6   	default_cache_behavior {
     7   	    viewer_protocol_policy = "redirect-to-https"
     8   	  }
     9   }
    10   
    11  ```
    12  
    13  #### Remediation Links
    14   - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#viewer_protocol_policy
    15