Skip to content

Commit 33d9bd1

Browse files
authored
Merge pull request #410 from trussworks/barry-fix-variable-type
fix: sets proper type on variable
2 parents 7072736 + fe7c79d commit 33d9bd1

File tree

1 file changed

+83
-83
lines changed

1 file changed

+83
-83
lines changed

variables.tf

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,54 @@
1+
variable "abort_incomplete_multipart_upload_days" {
2+
description = "Number of days until aborting incomplete multipart uploads"
3+
type = number
4+
default = 14
5+
}
6+
7+
variable "additional_lifecycle_rules" {
8+
description = "List of additional lifecycle rules to specify"
9+
type = list(any)
10+
default = []
11+
}
12+
113
variable "bucket" {
214
description = "The name of the bucket."
315
type = string
416
}
517

6-
variable "use_random_suffix" {
7-
description = "Whether to add a random suffix to the bucket name."
18+
variable "bucket_key_enabled" {
19+
description = "Whether or not to use Amazon S3 Bucket Keys for SSE-KMS."
820
type = bool
921
default = false
1022
}
1123

12-
variable "use_account_alias_prefix" {
13-
description = "Whether to prefix the bucket name with the AWS account alias."
14-
type = string
24+
variable "control_object_ownership" {
25+
description = "Whether to manage S3 Bucket Ownership Controls on this bucket."
26+
type = bool
1527
default = true
1628
}
1729

30+
variable "cors_rules" {
31+
description = "List of maps containing rules for Cross-Origin Resource Sharing."
32+
type = list(any)
33+
default = []
34+
}
35+
1836
variable "custom_bucket_policy" {
1937
description = "JSON formatted bucket policy to attach to the bucket."
2038
type = string
2139
default = ""
2240
}
2341

24-
variable "logging_bucket" {
25-
description = "The S3 bucket to send S3 access logs."
26-
type = string
27-
default = ""
42+
variable "enable_analytics" {
43+
description = "Enables storage class analytics on the bucket."
44+
default = true
45+
type = bool
2846
}
2947

30-
variable "tags" {
31-
description = "A mapping of tags to assign to the bucket."
32-
default = {}
33-
type = map(string)
48+
variable "enable_bucket_force_destroy" {
49+
type = bool
50+
default = false
51+
description = "If set to true, Bucket will be emptied and destroyed when terraform destroy is run."
3452
}
3553

3654
variable "enable_bucket_inventory" {
@@ -39,10 +57,20 @@ variable "enable_bucket_inventory" {
3957
description = "If set to true, Bucket Inventory will be enabled."
4058
}
4159

42-
variable "enable_bucket_force_destroy" {
60+
variable "enable_s3_public_access_block" {
61+
description = "Bool for toggling whether the s3 public access block resource should be enabled."
4362
type = bool
44-
default = false
45-
description = "If set to true, Bucket will be emptied and destroyed when terraform destroy is run."
63+
default = true
64+
}
65+
66+
variable "expiration" {
67+
description = "expiration blocks"
68+
type = list(any)
69+
default = [
70+
{
71+
expired_object_delete_marker = true
72+
}
73+
]
4674
}
4775

4876
variable "inventory_bucket_format" {
@@ -51,54 +79,22 @@ variable "inventory_bucket_format" {
5179
description = "The format for the inventory file. Default is ORC. Options are ORC or CSV."
5280
}
5381

54-
variable "schedule_frequency" {
82+
variable "kms_master_key_id" {
83+
description = "The AWS KMS master key ID used for the SSE-KMS encryption. If blank, bucket encryption configuration defaults to AES256."
5584
type = string
56-
default = "Weekly"
57-
description = "The S3 bucket inventory frequency. Defaults to Weekly. Options are 'Weekly' or 'Daily'."
58-
}
59-
60-
variable "enable_analytics" {
61-
description = "Enables storage class analytics on the bucket."
62-
default = true
63-
type = bool
64-
}
65-
66-
variable "cors_rules" {
67-
description = "List of maps containing rules for Cross-Origin Resource Sharing."
68-
type = list(any)
69-
default = []
85+
default = ""
7086
}
7187

72-
variable "versioning_status" {
73-
description = "A string that indicates the versioning status for the log bucket."
74-
default = "Enabled"
88+
variable "logging_bucket" {
89+
description = "The S3 bucket to send S3 access logs."
7590
type = string
76-
validation {
77-
condition = contains(["Enabled", "Disabled", "Suspended"], var.versioning_status)
78-
error_message = "Valid values for versioning_status are Enabled, Disabled, or Suspended."
79-
}
91+
default = ""
8092
}
8193

82-
variable "abort_incomplete_multipart_upload_days" {
83-
description = "Number of days until aborting incomplete multipart uploads"
94+
variable "noncurrent_version_expiration" {
95+
description = "Number of days until non-current version of object expires"
8496
type = number
85-
default = 14
86-
}
87-
88-
variable "expiration" {
89-
description = "expiration blocks"
90-
type = list(any)
91-
default = [
92-
{
93-
expired_object_delete_marker = true
94-
}
95-
]
96-
}
97-
98-
variable "transitions" {
99-
description = "Current version transition blocks"
100-
type = list(any)
101-
default = []
97+
default = 365
10298
}
10399

104100
variable "noncurrent_version_transitions" {
@@ -112,28 +108,28 @@ variable "noncurrent_version_transitions" {
112108
]
113109
}
114110

115-
variable "noncurrent_version_expiration" {
116-
description = "Number of days until non-current version of object expires"
117-
type = number
118-
default = 365
111+
variable "object_ownership" {
112+
description = "Object ownership. Valid values: BucketOwnerEnforced, BucketOwnerPreferred or ObjectWriter."
113+
type = string
114+
default = "BucketOwnerEnforced"
119115
}
120116

121-
variable "kms_master_key_id" {
122-
description = "The AWS KMS master key ID used for the SSE-KMS encryption. If blank, bucket encryption configuration defaults to AES256."
117+
variable "s3_bucket_acl" {
118+
description = "Set bucket ACL per [AWS S3 Canned ACL](<https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl>) list."
119+
default = null
123120
type = string
124-
default = ""
125121
}
126122

127-
variable "enable_s3_public_access_block" {
128-
description = "Bool for toggling whether the s3 public access block resource should be enabled."
129-
type = bool
130-
default = true
123+
variable "schedule_frequency" {
124+
type = string
125+
default = "Weekly"
126+
description = "The S3 bucket inventory frequency. Defaults to Weekly. Options are 'Weekly' or 'Daily'."
131127
}
132128

133-
variable "bucket_key_enabled" {
134-
description = "Whether or not to use Amazon S3 Bucket Keys for SSE-KMS."
135-
type = bool
136-
default = false
129+
variable "tags" {
130+
description = "A mapping of tags to assign to the bucket."
131+
default = {}
132+
type = map(string)
137133
}
138134

139135
variable "transfer_acceleration" {
@@ -142,26 +138,30 @@ variable "transfer_acceleration" {
142138
default = null
143139
}
144140

145-
variable "additional_lifecycle_rules" {
146-
description = "List of additional lifecycle rules to specify"
141+
variable "transitions" {
142+
description = "Current version transition blocks"
147143
type = list(any)
148144
default = []
149145
}
150146

151-
variable "control_object_ownership" {
152-
description = "Whether to manage S3 Bucket Ownership Controls on this bucket."
147+
variable "use_account_alias_prefix" {
148+
description = "Whether to prefix the bucket name with the AWS account alias."
153149
type = bool
154150
default = true
155151
}
156152

157-
variable "object_ownership" {
158-
description = "Object ownership. Valid values: BucketOwnerEnforced, BucketOwnerPreferred or ObjectWriter."
159-
type = string
160-
default = "BucketOwnerEnforced"
153+
variable "use_random_suffix" {
154+
description = "Whether to add a random suffix to the bucket name."
155+
type = bool
156+
default = false
161157
}
162158

163-
variable "s3_bucket_acl" {
164-
description = "Set bucket ACL per [AWS S3 Canned ACL](<https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl>) list."
165-
default = null
159+
variable "versioning_status" {
160+
description = "A string that indicates the versioning status for the log bucket."
161+
default = "Enabled"
166162
type = string
163+
validation {
164+
condition = contains(["Enabled", "Disabled", "Suspended"], var.versioning_status)
165+
error_message = "Valid values for versioning_status are Enabled, Disabled, or Suspended."
166+
}
167167
}

0 commit comments

Comments
 (0)