Enable bucket versioning for tfstate

This commit is contained in:
Jake Howard 2020-04-02 18:26:18 +01:00
parent be068a774a
commit 20e114f9b3
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -5,6 +5,19 @@ resource "aws_iam_user" "terraform" {
resource "aws_s3_bucket" "tfstate" { resource "aws_s3_bucket" "tfstate" {
bucket = "0rng-terraform" bucket = "0rng-terraform"
acl = "private" acl = "private"
versioning {
enabled = true
}
lifecycle_rule {
enabled = true
noncurrent_version_expiration {
days = 30
}
}
} }
resource "aws_iam_user_policy" "terraform" { resource "aws_iam_user_policy" "terraform" {