-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
64 lines (57 loc) · 2.37 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
variable "name" {
description = "A unique name to identify the CloudFront Origin Request Policy."
type = string
}
variable "description" {
description = "The description of the origin request policy."
type = string
default = "Managed by Terraform."
}
variable "forwarding_cookies" {
description = <<EOF
Determines whether any cookies in viewer requests are included in the origin request key and automatically included in requests that CloudFront sends to the origin.
Valid values are `none`, `whitelist`, `all`, `allExcept`.
`items` - A list of cookie names.
EOF
type = object({
behavior = optional(string, "none")
items = optional(set(string), [])
})
default = {}
validation {
condition = contains(["none", "whitelist", "all", "allExcept"], var.forwarding_cookies.behavior)
error_message = "Valid values for `behavior` are `none`, `whitelist`, `all`, and `allExcept`."
}
}
variable "forwarding_headers" {
description = <<EOF
Determines whether any HTTP headers are included in the origin request key and automatically included in requests that CloudFront sends to the origin.
Valid values are `none`, `whitelist`, `allViewer`, `allViewerAndWhitelistCloudFront`, `allExcept`.
`items` - A list of header names.
EOF
type = object({
behavior = optional(string, "none")
items = optional(set(string), [])
})
default = {}
validation {
condition = contains(["none", "whitelist", "allViewer", "allViewerAndWhitelistCloudFront", "allExcept"], var.forwarding_headers.behavior)
error_message = "Valid values for `none`, `whitelist`, `allViewer`, `allViewerAndWhitelistCloudFront` and `allExcept`."
}
}
variable "forwarding_query_strings" {
description = <<EOF
Determines whether any URL query strings in viewer requests are included in the origin request key and automatically included in requests that CloudFront sends to the origin.
Valid values are `none`, `whitelist`, `all`, `allExcept`.
`items` - A list of query string names.
EOF
type = object({
behavior = optional(string, "none")
items = optional(set(string), [])
})
default = {}
validation {
condition = contains(["none", "whitelist", "all", "allExcept"], var.forwarding_query_strings.behavior)
error_message = "Valid values for `behavior` are `none`, `whitelist`, `all` and `allExcept`."
}
}