cloudposse / terraform-aws-cloudfront-cdn

Terraform Module that implements a CloudFront Distribution (CDN) for a custom origin.
https://cloudposse.com/accelerate
Apache License 2.0
99 stars 121 forks source link

Cant use cache_policy_id, because another parameters are required #59

Open ByJacob opened 3 years ago

ByJacob commented 3 years ago

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

When try use cache_policy_id i got error Error: error creating CloudFront Distribution: InvalidArgument: The parameter ForwardedValues cannot be used when a cache policy is associated to the cache behavior. status code: 400, request id: 9421ef45-20d3-4824-8e69-9b4e9c43af87 But when i try set null in forward parameters i get error:

Error: expected ordered_cache_behavior.0.forwarded_values.0.cookies.0.forward to be one of [all none whitelist], got 

Expected Behavior

CDN will implement with set policy

Steps to Reproduce

Steps to reproduce the behavior:

  1. Configure cdn (https://github.com/cloudposse/terraform-aws-cloudfront-cdn/tree/master/examples/wordpress)
  2. Set cache_policy_id to 4135ea2d-6df8-44a3-9df3-4b5a84be39ad
  3. terraform apply

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

Additional Context

Add any other context about the problem here.