Skip to content

Commit

Permalink
fix: Added missing dash for buckets with a suffix. (#10)
Browse files Browse the repository at this point in the history
fix: Updated bucket resource to allow replacement with `create_before_destroy`.
  • Loading branch information
jamesiarmes authored Oct 28, 2024
1 parent 159f86e commit 1d34442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#trivy:ignore:avd-aws-0089
resource "aws_s3_bucket" "logs" {
bucket = var.bucket_suffix ? null : "${local.prefix}-logs"
bucket_prefix = var.bucket_suffix ? "${local.prefix}-logs" : null
bucket_prefix = var.bucket_suffix ? "${local.prefix}-logs-" : null

lifecycle {
prevent_destroy = true
create_before_destroy = true
}

tags = var.tags
Expand Down

0 comments on commit 1d34442

Please sign in to comment.