Skip to content

Commit 6923e1b

Browse files
authored
Support disabling versioning in private buckets (#122)
1 parent 96ea06d commit 6923e1b

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.18.2
1+
0.19.1

aws-s3-private-bucket/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
|------|-------------|:----:|:-----:|:-----:|
66
| bucket\_name | | string | n/a | yes |
77
| bucket\_policy | | string | `""` | no |
8+
| enable\_versioning | Keep old versions of overwritten S3 objects. | bool | `true` | no |
89
| env | | string | n/a | yes |
910
| owner | | string | n/a | yes |
1011
| project | | string | n/a | yes |

aws-s3-private-bucket/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resource "aws_s3_bucket" "bucket" {
1515
policy = "${data.aws_iam_policy_document.bucket_policy.json}"
1616

1717
versioning {
18-
enabled = true
18+
enabled = var.enable_versioning
1919
}
2020

2121
# TODO

aws-s3-private-bucket/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ variable "service" {
2222
variable "owner" {
2323
type = "string"
2424
}
25+
26+
variable "enable_versioning" {
27+
type = bool
28+
description = "Keep old versions of overwritten S3 objects."
29+
default = true
30+
}

0 commit comments

Comments
 (0)