-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
253 lines (206 loc) · 6.83 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
variable "name" {
type = string
description = "Name must be globally unique."
}
variable "additional_tags" {
type = map(string)
description = "Additional tags for the S3 bucket."
default = {}
}
variable "additional_tags_all" {
type = map(string)
description = "Additional tags for all resources in deployed with this module"
default = {}
}
variable "bucket_owner_account_id" {
type = string
description = "Account ID of the expected bucket owner"
default = null
}
variable "cors_configurations" {
type = list(object({
allowed_methods = list(string)
allowed_origins = list(string)
allowed_headers = optional(list(string), null)
expose_headers = optional(list(string), null)
id = optional(string, null)
max_age_seconds = optional(number, null)
}))
description = "Configures the CORS configuration to defines a way for client web applications that are loaded in one domain to interact with resources in a different domain"
default = null
}
variable "enables_object_lock" {
type = object({
default_retention = optional(object({
retention_days = number
retention_mode = string
}))
token = optional(string)
})
description = "Indicates whether this bucket has an Object Lock configuration enabled"
default = null
}
variable "encryption_config" {
type = object({
bucket_key_enabled = optional(bool)
use_kms_master_key = optional(string)
})
description = "Enable bucket level encryption."
default = null
}
variable "force_destroy" {
type = bool
description = "Force destroy bucket"
default = false
}
variable "intelligent_tiering_archive_configurations" {
type = map(object({
access_tier = string
days_until_transition = number
filter = optional(object({
object_tags = optional(map(string), null)
prefix = optional(string, null)
}))
}))
description = "Configure intelligent tiering. In {rule_name = intelligent_tiering_config} format."
default = {}
}
variable "inventory_config" {
type = map(object({
frequency = string
additional_metadata_fields = optional(list(string))
destination = optional(object({
account_id = optional(string)
bucket_arn = optional(string)
}))
encrypt_inventory_report = optional(object({
kms_key_id = optional(string)
}))
filter = optional(object({
prefix = optional(string, null)
}))
include_noncurrent_objects = optional(bool, true)
output_format = optional(string, "CSV")
}))
description = "Configure inventory. In {rule_name = inventory_config} format."
default = {}
}
variable "lifecycle_rules" {
type = map(object({
clean_up_incomplete_multipart_uploads_after = optional(number)
expiration = optional(object({
clean_up_expired_object_delete_markers = optional(bool)
days_after_object_creation = optional(number)
}))
filter = optional(object({
maximum_object_size = optional(number, null)
minimum_object_size = optional(number, null)
object_tags = optional(map(string), null)
prefix = optional(string, null)
}))
noncurrent_version_expiration = optional(object({
days_after_objects_become_noncurrent = number
number_of_newer_versions_to_retain = optional(number)
}))
noncurrent_version_transitions = optional(list(object({
days_after_objects_become_noncurrent = number
storage_class = string
number_of_newer_versions_to_retain = optional(number)
})), [])
transitions = optional(list(object({
days_after_object_creation = number
storage_class = string
})), [])
}))
description = "Configure lifecycle rules to rotate out objects. In {rule_name = lifecycle_config} format."
default = null
}
variable "notification_config" {
type = object({
destinations = map(list(object({
events = list(string)
filter_prefix = optional(string)
filter_suffix = optional(string)
})))
})
description = "Configuration to enable bucket event notification. Destination is in {dest_arn = config} format."
default = null
}
variable "object_ownership" {
type = string
description = "Control ownership of objects written to this bucket from other AWS accounts and the use of access control lists (ACLs). Object ownership determines who can specify access to objects."
default = "BucketOwnerEnforced"
}
variable "policy" {
type = string
description = "Policy document for the bucket policy."
default = null
}
variable "public_access_block" {
type = object({
block_public_acls = optional(bool)
block_public_policy = optional(bool)
ignore_public_acls = optional(bool)
restrict_public_buckets = optional(bool)
})
description = "Block public access to bucket"
default = null
}
variable "replication_config" {
type = object({
rules = map(object({
destination_bucket_arn = string
priority = number
additional_replication_options = optional(object({
delete_marker_replication_enabled = optional(bool, false)
replica_modification_sync_enabled = optional(bool, false)
replication_metrics_enabled = optional(bool, false)
replication_time_control_enabled = optional(bool, false)
}))
change_object_ownership_to_destination_bucket_owner = optional(object({
destination_account_id = string
}))
destination_storage_class = optional(string)
filter = optional(object({
object_tags = optional(map(string), null)
prefix = optional(string, null)
}))
replicate_encrypted_objects = optional(object({
kms_key_for_encrypting_destination_objects = string
}))
}))
iam_role_arn = optional(string)
token = optional(string)
})
description = "Configures bucket replicatoin rules. In {rule_name = replication_config} format."
default = null
}
variable "requester_pays_enabled" {
type = bool
description = "Enable requester pays."
default = false
}
variable "static_website_hosting_config" {
type = object({
redirect_requests_for_an_object = optional(object({
host_name = string
protocol = optional(string)
}))
static_website = optional(object({
index_document = string
error_document = optional(string)
}))
})
description = "Configuration to enable bucket for static web hosting."
default = null
}
variable "transfer_acceleration_enabled" {
type = bool
description = "Enable transfer acceleration."
default = false
}
variable "versioning_enabled" {
type = bool
description = "Enable S3 versioning."
default = false
}