This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
forked from clouddrove/terraform-aws-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
206 lines (175 loc) · 5.62 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
#Module : LABEL
#Description : Terraform label module variables.
variable "name" {
type = string
default = ""
description = "Name (e.g. `app` or `cluster`)."
}
variable "label_order" {
type = list(any)
default = []
description = "Label order, e.g. `name`,`application`."
}
variable "attributes" {
type = list(any)
default = []
description = "Additional attributes (e.g. `1`)."
}
variable "delimiter" {
type = string
default = "-"
description = "Delimiter to be used between `organization`, `environment`, `name` and `attributes`."
}
variable "tags" {
type = map(any)
default = {}
description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)."
}
# Module : S3 BUCKET
# Description : Terraform S3 Bucket module variables.
variable "create_bucket" {
type = bool
default = true
description = "Conditionally create S3 bucket."
}
variable "versioning" {
type = bool
default = false
description = "Enable Versioning of S3."
}
variable "acl" {
type = string
default = "private"
description = "Canned ACL to apply to the S3 bucket."
}
variable "bucket_enabled" {
type = bool
default = true
description = "Enable simple S3."
}
variable "bucket_logging_enabled" {
type = bool
default = false
description = "Enable logging of S3."
}
variable "encryption_enabled" {
type = bool
default = false
description = "Enable encryption of S3."
}
variable "website_hosting_bucket" {
type = bool
default = false
description = "Enable website hosting of S3."
}
variable "target_bucket" {
type = string
default = ""
description = "The name of the bucket that will receive the log objects."
}
variable "target_prefix" {
type = string
default = ""
description = "To specify a key prefix for log objects."
}
variable "sse_algorithm" {
type = string
default = "AES256"
description = "The server-side encryption algorithm to use. Valid values are AES256 and aws:kms."
}
variable "kms_master_key_id" {
type = string
default = ""
description = "The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of sse_algorithm as aws:kms. The default aws/s3 AWS KMS master key is used if this element is absent while the sse_algorithm is aws:kms."
}
variable "website_index" {
type = string
default = "index.html"
description = "Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders."
}
variable "website_error" {
type = string
default = "error.html"
description = "An absolute path to the document to return in case of a 4XX error."
}
variable "lifecycle_infrequent_storage_transition_enabled" {
type = bool
default = false
description = "Specifies infrequent storage transition lifecycle rule status."
}
variable "lifecycle_infrequent_storage_object_prefix" {
type = string
default = ""
description = "Object key prefix identifying one or more objects to which the lifecycle rule applies."
}
variable "lifecycle_days_to_infrequent_storage_transition" {
type = number
default = 60
description = "Specifies the number of days after object creation when it will be moved to standard infrequent access storage."
}
variable "lifecycle_glacier_transition_enabled" {
type = bool
default = false
description = "Specifies Glacier transition lifecycle rule status."
}
variable "lifecycle_glacier_object_prefix" {
type = string
default = ""
description = "Object key prefix identifying one or more objects to which the lifecycle rule applies."
}
variable "lifecycle_days_to_glacier_transition" {
type = number
default = 180
description = "Specifies the number of days after object creation when it will be moved to Glacier storage."
}
variable "lifecycle_expiration_enabled" {
type = bool
default = false
description = "Specifies expiration lifecycle rule status."
}
variable "lifecycle_expiration_object_prefix" {
type = string
default = ""
description = "Object key prefix identifying one or more objects to which the lifecycle rule applies."
}
variable "lifecycle_days_to_expiration" {
type = number
default = 365
description = "Specifies the number of days after object creation when the object expires."
}
# Module : S3 BUCKET POLICY
# Description : Terraform S3 Bucket Policy module variables.
variable "aws_iam_policy_document" {
type = string
default = ""
description = "Specifies the number of days after object creation when the object expires."
}
variable "bucket_policy" {
type = bool
default = false
description = "Conditionally create S3 bucket policy."
}
variable "force_destroy" {
type = bool
default = false
description = "A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable."
}
variable "cors_rule_inputs" {
type = list(object({
allowed_headers = list(string)
allowed_methods = list(string)
allowed_origins = list(string)
expose_headers = list(string)
}))
default = null
description = "Specifies the allowed headers, methods, origins and exposed headers when using CORS on this bucket"
}
variable "public_access_block" {
type = map(any)
default = {
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
}