File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ No modules.
2525
2626| Name | Description | Type | Default | Required |
2727| ------| -------------| ------| ---------| :--------:|
28- | <a name =" input_acm_arn " ></a > [ acm\_ arn] ( #input\_ acm\_ arn ) | ACM cert arn | ` string ` | n/a | yes |
28+ | <a name =" input_acm_arn " ></a > [ acm\_ arn] ( #input\_ acm\_ arn ) | ACM cert arn | ` string ` | n/a | no |
2929| <a name =" input_allowed_methods " ></a > [ allowed\_ methods] ( #input\_ allowed\_ methods ) | Allowed methods | ` list(any) ` | <pre >[ <br > "GET",<br > "HEAD"<br >] </pre > | no |
3030| <a name =" input_cache_policy_id " ></a > [ cache\_ policy\_ id] ( #input\_ cache\_ policy\_ id ) | AWS managed cache policy id | ` string ` | ` "" ` | no |
3131| <a name =" input_cached_methods " ></a > [ cached\_ methods] ( #input\_ cached\_ methods ) | Cached methods | ` list(any) ` | <pre >[ <br > "GET",<br > "HEAD"<br >] </pre > | no |
@@ -42,6 +42,9 @@ No modules.
4242| <a name =" input_origin " ></a > [ origin] ( #input\_ origin ) | Origin configuration | ` any ` | n/a | yes |
4343| <a name =" input_route53_zone_id " ></a > [ route53\_ zone\_ id] ( #input\_ route53\_ zone\_ id ) | Route53 zone id | ` string ` | ` "" ` | no |
4444| <a name =" input_web_acl_id " ></a > [ web\_ acl\_ id] ( #input\_ web\_ acl\_ id ) | WAF web ACL id | ` string ` | ` "" ` | no |
45+ | <a name =" input_min_ttl " ></a > [ min\_ ttl] ( #input\_ min\_ ttl ) | min ttl | ` number ` | 0 | no |
46+ | <a name =" input_max_ttl " ></a > [ max\_ ttl] ( #input\_ max\_ ttl ) | max ttl | ` number ` | 86400 | no |
47+ | <a name =" input_default_ttl " ></a > [ default\_ ttl] ( #input\_ default\_ ttl ) | default ttl | ` number ` | 3600 | no |
4548
4649## Outputs
4750
Original file line number Diff line number Diff line change @@ -60,9 +60,9 @@ resource "aws_cloudfront_distribution" "cloudfront" {
6060
6161 viewer_protocol_policy = " redirect-to-https"
6262 compress = true
63- min_ttl = 0
64- default_ttl = 3600
65- max_ttl = 86400
63+ min_ttl = var . min_ttl
64+ max_ttl = var . max_ttl
65+ default_ttl = var . default_ttl
6666
6767 dynamic "forwarded_values" {
6868 for_each = var. cache_policy_id != " " ? [] : [1 ]
Original file line number Diff line number Diff line change @@ -96,4 +96,22 @@ variable "ipv6" {
9696 description = " ipv6 status"
9797 type = bool
9898 default = false
99+ }
100+
101+ variable "min_ttl" {
102+ description = " minimum ttl value for caching"
103+ type = number
104+ default = 0
105+ }
106+
107+ variable "max_ttl" {
108+ description = " maximum ttl value for caching"
109+ type = number
110+ default = 86400
111+ }
112+
113+ variable "default_ttl" {
114+ description = " default ttl value for caching"
115+ type = number
116+ default = 3600
99117}
You can’t perform that action at this time.
0 commit comments