Skip to content

Commit 0208258

Browse files
authored
Fix invalid versioning_mfa_deletion variable on s3-archive-bucket module (#20)
1 parent 35b52fd commit 0208258

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

modules/s3-archive-bucket/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ No modules.
8383
| <a name="input_tags"></a> [tags](#input\_tags) | (Optional) A map of tags to add to all resources. | `map(string)` | `{}` | no |
8484
| <a name="input_tls_required"></a> [tls\_required](#input\_tls\_required) | (Optional) Deny any access to the S3 bucket that is not encrypted in-transit if true. | `bool` | `true` | no |
8585
| <a name="input_transfer_acceleration_enabled"></a> [transfer\_acceleration\_enabled](#input\_transfer\_acceleration\_enabled) | (Optional) Whether to use an accelerated endpoint for faster data transfers. | `bool` | `false` | no |
86-
| <a name="input_versioning_mfa_deletion"></a> [versioning\_mfa\_deletion](#input\_versioning\_mfa\_deletion) | (Optional) A configuration for MFA (Multi-factors Authentication) of the bucket versioning on deletion. `versioning_mfa_deletion` block as defined below.<br> (Required) `enabled` - Whether MFA delete is enabled in the bucket versioning configuration. Default is `false`.<br> (Required) `device` - The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. | <pre>object({<br> enabled = bool<br> device = string<br> })</pre> | <pre>{<br> "device": null,<br> "enabled": false<br>}</pre> | no |
86+
| <a name="input_versioning_mfa_deletion"></a> [versioning\_mfa\_deletion](#input\_versioning\_mfa\_deletion) | (Optional) A configuration for MFA (Multi-factors Authentication) of the bucket versioning on deletion. `versioning_mfa_deletion` block as defined below.<br> (Required) `enabled` - Whether MFA delete is enabled in the bucket versioning configuration. Default is `false`.<br> (Required) `device` - The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. | <pre>object({<br> enabled = bool<br> device = string<br> })</pre> | `null` | no |
8787
| <a name="input_versioning_status"></a> [versioning\_status](#input\_versioning\_status) | (Optional) A desired status of the bucket versioning. Valid values are `ENABLED`, `SUSPENDED`, or `DISABLED`. Disabled should only be used when creating or importing resources that correspond to unversioned S3 buckets. | `string` | `"DISABLED"` | no |
8888

8989
## Outputs

modules/s3-archive-bucket/lifecycle.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resource "aws_s3_bucket_versioning" "this" {
2424

2525
versioning_configuration {
2626
status = local.versioning_mfa_status[var.versioning_status]
27-
mfa_delete = try(var.versioning_mfa_deletion.enabled, false) ? "Enabled" : "Disabled"
27+
mfa_delete = try(var.versioning_mfa_deletion.enabled ? "Enabled" : "Disabled", null)
2828
}
2929
}
3030

modules/s3-archive-bucket/variables.tf

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ variable "versioning_mfa_deletion" {
3939
enabled = bool
4040
device = string
4141
})
42-
default = {
43-
enabled = false
44-
device = null
45-
}
46-
nullable = false
42+
default = null
4743
}
4844

4945
variable "grants" {

0 commit comments

Comments
 (0)