Skip to content

Commit

Permalink
feat(artifacts): bucket versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-piechowicz-wandb committed Dec 22, 2023
1 parent 9bbabcd commit 071604c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/file_storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,24 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "file_storage" {
}
}

resource "aws_s3_bucket_versioning" "file_storage" {
bucket = aws_s3_bucket.file_storage.id
versioning_configuration {
status = "Enabled"
}
}

resource "aws_s3_bucket_configuration" "file_storage" {
depends_on = [aws_s3_bucket_versioning.file_storage]
bucket = aws_s3_bucket.file_storage.id
rule {
id = "noncurrent-version-expiration"
status = "Enabled"
noncurrent_version_expiration = {
noncurrent_days = 30
}
}
}


# Give the bucket permission to send messages onto the queue. Looks like we
Expand Down

0 comments on commit 071604c

Please sign in to comment.