From 53bd4e9e13302eda9c746f3e3a5b478dc8ce6356 Mon Sep 17 00:00:00 2001 From: lee-mk-joseph Date: Tue, 30 Apr 2024 15:35:10 +0100 Subject: [PATCH 1/2] Access logging config for 3 --- groups/fil/s3.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/groups/fil/s3.tf b/groups/fil/s3.tf index 37a2221..c9dd19a 100644 --- a/groups/fil/s3.tf +++ b/groups/fil/s3.tf @@ -52,3 +52,11 @@ resource "aws_s3_bucket_public_access_block" "ef_presenter_data" { ignore_public_acls = true restrict_public_buckets = true } + +module "s3_access_logging" { + source = "git@github.com:companieshouse/terraform-modules//aws/s3_access_logging?ref=tags/1.0.262" + + aws_account = var.aws_account + aws_region = var.region + source_s3_bucket_id = aws_s3_bucket.ef_presenter_data.id +} From 1c68d2c3ae5da475052e3da56234b3a23d4d217a Mon Sep 17 00:00:00 2001 From: Jake Metherell Date: Fri, 3 May 2024 18:52:51 +0100 Subject: [PATCH 2/2] Move s3_access_logging module reference to main.tf --- groups/fil/main.tf | 14 ++++++++++++++ groups/fil/s3.tf | 8 -------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/groups/fil/main.tf b/groups/fil/main.tf index 655a9b9..9bd8593 100644 --- a/groups/fil/main.tf +++ b/groups/fil/main.tf @@ -14,3 +14,17 @@ terraform { provider "aws" { region = var.region } + +#################################################################################################### +## S3 access logging +#################################################################################################### + +module "s3_access_logging" { + source = "git@github.com:companieshouse/terraform-modules//aws/s3_access_logging?ref=tags/1.0.264" + + count = local.ef_presenter_data_count + + aws_account = var.aws_account + aws_region = var.region + source_s3_bucket_name = local.ef_presenter_data_bucket_name +} diff --git a/groups/fil/s3.tf b/groups/fil/s3.tf index c9dd19a..37a2221 100644 --- a/groups/fil/s3.tf +++ b/groups/fil/s3.tf @@ -52,11 +52,3 @@ resource "aws_s3_bucket_public_access_block" "ef_presenter_data" { ignore_public_acls = true restrict_public_buckets = true } - -module "s3_access_logging" { - source = "git@github.com:companieshouse/terraform-modules//aws/s3_access_logging?ref=tags/1.0.262" - - aws_account = var.aws_account - aws_region = var.region - source_s3_bucket_id = aws_s3_bucket.ef_presenter_data.id -}