-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
76 lines (67 loc) · 2.23 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
variable "bucket_name" {
default = null
description = "Name to apply to bucket (use `bucket_name` or `bucket_suffix`)"
type = string
}
variable "bucket_suffix" {
default = "default"
description = "Suffix to apply to the bucket (use `bucket_name` or `bucket_suffix`). When using `bucket_suffix`, the bucket name will be `[account_id]-[region]-s3logging-[bucket_suffix]."
type = string
}
variable "kms_key_id" {
default = null
description = "KMS key to encrypt bucket with."
type = string
}
variable "lifecycle_rules" {
description = "lifecycle rules to apply to the bucket"
default = [
{
id = "expire-noncurrent-objects-after-ninety-days"
noncurrent_version_expiration = 90
},
{
id = "transition-to-IA-after-30-days"
transition = [{
days = 30
storage_class = "STANDARD_IA"
}]
},
{
id = "delete-after-seven-years"
expiration = 2557
},
]
type = list(object(
{
id = string
enabled = optional(bool, true)
expiration = optional(number)
prefix = optional(string)
noncurrent_version_expiration = optional(number)
transition = optional(list(object({
days = number
storage_class = string
})))
}))
}
variable "lifecycle_transition_default_minimum_object_size" {
default = "varies_by_storage_class"
description = "The default minimum object size behavior applied to the lifecycle configuration"
type = string
}
variable "object_ownership" {
default = "BucketOwnerEnforced"
description = "Specifies S3 object ownership control. Defaults to BucketOwnerPreferred for backwards-compatibility. Recommended value is BucketOwnerEnforced."
type = string
}
variable "tags" {
default = {}
description = "Tags to add to supported resources"
type = map(string)
}
variable "versioning_enabled" {
default = true
description = "Whether or not to use versioning on the bucket. This can be useful for audit purposes since objects in a logging bucket should not be updated."
type = bool
}