You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,6 +178,7 @@ Available targets:
178
178
| cors\_expose\_headers | List of expose header in the response for S3 bucket |`list(string)`| <pre>[<br> "ETag"<br>]</pre> | no |
179
179
| cors\_max\_age\_seconds | Time in seconds that browser can cache the response for S3 bucket |`number`|`3600`| no |
180
180
| custom\_error\_response | List of one or more custom error response element maps | <pre>list(object({<br> error_caching_min_ttl = string<br> error_code = string<br> response_code = string<br> response_page_path = string<br> }))</pre> |`[]`| no |
181
+
| custom\_origins | One or more custom origins for this distribution (multiples allowed). See documentation for configuration options description https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#origin-arguments| <pre>list(object({<br> domain_name = string<br> origin_id = string<br> origin_path = string<br> custom_origin_config = object({<br> http_port = number<br> https_port = number<br> origin_protocol_policy = string<br> origin_ssl_protocols = list(string)<br> origin_keepalive_timeout = number<br> origin_read_timeout = number<br> })<br> }))</pre> |`[]`| no |
181
182
| default\_root\_object | Object that CloudFront return when requests the root URL |`string`|`"index.html"`| no |
182
183
| default\_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache |`number`|`60`| no |
183
184
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes`|`string`|`"-"`| no |
@@ -206,7 +207,7 @@ Available targets:
206
207
| minimum\_protocol\_version | Cloudfront TLS minimum protocol version |`string`|`"TLSv1"`| no |
207
208
| name | Name (e.g. `bastion` or `app`) |`string`| n/a | yes |
208
209
| namespace | Namespace (e.g. `eg` or `cp`) |`string`|`""`| no |
209
-
| ordered\_cache | An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0.<br>The fields can be described by the other variables in this file. For example, the field 'lambda\_function\_association' in this object has<br>a description in var.lambda\_function\_association variable earlier in this file. The only difference is that fields on this object are in ordered caches, whereas the rest<br>of the vars in this file apply only to the default cache. | <pre>list(object({<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br> }))</pre> | `[]` | no |
210
+
| ordered\_cache | An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0.<br>The fields can be described by the other variables in this file. For example, the field 'lambda\_function\_association' in this object has<br>a description in var.lambda\_function\_association variable earlier in this file. The only difference is that fields on this object are in ordered caches, whereas the rest<br>of the vars in this file apply only to the default cache. Put value `""` on field `target_origin_id` to specify default s3 bucket origin. | <pre>list(object({<br> target_origin_id = string<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br> }))</pre> | `[]` | no |
210
211
| origin\_bucket | Origin S3 bucket name |`string`|`""`| no |
211
212
| origin\_force\_destroy | Delete all objects from the bucket so that the bucket can be destroyed without error (e.g. `true` or `false`) |`bool`|`false`| no |
212
213
| origin\_path | An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. It must begin with a /. Do not add a / at the end of the path. |`string`|`""`| no |
Copy file name to clipboardExpand all lines: docs/terraform.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@
34
34
| cors\_expose\_headers | List of expose header in the response for S3 bucket |`list(string)`| <pre>[<br> "ETag"<br>]</pre> | no |
35
35
| cors\_max\_age\_seconds | Time in seconds that browser can cache the response for S3 bucket |`number`|`3600`| no |
36
36
| custom\_error\_response | List of one or more custom error response element maps | <pre>list(object({<br> error_caching_min_ttl = string<br> error_code = string<br> response_code = string<br> response_page_path = string<br> }))</pre> |`[]`| no |
37
+
| custom\_origins | One or more custom origins for this distribution (multiples allowed). See documentation for configuration options description https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#origin-arguments| <pre>list(object({<br> domain_name = string<br> origin_id = string<br> origin_path = string<br> custom_origin_config = object({<br> http_port = number<br> https_port = number<br> origin_protocol_policy = string<br> origin_ssl_protocols = list(string)<br> origin_keepalive_timeout = number<br> origin_read_timeout = number<br> })<br> }))</pre> |`[]`| no |
37
38
| default\_root\_object | Object that CloudFront return when requests the root URL |`string`|`"index.html"`| no |
38
39
| default\_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache |`number`|`60`| no |
39
40
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes`|`string`|`"-"`| no |
@@ -62,7 +63,7 @@
62
63
| minimum\_protocol\_version | Cloudfront TLS minimum protocol version |`string`|`"TLSv1"`| no |
63
64
| name | Name (e.g. `bastion` or `app`) |`string`| n/a | yes |
64
65
| namespace | Namespace (e.g. `eg` or `cp`) |`string`|`""`| no |
65
-
| ordered\_cache | An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0.<br>The fields can be described by the other variables in this file. For example, the field 'lambda\_function\_association' in this object has<br>a description in var.lambda\_function\_association variable earlier in this file. The only difference is that fields on this object are in ordered caches, whereas the rest<br>of the vars in this file apply only to the default cache. | <pre>list(object({<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br> }))</pre> | `[]` | no |
66
+
| ordered\_cache | An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0.<br>The fields can be described by the other variables in this file. For example, the field 'lambda\_function\_association' in this object has<br>a description in var.lambda\_function\_association variable earlier in this file. The only difference is that fields on this object are in ordered caches, whereas the rest<br>of the vars in this file apply only to the default cache. Put value `""` on field `target_origin_id` to specify default s3 bucket origin. | <pre>list(object({<br> target_origin_id = string<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br> }))</pre> | `[]` | no |
66
67
| origin\_bucket | Origin S3 bucket name |`string`|`""`| no |
67
68
| origin\_force\_destroy | Delete all objects from the bucket so that the bucket can be destroyed without error (e.g. `true` or `false`) |`bool`|`false`| no |
68
69
| origin\_path | An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. It must begin with a /. Do not add a / at the end of the path. |`string`|`""`| no |
Copy file name to clipboardExpand all lines: variables.tf
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -386,7 +386,8 @@ variable "ipv6_enabled" {
386
386
387
387
variable"ordered_cache" {
388
388
type=list(object({
389
-
path_pattern =string
389
+
target_origin_id =string
390
+
path_pattern =string
390
391
391
392
allowed_methods =list(string)
392
393
cached_methods =list(string)
@@ -412,10 +413,28 @@ variable "ordered_cache" {
412
413
An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0.
413
414
The fields can be described by the other variables in this file. For example, the field 'lambda_function_association' in this object has
414
415
a description in var.lambda_function_association variable earlier in this file. The only difference is that fields on this object are in ordered caches, whereas the rest
415
-
of the vars in this file apply only to the default cache.
416
+
of the vars in this file apply only to the default cache. Put value `""` on field `target_origin_id` to specify default s3 bucket origin.
416
417
DESCRIPTION
417
418
}
418
419
420
+
variable"custom_origins" {
421
+
type=list(object({
422
+
domain_name =string
423
+
origin_id =string
424
+
origin_path =string
425
+
custom_origin_config =object({
426
+
http_port =number
427
+
https_port =number
428
+
origin_protocol_policy =string
429
+
origin_ssl_protocols =list(string)
430
+
origin_keepalive_timeout =number
431
+
origin_read_timeout =number
432
+
})
433
+
}))
434
+
default=[]
435
+
description="One or more custom origins for this distribution (multiples allowed). See documentation for configuration options description https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#origin-arguments"
0 commit comments