Skip to content

Commit 289e18e

Browse files
authored
docs: Add documentation for the use_forwarded_values field (#125)
1 parent 0b9abe7 commit 289e18e

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,30 @@ module "cdn" {
7777
}
7878
```
7979

80-
## Examples:
80+
## Examples
8181

8282
- [Complete](https://github.com/terraform-aws-modules/terraform-aws-cloudfront/tree/master/examples/complete) - Complete example which creates AWS CloudFront distribution and integrates it with other [terraform-aws-modules](https://github.com/terraform-aws-modules) to create additional resources: S3 buckets, Lambda Functions, CloudFront Functions, ACM Certificate, Route53 Records.
8383

84+
## Notes
85+
86+
- `Error: updating CloudFront Distribution (ETXXXXXXXXXXXX): InvalidArgument: The parameter ForwardedValues cannot be used when a cache policy is associated to the cache behavior.`
87+
- When defining a behavior in `ordered_cache_behavior` and `default_cache_behavior` with a cache policy, you must specify `use_forwarded_values = false`.
88+
89+
```
90+
ordered_cache_behavior = [{
91+
path_pattern = "/my/path"
92+
target_origin_id = "my-origin"
93+
viewer_protocol_policy = "https-only"
94+
allowed_methods = ["GET", "HEAD"]
95+
use_forwarded_values = false
96+
97+
# AllViewerAndCloudFrontHeaders-2022-06
98+
origin_request_policy_id = "33f36d7e-f396-46d9-90e0-52428a34d9dc"
99+
# CachingDisabled
100+
cache_policy_id = "4135ea2d-6df8-44a3-9df3-4b5a84be39ad"
101+
}]
102+
```
103+
84104
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
85105
## Requirements
86106

0 commit comments

Comments
 (0)