@@ -5,19 +5,25 @@ If you find a bug, please open an issue with supporting configuration to reprodu
55
66## List of backwards incompatible changes
77
8- - AWS provider ` v6.0 ` is now minimum supported version
8+ - AWS provider ` v6.20 ` is now minimum supported version
99- Support for ` aws_cloudfront_origin_access_identity ` has been removed in favor of ` aws_cloudfront_origin_access_control `
1010
1111## Additional changes
1212
1313### Added
1414
15- - Support for ` region ` parameter to specify the AWS region for the resources created if different from the provider region.
15+ - None
1616
1717### Modified
1818
19- - Variable definitions now contain detailed ` object ` types in place of the previously used any type.
20- - ` is_ipv6_enabled ` now defaults to ` true ` if not specified.
19+ - Variable definitions now contain detailed ` object ` types in place of the previously used any type
20+ - ` is_ipv6_enabled ` now defaults to ` true ` if not specified
21+ - ` default_cache_behavior.compress ` and ` ordered_cache_behavior.compress ` now default to ` true `
22+ - ` origin.origin_ssl_protocols ` now defaults to ` ["TLSv1.2"] `
23+ - ` vpc_origin.origin_ssl_protocols.items ` now defaults to ` ["TLSv1.2"] `
24+ - ` vpc_origin_timeouts ` is now embedded under ` vpc_origin `
25+ - ` viewer_certificate.minimum_protocol_version ` now defaults to ` "TLSv1.2_2025" `
26+ - See the the ` Before vs After ` examples below for more details on variable type definition changes
2127
2228### Variable and output changes
2329
@@ -50,7 +56,7 @@ If you find a bug, please open an issue with supporting configuration to reprodu
5056
51575 . Renamed outputs:
5258
53- -
59+ - None
5460
55616 . Added outputs:
5662
@@ -67,6 +73,58 @@ module "cloudfront" {
6773
6874 # Truncated for brevity ...
6975
76+ create_vpc_origin = true
77+ vpc_origin = {
78+ ec2 = {
79+ arn = module.ec2.arn
80+ http_port = 80
81+ https_port = 443
82+ origin_protocol_policy = "http-only"
83+ origin_ssl_protocols = {
84+ items = ["TLSv1.2"]
85+ quantity = 1
86+ }
87+ }
88+ }
89+
90+ vpc_origin_timeouts = {
91+ create = "20m"
92+ update = "20m"
93+ delete = "20m"
94+ }
95+
96+ origin = {
97+ s3 = {
98+ domain_name = module.s3.bucket_regional_domain_name
99+ s3_origin_config = {
100+ origin_access_identity = "s3_bucket_one"
101+ }
102+
103+ custom_header = [
104+ {
105+ name = "X-Forwarded-Scheme"
106+ value = "https"
107+ },
108+ {
109+ name = "X-Frame-Options"
110+ value = "SAMEORIGIN"
111+ }
112+ ]
113+ }
114+ }
115+
116+ origin_group = {
117+ group_one = {
118+ failover_status_codes = [403, 404, 500, 502]
119+ primary_member_origin_id = "appsync" # Not shown
120+ secondary_member_origin_id = "s3"
121+ }
122+ }
123+
124+ geo_restriction = {
125+ restriction_type = "whitelist"
126+ locations = ["NO", "UA", "US", "GB"]
127+ }
70128}
71129```
72130
@@ -79,9 +137,60 @@ module "cloudfront" {
79137
80138 # Truncated for brevity ...
81139
140+ vpc_origin = {
141+ ec2 = {
142+ arn = module.ec2.arn
143+ http_port = 80
144+ https_port = 443
145+ origin_protocol_policy = "http-only"
146+ origin_ssl_protocols = {
147+ items = ["TLSv1.2"]
148+ quantity = 1
149+ }
150+
151+ timeouts = {
152+ create = "20m"
153+ update = "20m"
154+ delete = "20m"
155+ }
156+ }
157+ }
158+
159+ origin = {
160+ s3 = {
161+ domain_name = module.s3.bucket_regional_domain_name
162+ s3_origin_config = {
163+ origin_access_control_key = "s3_bucket_one"
164+ }
165+
166+ custom_header = {
167+ "X-Forwarded-Scheme" = "https"
168+ "X-Frame-Options" = "SAMEORIGIN"
169+ }
170+ }
171+ }
172+
173+ origin_group = {
174+ group-one = {
175+ failover_criteria = {
176+ status_codes = [403, 404, 500, 502]
177+ }
178+ member = [
179+ { origin_id = "appsync" }, # Not shown
180+ { origin_id = "s3" }
181+ ]
182+ }
183+ }
184+
185+ restrictions = {
186+ geo_restriction = {
187+ restriction_type = "whitelist"
188+ locations = ["NO", "UA", "US", "GB"]
189+ }
190+ }
82191}
83192```
84193
85194### State Changes
86195
87- TBD
196+ None
0 commit comments