-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvariables.tf
166 lines (137 loc) · 3.74 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
variable "app_name" {
default = ""
}
variable "role" {
default = "cf"
}
variable "environment" {
default = ""
}
variable "enable" {
default = true
}
variable "is_ipv6_enabled" {
default = true
}
variable "comment" {
default = "Cloudfront distribution created by Terraform"
}
variable "default_root_object" {
default = ""
}
variable "aliases" {
default = []
description = "Extra CNAMEs (alternate domain names), if any, for this distribution."
type = list(string)
}
#geo_restriction
variable "restriction_type" {
default = "none"
}
variable "locations" {
type = list(string)
default = []
description = "The ISO 3166-1-alpha-2 codes for which you want CloudFront either to distribute your content: https://www.iso.org/obp/ui/#search"
}
variable "price_class" {
default = "PriceClass_200"
}
variable "cloudfront_default_certificate" {
type = bool
default = true
}
# Logging configuration optional
variable "cloudfront_logging_enabled" {
type = bool
default = false
description = "If true, mandatory values are needed"
}
variable "logging_config" {
default = {
bucket = null
include_cookies = null
prefix = null
}
}
variable "s3_origin_configs" {
type = list(map(string))
description = "Define values for origin or multiple origins"
default = []
}
variable "custom_origin_configs" {
description = "Define values for origin or multiple origins"
default = {
domain_name = ""
origin_id = ""
origin_path = "/"
http_port = "80"
https_port = "443"
origin_keepalive_timeout = 5
origin_read_timeout = 30
origin_protocol_policy = "https-only"
origin_ssl_protocols = ["TLSv1", "TLSv1.1", "TLSv1.2"]
}
}
variable "default_cache_behavior" {
default = {
allowed_methods = ["GET", "HEAD", "OPTIONS"]
cached_methods = ["GET", "HEAD", "OPTIONS"]
target_origin_id = ""
query_string = false
forward = "none"
viewer_protocol_policy = "allow-all"
min_ttl = 0
default_ttl = 3600
max_ttl = 86400
}
}
variable "ordered_cache_behavior_variables" {
default = [
{
path_pattern = "/"
allowed_methods = ["GET", "HEAD", "OPTIONS"]
cached_methods = ["GET", "HEAD", "OPTIONS"]
target_origin_id = ""
min_ttl = 0
default_ttl = 86400
max_ttl = 31536000
compress = true
viewer_protocol_policy = "redirect-to-https"
#forwarded_values
query_string = false
headers = ["Origin"]
forward = "none"
},
{
path_pattern = "/content/test2/*"
allowed_methods = ["GET", "HEAD", "OPTIONS"]
cached_methods = ["GET", "HEAD", "OPTIONS"]
target_origin_id = ""
min_ttl = 0
default_ttl = 86400
max_ttl = 31536000
compress = true
viewer_protocol_policy = "redirect-to-https"
#forwarded_values
query_string = false
headers = ["Origin"]
forward = "none"
},
]
}
variable "waf_web_acl_id" {
description = "The Id of the AWS WAF web ACL that is associated with the distribution. "
default = ""
}
variable "acm_certificate_arn_config" {
default = {
acm_certificate_arn = null
minimum_protocol_version = "TLSv1.1_2016"
ssl_support_method = "sni-only"
}
}
variable "tags" {
description = "A map of tags to add to your cloudfront distribution"
default = {}
type = map
}