forked from cloudposse/terraform-aws-cloudfront-cdn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
243 lines (196 loc) · 7.1 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
variable "name" {
description = "Name (e.g. `bastion` or `db`)"
}
variable "namespace" {
description = "Namespace (e.g. `cp` or `cloudposse`)"
}
variable "stage" {
description = "Stage (e.g. `prod`, `dev`, `staging`)"
}
variable "attributes" {
type = "list"
default = []
description = "Additional attributes (e.g. `policy` or `role`)"
}
variable "tags" {
type = "map"
default = {}
description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`)"
}
variable "delimiter" {
default = "-"
description = "Delimiter to be used between `name`, `namespace`, `stage`, etc."
}
variable "enabled" {
default = "true"
description = "Set to false to prevent the module from creating any resources"
}
variable "dns_aliases_enabled" {
default = "true"
description = "Set to false to prevent dns records for aliases from being created"
}
variable "acm_certificate_arn" {
description = "Existing ACM Certificate ARN"
default = ""
}
variable "aliases" {
type = "list"
default = []
description = "List of aliases. CAUTION! Names MUSTN'T contain trailing `.`"
}
variable "custom_error_response" {
# http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html#custom-error-pages-procedure
# https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#custom-error-response-arguments
description = "(Optional) - List of one or more custom error response element maps"
type = "list"
default = []
}
variable "web_acl_id" {
description = "(Optional) - Web ACL ID that can be attached to the Cloudfront distribution"
default = ""
}
variable "origin_domain_name" {
description = "(Required) - The DNS domain name of your custom origin (e.g. website)"
default = ""
}
variable "origin_path" {
description = "(Optional) - An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin"
default = ""
}
variable "origin_http_port" {
description = "(Required) - The HTTP port the custom origin listens on"
default = "80"
}
variable "origin_https_port" {
description = "(Required) - The HTTPS port the custom origin listens on"
default = "443"
}
variable "origin_protocol_policy" {
description = "(Required) - The origin protocol policy to apply to your origin. One of http-only, https-only, or match-viewer"
default = "match-viewer"
}
variable "origin_ssl_protocols" {
description = "(Required) - The SSL/TLS protocols that you want CloudFront to use when communicating with your origin over HTTPS"
type = "list"
default = ["TLSv1", "TLSv1.1", "TLSv1.2"]
}
variable "origin_keepalive_timeout" {
description = "(Optional) The Custom KeepAlive timeout, in seconds. By default, AWS enforces a limit of 60. But you can request an increase."
default = "60"
}
variable "origin_read_timeout" {
description = "(Optional) The Custom Read timeout, in seconds. By default, AWS enforces a limit of 60. But you can request an increase."
default = "60"
}
variable "compress" {
description = "(Optional) Whether you want CloudFront to automatically compress content for web requests that include Accept-Encoding: gzip in the request header (default: false)"
default = "false"
}
variable "is_ipv6_enabled" {
default = "true"
description = "State of CloudFront IPv6"
}
variable "default_root_object" {
default = "index.html"
description = "Object that CloudFront return when requests the root URL"
}
variable "comment" {
default = "Managed by Terraform"
description = "Comment for the origin access identity"
}
variable "log_include_cookies" {
default = "false"
description = "Include cookies in access logs"
}
variable "log_prefix" {
default = ""
description = "Path of logs in S3 bucket"
}
variable "log_standard_transition_days" {
description = "Number of days to persist in the standard storage tier before moving to the glacier tier"
default = "30"
}
variable "log_glacier_transition_days" {
description = "Number of days after which to move the data to the glacier storage tier"
default = "60"
}
variable "log_expiration_days" {
description = "Number of days after which to expunge the objects"
default = "90"
}
variable "forward_query_string" {
default = "false"
description = "Forward query strings to the origin that is associated with this cache behavior"
}
variable "forward_headers" {
description = "Specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior. Specify `*` to include all headers."
type = "list"
default = []
}
variable "forward_cookies" {
description = "Specifies whether you want CloudFront to forward cookies to the origin. Valid options are all, none or whitelist"
default = "none"
}
variable "forward_cookies_whitelisted_names" {
type = "list"
description = "List of forwarded cookie names"
default = []
}
variable "price_class" {
default = "PriceClass_100"
description = "Price class for this distribution: `PriceClass_All`, `PriceClass_200`, `PriceClass_100`"
}
variable "viewer_minimum_protocol_version" {
description = "(Optional) The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections."
default = "TLSv1"
}
variable "viewer_protocol_policy" {
description = "allow-all, redirect-to-https"
default = "redirect-to-https"
}
variable "allowed_methods" {
type = "list"
default = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"]
description = "List of allowed methods (e.g. ` GET, PUT, POST, DELETE, HEAD`) for AWS CloudFront"
}
variable "cached_methods" {
type = "list"
default = ["GET", "HEAD"]
description = "List of cached methods (e.g. ` GET, PUT, POST, DELETE, HEAD`)"
}
variable "default_ttl" {
default = "60"
description = "Default amount of time (in seconds) that an object is in a CloudFront cache"
}
variable "min_ttl" {
default = "0"
description = "Minimum amount of time that you want objects to stay in CloudFront caches"
}
variable "max_ttl" {
default = "31536000"
description = "Maximum amount of time (in seconds) that an object is in a CloudFront cache"
}
variable "geo_restriction_type" {
# e.g. "whitelist"
default = "none"
description = "Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist`"
}
variable "geo_restriction_locations" {
type = "list"
# e.g. ["US", "CA", "GB", "DE"]
default = []
description = "List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist)"
}
variable "parent_zone_id" {
default = ""
description = " ID of the hosted zone to contain this record (or specify `parent_zone_name`)"
}
variable "parent_zone_name" {
default = ""
description = "Name of the hosted zone to contain this record (or specify `parent_zone_id`)"
}
variable "cache_behavior" {
type = "list"
description = "List of cache behaviors to implement"
default = []
}