Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prod - add s3 MFA delete for s3-logs and tf-state #88

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions state_bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ resource "aws_s3_bucket" "s3-logs" {

versioning {
enabled = true
mfa_delete = var.s3_env
}

lifecycle_rule {
Expand Down Expand Up @@ -120,6 +121,7 @@ resource "aws_s3_bucket" "tf-state" {
policy = ""
versioning {
enabled = true
mfa_delete = var.s3_env
}

logging {
Expand Down
5 changes: 5 additions & 0 deletions state_bucket/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "s3_env" {
description = "Environment where the s3 bucket is being deployed (sandbox/stage/prod)"
type = string
default = "false"
}