-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
97 lines (88 loc) · 2.96 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
variable "domain" {
type = string
description = "domain full name"
}
variable "alternative_domains" {
type = list(string)
default = []
}
variable "alternative_zones" {
type = list(string)
default = []
}
variable "enable_http_security_headers" {
type = bool
default = false
description = "Whether to enable http security headers by creating pass through lambda handler for cdn"
}
variable "zone" {
type = string
default = null
description = "R53 zone name"
}
variable "waf" {
type = any
default = null
description = "waf configs"
}
variable "s3_configs" {
type = object({
acl = optional(string, "private")
create_index_html = optional(bool, true)
ignore_public_acls = optional(bool, true)
restrict_public_buckets = optional(bool, true)
block_public_acls = optional(bool, true)
block_public_policy = optional(bool, true)
versioning = optional(object({ enabled = bool }), { enabled = false })
website = optional(object({ index_document = string, error_document = string }), { index_document = "index.html", error_document = "index.html" })
create_iam_user = optional(bool, false)
cors_rule = optional(list(any), [])
event_notification_config = optional(object({
target_type = string, // Target type for the S3 event notification, can be "sqs" or "null". Other target types can be implemented in the future.
name_suffix = string, // Suffix to add to the target name.
filter_prefix = string, // Prefix to filter object key names for the event notification.
events = optional(list(string), ["s3:ObjectCreated:*"]) // List of S3 events that trigger the notification. Defaults to "s3:ObjectCreated:*".
}), {
target_type = "null"
name_suffix = "event"
filter_prefix = "test/"
events = ["s3:ObjectCreated:*"]
}
)
})
default = {
acl = "private"
create_index_html = true
ignore_public_acls = true
restrict_public_buckets = true
block_public_acls = true
block_public_policy = true
versioning = {
enabled = false
}
website = {
index_document = "index.html"
error_document = "index.html"
}
create_iam_user = false
cors_rule = []
event-notification-config = {
target_type = "null"
queue_name = "test"
filter_prefix = "test/"
events = ["s3:ObjectCreated:*"]
}
}
description = "S3 bucket configuration options"
}
variable "cdn_configs" {
type = object({
default_root_object = optional(string, "index.html")
additional_origins = optional(any, [])
})
default = {
default_root_object = "index.html"
additional_origins = []
}
description = "CDN configuration options"
}