Skip to content

Commit

Permalink
Dynamic block for versioning added (#118)
Browse files Browse the repository at this point in the history
* Dynamic block for versioning added

* Auto Format

Co-authored-by: cloudpossebot <[email protected]>
  • Loading branch information
nnsense and cloudpossebot authored Nov 12, 2021
1 parent c07ccf3 commit 6947cac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ resource "aws_s3_bucket" "default" {
tags = module.this.tags
acceleration_status = var.transfer_acceleration_enabled ? "Enabled" : null

versioning {
enabled = var.versioning_enabled
dynamic "versioning" {
for_each = var.versioning_enabled ? [true] : []
content {
enabled = true
}
}

dynamic "lifecycle_rule" {
Expand Down

0 comments on commit 6947cac

Please sign in to comment.