Skip to content

Instantly share code, notes, and snippets.

@goyalmohit
Last active September 29, 2020 17:07
Show Gist options
  • Save goyalmohit/971ede1152577b9852c33492548cfd70 to your computer and use it in GitHub Desktop.
Save goyalmohit/971ede1152577b9852c33492548cfd70 to your computer and use it in GitHub Desktop.
terraform {
required_version = ">= 0.12, < 0.13"
}
provider "aws" {
region = "us-east-2"
}
resource "aws_s3_bucket" "terrafrom-state" {
bucket = "terrafrom-state"
lifecycle {
prevent_destroy = true
}
versioning {
enabled = true
}
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment