-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvariables.tf
314 lines (265 loc) · 8.21 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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
variable "namespace" {
type = string
default = ""
description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'"
}
variable "environment" {
type = string
default = ""
description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'"
}
variable "stage" {
type = string
default = ""
description = "Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release'"
}
variable "create_kms_key" {
type = bool
default = true
description = "Whether to create a KMS key"
}
variable "kms_key_deletion_windows" {
type = number
default = 7
description = "The number of days after which the KMS key is deleted after destruction of the resource, must be between 7 and 30 days"
}
variable "kms_key_rotation" {
type = bool
default = true
description = "Specifies whether key rotation is enabled"
}
variable "name" {
type = string
default = "terraform"
description = "Solution name, e.g. 'app' or 'jenkins'"
}
variable "delimiter" {
type = string
default = "-"
description = "Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`"
}
variable "attributes" {
type = list(string)
default = ["state"]
description = "Additional attributes (e.g. `state`)"
}
variable "tags" {
type = map(string)
default = {}
description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`"
}
variable "additional_tag_map" {
type = map(string)
default = {}
description = "Additional tags for appending to each tag map"
}
variable "context" {
type = map(string)
default = {}
description = "Default context to use for passing state between label invocations"
}
variable "label_order" {
type = list(string)
default = []
description = "The naming order of the id output and Name tag"
}
variable "acl" {
type = string
description = "The canned ACL to apply to the S3 bucket"
default = "private"
}
variable "read_capacity" {
type = number
default = 5
description = "DynamoDB read capacity units"
}
variable "write_capacity" {
type = number
default = 5
description = "DynamoDB write capacity units"
}
variable "force_destroy" {
type = bool
description = "A boolean that indicates the S3 bucket can be destroyed even if it contains objects. These objects are not recoverable"
default = false
}
variable "mfa_delete" {
type = bool
description = "A boolean that indicates that versions of S3 objects can only be deleted with MFA. ( Terraform cannot apply changes of this value; https://github.com/terraform-providers/terraform-provider-aws/issues/629 )"
default = false
}
variable "mfa_serial" {
type = string
description = "The serial number of the MFA device to use. Necessary when mfa_delete is true."
default = ""
}
variable "mfa_secret" {
type = string
description = "The numbers displayed on the MFA device when applying. Necessary when mfa_delete is true."
default = ""
}
variable "enable_server_side_encryption" {
type = bool
description = "Enable DynamoDB server-side encryption"
default = true
}
variable "enable_point_in_time_recovery" {
type = bool
description = "Enable DynamoDB point in time recovery"
default = true
}
variable "billing_mode" {
type = string
description = "DynamoDB billing mode. Can be PROVISIONED or PAY_PER_REQUEST"
default = "PAY_PER_REQUEST"
}
variable "block_public_acls" {
type = bool
description = "Whether Amazon S3 should block public ACLs for this bucket."
default = true
}
variable "ignore_public_acls" {
type = bool
description = "Whether Amazon S3 should ignore public ACLs for this bucket."
default = true
}
variable "block_public_policy" {
type = bool
description = "Whether Amazon S3 should block public bucket policies for this bucket."
default = true
}
variable "restrict_public_buckets" {
type = bool
description = "Whether Amazon S3 should restrict public bucket policies for this bucket."
default = true
}
variable "notifications_sqs" {
type = bool
description = "Wether to enable SQS notifications"
default = false
}
variable "notifications_sns" {
type = bool
description = "Whether to enable SNS notifications"
default = true
}
variable "notifications_events" {
type = list(string)
description = "List of events to enable notifications for"
default = ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
}
variable "regex_replace_chars" {
type = string
default = "/[^a-zA-Z0-9-]/"
description = "Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`. By default only hyphens, letters and digits are allowed, all other chars are removed"
}
variable "bucket_replication_enabled" {
type = bool
description = "Enable/Disable replica for S3 bucket (for cross region replication purpose)"
default = true
}
variable "bucket_replication_name" {
type = string
default = "replica"
description = "Set custom name for S3 Bucket Replication"
}
variable "bucket_replication_name_suffix" {
type = string
default = "bucket-replication"
description = "Set custom suffix for S3 Bucket Replication IAM Role/Policy"
}
variable "enforce_ssl_requests" {
type = bool
description = "Enable/Disable replica for S3 bucket (for cross region replication purpose)"
default = false
}
variable "enforce_vpc_requests" {
type = bool
description = "Enable/Disable VPC endpoint for S3 bucket"
default = false
}
variable "vpc_ids_list" {
type = list(string)
description = "VPC id to access the S3 bucket vía vpc endpoint. The VPCe must be in the same AWS Region as the bucket."
default = []
}
variable "logging" {
type = object({
bucket_name = string
prefix = string
})
default = null
description = "Bucket access logging configuration."
}
variable "replica_logging" {
type = object({
bucket_name = string
prefix = string
})
default = null
description = "Bucket access logging configuration."
}
variable "bucket_lifecycle_enabled" {
type = bool
description = "Enable/Disable bucket lifecycle"
default = true
}
variable "bucket_lifecycle_expiration" {
type = number
default = 90
description = "Number of days after which to expunge the objects"
}
variable "bucket_lifecycle_transition_glacier" {
type = number
default = 60
description = "Number of days after which to move the data to the GLACIER storage class"
}
variable "bucket_lifecycle_transition_standard_ia" {
type = number
default = 30
description = "Number of days after which to move the data to the STANDARD_IA storage class"
}
#
# Example:
# {
# enabled = true
# threshold = "2"
# alarm_action_arn = [
# "arn:aws:sns:us-east-1:000000000000:your-sns-topic"
# ]
# }
variable "dynamodb_monitoring" {
type = any
description = "DynamoDB monitoring settings."
default = {}
}
variable "backend_config_template_file" {
type = string
description = "Path to the template file to use when generating the backend configuration."
default = ""
}
variable "backend_config_filepath" {
type = string
description = "Directory where the backend configuration file should be generated."
default = ""
}
variable "backend_config_filename" {
type = string
description = "Name of the backend configuration file to generate."
default = "backend.tf"
}
variable "backend_config_profile" {
type = string
description = "AWS profile to use when interfacing the backend infrastructure."
default = ""
}
variable "backend_config_role_arn" {
type = string
description = "ARN of the AWS role to assume when interfacing the backend infrastructure, if any."
default = ""
}
variable "backend_config_state_file" {
type = string
description = "Name of the state file in the S3 bucket to use."
default = "terraform.tfstate"
}