From c703a2c8ff44f3c801198f7d474aa126c6b3ec0d Mon Sep 17 00:00:00 2001 From: Neal Brown Date: Sat, 11 Feb 2023 21:05:38 -0600 Subject: [PATCH] Added account id to bucket name to ensure uniqueness --- s3.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s3.tf b/s3.tf index aff36c1..c067f19 100644 --- a/s3.tf +++ b/s3.tf @@ -66,7 +66,7 @@ resource "aws_s3_bucket_policy" "audit_log" { resource "aws_s3_bucket" "access_log" { count = var.s3_enabled ? 1 : 0 - bucket = "${var.resource_name_prefix}-access-logs" + bucket = "${var.resource_name_prefix}-${var.aws_account_id}-access-logs" force_destroy = true tags = var.tags } @@ -100,7 +100,7 @@ resource "aws_s3_bucket_public_access_block" "access_log" { resource "aws_s3_bucket" "audit" { count = var.s3_enabled ? 1 : 0 - bucket = "${var.resource_name_prefix}-audit-logs" + bucket = "${var.resource_name_prefix}-${var.aws_account_id}-audit-logs" force_destroy = true tags = var.tags }