-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
111 lines (96 loc) · 2.61 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
variable "bucket_name" {
type = string
description = "The name of the bucket. Conflicts with bucket_prefix."
default = null
}
variable "bucket_name_prefix" {
type = string
description = "The prefix of the bucket name. Conflicts with bucket_name."
}
variable "tags" {
type = map(string)
description = "Tags to apply to the bucket and related resources."
default = {}
}
variable "custom_kms_key_arn" {
type = string
description = "The ARN of the custom KMS key to use for server-side encryption."
default = null
}
variable "enable_versioning" {
type = bool
description = "Enables versioning for this bucket."
default = true
}
variable "public_access_block" {
type = object({
block_public_acls = bool
block_public_policy = bool
ignore_public_acls = bool
restrict_public_buckets = bool
})
description = "Configuration block to enable public access prevention."
default = {
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
}
variable "object_lock" {
type = object({
enabled = bool
default_retention = optional(object({
mode = string
days = optional(number)
years = optional(number)
}))
})
description = "Configuration block to enable object lock."
default = {
enabled = true
default_retention = null
}
}
variable "enable_eventbridge_notification" {
type = bool
description = "Enables eventbridge notification for this bucket."
default = true
}
variable "abort_incomplete_multipart_upload" {
type = object({
days_after_initiation = number
})
description = "Abort incomplete multipart upload after a certain number of days."
default = {
days_after_initiation = 3
}
nullable = true
}
variable "lifecycle_rules" {
type = list(object({
id = string
enabled = optional(bool, true)
prefix = optional(string)
tags = optional(map(string), {})
noncurrent_version_expiration = optional(object({
days = optional(number)
newer_versions = optional(number)
}))
expiration = optional(object({
days = number
}))
transition = optional(object({
days = number
storage_class = string
}))
noncurrent_version_transition = optional(object({
days = optional(number)
newer_versions = optional(number)
storage_class = string
}))
}))
description = "List of lifecycle rules to apply to the bucket."
default = []
nullable = false
}