Skip to content

Commit 20c680b

Browse files
Revert "INFRA-516 add lifecycle support for expire and transition"
This reverts commit e32ffa9.
1 parent e32ffa9 commit 20c680b

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

main.tf

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,9 @@ resource "aws_s3_bucket" "this" {
9393
tags = "${module.labels.tags[count.index]}"
9494
}
9595

96-
resource "aws_s3_bucket_lifecycle_configuration" "abort" {
97-
count = "${var.lc_abort_day != "" ? 1 : 0}"
98-
bucket = "${aws_s3_bucket.this.bucket}"
99-
100-
rule {
101-
id = "abort"
102-
abort_incomplete_multipart_upload {
103-
days_after_initiation = "${var.lc_abort_day}"
104-
}
105-
status = "Enabled"
106-
}
107-
}
108-
10996
resource "aws_s3_bucket_lifecycle_configuration" "expire" {
11097
count = "${var.lc_expire_day != "" ? 1 : 0}"
111-
bucket = "${aws_s3_bucket.this.bucket}"
98+
bucket = aws_s3_bucket.this.bucket
11299

113100
rule {
114101
id = "expire"
@@ -122,9 +109,9 @@ resource "aws_s3_bucket_lifecycle_configuration" "expire" {
122109
}
123110
}
124111

125-
resource "aws_s3_bucket_lifecycle_configuration" "transition" {
112+
resource "aws_s3_bucket_lifecycle_configuration" "expire" {
126113
count = "${var.lc_transition_day != "" ? 1 : 0}"
127-
bucket = "${aws_s3_bucket.this.bucket}"
114+
bucket = aws_s3_bucket.this.bucket
128115

129116
rule {
130117
id = "transition"

variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ variable "restrict_public_buckets" {
150150
default = true
151151
}
152152

153-
variable "lc_abort_day" {
154-
description = "S3 LifeCycle abort_incomplete_multipart_upload days"
155-
default = "1"
156-
}
157-
158153
variable "lc_expire_day" {
159154
description = "S3 LifeCycle expiration days"
160155
default = ""

0 commit comments

Comments
 (0)