Skip to content

Commit

Permalink
Rename resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Varrkan82 committed Jul 29, 2024
1 parent e33d4d0 commit ba95ee9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ resource "aws_s3_bucket" "this" {
force_destroy = var.force_destroy
}

resource "aws_s3_bucket_acl" "acl" {
resource "aws_s3_bucket_acl" "default" {
bucket = aws_s3_bucket.this.id
acl = "private"
}
# Versioning will not be needed for this
resource "aws_s3_bucket_versioning" "versioning" {
resource "aws_s3_bucket_versioning" "default" {
bucket = aws_s3_bucket.this.id
versioning_configuration {
status = var.enable_versioning
}
}

# Enable encryption at rest
resource "aws_s3_bucket_server_side_encryption_configuration" "encryption_config" {
resource "aws_s3_bucket_server_side_encryption_configuration" "default" {
bucket = aws_s3_bucket.this.id
rule {
apply_server_side_encryption_by_default {
Expand All @@ -45,7 +45,7 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "encryption_config
# Enable lifecycle:
# - After 30 days, data is moved to Standard Infrequent Access
# - After 60 days, data is expired
resource "aws_s3_bucket_lifecycle_configuration" "lifecycle_config" {
resource "aws_s3_bucket_lifecycle_configuration" "default" {
bucket = aws_s3_bucket.this.id
rule {
id = "vpc-flow-log-rule-1"
Expand Down

0 comments on commit ba95ee9

Please sign in to comment.