-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
106 lines (92 loc) · 2.61 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
variable "domain" {
type = string
description = "Domain used for this deployment."
}
variable "custom_headers" {
type = map(string)
description = "Custom headers to send to the origin."
default = {}
}
variable "environment" {
type = string
description = "Environment for the deployment."
default = "dev"
}
variable "ip_set_rules" {
type = map(object({
name = optional(string, "")
action = optional(string, "allow")
priority = optional(number, null)
arn = string
}))
description = "Custom IP Set rules for the WAF."
default = {}
}
variable "log_bucket" {
type = string
description = "S3 Bucket to send logs to."
}
variable "log_group" {
type = string
description = "CloudWatch log group to send WAF logs to."
}
variable "origin_domain" {
type = string
description = "Origin domain this deployment will point to. Defaults to origin.subdomain.domain."
default = ""
}
variable "passive" {
type = bool
description = "Enable passive mode for the WAF, counting all requests rather than blocking."
default = false
}
variable "project" {
type = string
description = "Project that these resources are supporting."
}
variable "rate_limit_rules" {
type = map(object({
name = optional(string, "")
action = optional(string, "block")
limit = optional(number, 10)
window = optional(number, 60)
priority = optional(number, null)
}))
description = "Rate limiting configuration for the WAF."
default = {}
}
variable "request_policy" {
type = string
description = "Managed request policy to associate with the distribution."
default = "AllViewer"
validation {
condition = contains([
"AllViewer",
"AllViewerAndCloudFrontHeaders-2022-06",
"AllViewerExceptHostHeader",
"CORS-CustomOrigin",
"CORS-S3Origin",
"Elemental-MediaTailor-PersonalizedManifests",
"UserAgentRefererHeaders"
], var.request_policy)
error_message = "Invalid request policy. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html"
}
}
variable "subdomain" {
type = string
description = "Subdomain for the distribution. Defaults to the environment."
default = ""
}
variable "tags" {
type = map(string)
description = "Tags to apply to all resources."
default = {}
}
variable "upload_paths" {
type = list(object({
constraint = optional(string, "EXACTLY")
path = string
}))
description = "Paths to allow uploads to."
default = []
}