You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| domain | Primary domain for the distribution. The hosted zone for this domain should be in the same account. |`string`| n/a | yes |
56
+
| log_bucket | Domain name of the S3 bucket to send logs to. |`string`| n/a | yes |
57
+
| log_group | CloudWatch log group to send WAF logs to. |`string`| n/a | yes |
58
+
| project | Project that these resources are supporting. |`string`| n/a | yes |
59
+
|[custom_headers]| Custom headers to send to the origin. |`map(string)`|`{}`| no |
60
+
| environment | The environment for the deployment. |`string`|`"dev"`| no |
61
+
|[ip_set_rules]| Custom IP Set rules for the WAF |`map(object)`|`{}`| no |
62
+
|[rate_limit_rules]| Rate limiting configuration for the WAF. |`map(object)`|`{}`| no |
63
+
| origin_domain | Fully qualified domain name for the origin. Defaults to `origin.${subdomain}.${domain}`. |`string`| n/a | no |
64
+
| passive | Enable passive mode for the WAF, counting all requests rather than blocking. |`bool`|`false`| no |
65
+
| request_policy | Managed request policy to associate with the distribution. See the [managed policies][managed-policies] for valid values. |`string`|`"AllViewer"`| no |
66
+
| subdomain | Subdomain for the distribution. Defaults to the environment. |`string`| n/a | no |
67
+
| tags | Optional tags to be applied to all resources. |`map(string)`|`{}`| no |
68
+
|[upload_paths]| Optional paths to allow uploads to. |`list(object)`|`[]`| no |
Copy file name to clipboardExpand all lines: variables.tf
+30-11Lines changed: 30 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,17 @@ variable "environment" {
15
15
default="dev"
16
16
}
17
17
18
+
variable"ip_set_rules" {
19
+
type=map(object({
20
+
name =optional(string, "")
21
+
action =optional(string, "allow")
22
+
priority =optional(number, null)
23
+
arn =string
24
+
}))
25
+
description="Custom IP Set rules for the WAF."
26
+
default={}
27
+
}
28
+
18
29
variable"log_bucket" {
19
30
type=string
20
31
description="S3 Bucket to send logs to."
@@ -42,17 +53,6 @@ variable "project" {
42
53
description="Project that these resources are supporting."
43
54
}
44
55
45
-
variable"ip_set_rules" {
46
-
type=map(object({
47
-
name =optional(string, "")
48
-
action =optional(string, "allow")
49
-
priority =optional(number, null)
50
-
arn =string
51
-
}))
52
-
description="Custom IP Set rules for the WAF."
53
-
default={}
54
-
}
55
-
56
56
variable"rate_limit_rules" {
57
57
type=map(object({
58
58
name =optional(string, "")
@@ -65,6 +65,25 @@ variable "rate_limit_rules" {
65
65
default={}
66
66
}
67
67
68
+
variable"request_policy" {
69
+
type=string
70
+
description="Managed request policy to associate with the distribution."
71
+
default="AllViewer"
72
+
73
+
validation {
74
+
condition=contains([
75
+
"AllViewer",
76
+
"AllViewerAndCloudFrontHeaders-2022-06",
77
+
"AllViewerExceptHostHeader",
78
+
"CORS-CustomOrigin",
79
+
"CORS-S3Origin",
80
+
"Elemental-MediaTailor-PersonalizedManifests",
81
+
"UserAgentRefererHeaders"
82
+
], var.request_policy)
83
+
error_message="Invalid request policy. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html"
84
+
}
85
+
}
86
+
68
87
variable"subdomain" {
69
88
type=string
70
89
description="Subdomain for the distribution. Defaults to the environment."
0 commit comments