-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
185 lines (156 loc) · 4.18 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
variable "domain_zone_id" {
type = string
description = "The ID of the hosted zone for domain"
}
variable "domains" {
type = list(string)
description = "List of domain aliases. You can also specify wildcard eg.: `*.example.com`"
validation {
condition = length(var.domains) >= 1
error_message = "The domains value must contain at least one domain."
}
}
variable "s3_bucket_name" {
type = string
}
variable "s3_bucket_policy" {
type = string
default = "{}"
description = "Additional S3 bucket policy"
}
variable "gitlab_project_ids" {
description = "Integrates with GitLab CI/CD to deploy site and invalidate CloudFront cache"
type = list(string)
default = []
}
variable "gitlab_project_id" {
type = string
description = "Deprecated: Use gitlab_project_ids instead"
default = ""
}
variable "gitlab_environment" {
description = "GitLab environment name"
type = string
default = "*"
}
variable "logs_bucket" {
description = "Bucket to store CloudFront logs"
type = string
default = null
}
variable "logs_bucket_domain_name" {
type = string
default = null
}
variable "cloudfront_price_class" {
description = "CloudFront price class"
type = string
default = "PriceClass_100"
}
variable "override_status_code_404" {
description = "Override status code for 404 error"
type = number
default = 200
}
variable "override_status_code_403" {
description = "Override status code for 403 error"
type = number
default = 403
}
variable "tags" {
type = map(string)
default = {}
}
variable "restriction_type" {
description = "Apply for geo restrictions, values: none, whitelist, blacklist"
type = string
default = "none"
}
variable "restrictions_locations" {
description = "List of country codes"
type = list(string)
default = null
}
variable "proxy_paths" {
type = list(object({
origin_domain = string
path_prefix = string
}))
default = []
}
variable "functions" {
type = object({
viewer_request = optional(string)
viewer_response = optional(string)
})
default = {}
}
variable "enable_deploy_user" {
type = bool
default = true
description = "Toggle s3 deploy user creation"
}
variable "encrypt_with_kms" {
type = bool
default = false
description = "Enable server side s3 bucket encryption with KMS key"
}
variable "kms_deletion_window_in_days" {
type = number
default = 30
description = "The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key"
}
variable "kms_key_policy" {
type = string
default = "{}"
description = "Additional KSM key policy"
}
variable "origin_path" {
type = string
default = ""
description = "Cloudfront origin path"
}
variable "min_ttl" {
description = "Minimum amount of time that you want objects to stay in a CloudFront cache"
type = number
default = 0
}
variable "default_ttl" {
description = "Default amount of time that you want objects to stay in a CloudFront cache"
type = number
default = 3600
}
variable "max_ttl" {
description = "Maximum amount of time that you want objects to stay in a CloudFront cache"
type = number
default = 86400
}
variable "aws_env_vars_suffix" {
description = "Append suffix for Gitlab CI/CD environment variables if needed"
type = string
default = ""
}
variable "s3_cors_rule" {
description = "List of maps containing rules for Cross-Origin Resource Sharing."
type = list(object({
allowed_headers = optional(list(string))
allowed_methods = optional(list(string))
allowed_origins = optional(list(string))
expose_headers = optional(list(string))
max_age_seconds = optional(number)
}))
default = []
}
variable "response_header_origin_override" {
type = bool
default = false
}
variable "response_header_access_control_allow_credentials" {
type = bool
default = false
}
variable "extra_domains" {
type = map(string)
description = "Map of extra_domains with domain name and zone_id"
default = {}
}