Skip to content

Commit 605b480

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

File tree

2 files changed

+0
-58
lines changed

2 files changed

+0
-58
lines changed

main.tf

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

96-
resource "aws_s3_bucket_lifecycle_configuration" "expire" {
97-
count = "${var.lc_expire_day != "" ? 1 : 0}"
98-
bucket = aws_s3_bucket.this.bucket
99-
100-
rule {
101-
id = "expire"
102-
expiration {
103-
days = "${var.lc_expire_day}"
104-
}
105-
filter {
106-
prefix = "${var.lc_expire_prefix}"
107-
}
108-
status = "Enabled"
109-
}
110-
}
111-
112-
resource "aws_s3_bucket_lifecycle_configuration" "expire" {
113-
count = "${var.lc_transition_day != "" ? 1 : 0}"
114-
bucket = aws_s3_bucket.this.bucket
115-
116-
rule {
117-
id = "transition"
118-
filter {
119-
prefix = "${var.lc_transition_prefix}"
120-
}
121-
status = "Enabled"
122-
transition {
123-
days = "${var.lc_transition_day}"
124-
storage_class = "${var.lc_transition_class}"
125-
}
126-
}
127-
}
128-
12996
resource "aws_s3_bucket_public_access_block" "this" {
13097
depends_on = ["aws_s3_bucket.this"]
13198
count = "${module.enabled.value ? length(var.names) : 0}"

variables.tf

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -149,28 +149,3 @@ variable "restrict_public_buckets" {
149149
description = "Whether Amazon S3 should restrict public bucket policies for this bucket"
150150
default = true
151151
}
152-
153-
variable "lc_expire_day" {
154-
description = "S3 LifeCycle expiration days"
155-
default = ""
156-
}
157-
158-
variable "lc_expire_prefix" {
159-
description = "S3 LifeCycle expiration folder prefix"
160-
default = ""
161-
}
162-
163-
variable "lc_transition_day" {
164-
description = "S3 LifeCycle transition days"
165-
default = ""
166-
}
167-
168-
variable "lc_transition_prefix" {
169-
description = "S3 LifeCycle transition folder prefix"
170-
default = ""
171-
}
172-
173-
variable "lc_transition_class" {
174-
description = "S3 LifeCycle transition storage class: STANDARD | REDUCED_REDUNDANCY | STANDARD_IA | ONEZONE_IA | INTELLIGENT_TIERING | GLACIER | DEEP_ARCHIVE | GLACIER_IR"
175-
default = "GLACIER_IR"
176-
}

0 commit comments

Comments
 (0)