Enable bucket versioning for tfstate
This commit is contained in:
parent
be068a774a
commit
20e114f9b3
1 changed files with 13 additions and 0 deletions
|
@ -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" {
|
||||||
|
|
Loading…
Reference in a new issue