From 0ce0ccb07ca883ca4af42f4db51e85fd3278e76a Mon Sep 17 00:00:00 2001 From: Michael Barrientos Date: Mon, 16 Sep 2019 11:39:38 -0700 Subject: [PATCH 1/2] Update VERSION file for bff --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7211b157..41915c79 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.18.2 \ No newline at end of file +0.19.1 From e48aebaba0c51cd8bbd9cdd85f24f166576db1bc Mon Sep 17 00:00:00 2001 From: Michael Barrientos Date: Mon, 16 Sep 2019 11:45:19 -0700 Subject: [PATCH 2/2] Support disabling versioning in private buckets --- aws-s3-private-bucket/README.md | 1 + aws-s3-private-bucket/main.tf | 2 +- aws-s3-private-bucket/variables.tf | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/aws-s3-private-bucket/README.md b/aws-s3-private-bucket/README.md index 83167809..2f59f602 100644 --- a/aws-s3-private-bucket/README.md +++ b/aws-s3-private-bucket/README.md @@ -5,6 +5,7 @@ |------|-------------|:----:|:-----:|:-----:| | bucket\_name | | string | n/a | yes | | bucket\_policy | | string | `""` | no | +| enable\_versioning | Keep old versions of overwritten S3 objects. | bool | `true` | no | | env | | string | n/a | yes | | owner | | string | n/a | yes | | project | | string | n/a | yes | diff --git a/aws-s3-private-bucket/main.tf b/aws-s3-private-bucket/main.tf index e871aa1b..d6c23175 100755 --- a/aws-s3-private-bucket/main.tf +++ b/aws-s3-private-bucket/main.tf @@ -15,7 +15,7 @@ resource "aws_s3_bucket" "bucket" { policy = "${data.aws_iam_policy_document.bucket_policy.json}" versioning { - enabled = true + enabled = var.enable_versioning } # TODO diff --git a/aws-s3-private-bucket/variables.tf b/aws-s3-private-bucket/variables.tf index df10bd66..264751af 100755 --- a/aws-s3-private-bucket/variables.tf +++ b/aws-s3-private-bucket/variables.tf @@ -22,3 +22,9 @@ variable "service" { variable "owner" { type = "string" } + +variable "enable_versioning" { + type = bool + description = "Keep old versions of overwritten S3 objects." + default = true +}