File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module "domain_truststore" {
2- source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2 .0.26 /terraform-s3bucket.zip"
2+ source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/3 .0.4 /terraform-s3bucket.zip"
33
44 name = " truststore"
55 aws_account_id = var. aws_account_id
@@ -12,11 +12,9 @@ module "domain_truststore" {
1212 kms_key_arn = module. kms . key_id
1313
1414 bucket_logging_target = {
15- bucket = module.logging_bucket.bucket
16- prefix = " truststore/"
15+ bucket = local.acct.s3_buckets[" access_logs" ][" id" ]
1716 }
1817
1918 policy_documents = [
2019 ]
21-
2220}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11module "eventpub" {
2- source = " git:: https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/terraform/modules/eventpub?ref=feature/CCM-14600_Enable_Access_Logging_For_EventCache_Buckets "
2+ source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/3.0.4/terraform-eventpub.zip "
33
44 name = " eventpub"
55
@@ -28,9 +28,7 @@ module "eventpub" {
2828 data_plane_bus_arn = var. eventpub_data_plane_bus_arn
2929 control_plane_bus_arn = var. eventpub_control_plane_bus_arn
3030
31- eventcache_bucket_logging_target = {
32- bucket = local.acct.s3_buckets[" access_logs" ][" id" ]
33- }
31+ access_logging_bucket = local. acct . s3_buckets [" access_logs" ][" id" ]
3432
3533 additional_policies_for_event_cache_bucket = [
3634 data . aws_iam_policy_document . eventcache [0 ]. json
Original file line number Diff line number Diff line change @@ -27,4 +27,6 @@ module "eventsub" {
2727 enable_event_cache = var. enable_event_cache
2828
2929 shared_infra_account_id = var. shared_infra_account_id
30+
31+ access_logging_bucket = local. acct . s3_buckets [" access_logs" ][" id" ]
3032}
Original file line number Diff line number Diff line change 11module "s3bucket_event_cache" {
2- source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2 .0.26 /terraform-s3bucket.zip"
2+ source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/3 .0.4 /terraform-s3bucket.zip"
33
44 count = var. enable_event_cache ? 1 : 0
55
@@ -40,6 +40,10 @@ module "s3bucket_event_cache" {
4040 data . aws_iam_policy_document . s3bucket_event_cache [0 ]. json
4141 ]
4242
43+ bucket_logging_target = {
44+ bucket = " ${ var . access_logging_bucket } "
45+ }
46+
4347 public_access = {
4448 block_public_acls = true
4549 block_public_policy = true
Original file line number Diff line number Diff line change @@ -119,3 +119,9 @@ variable "glue_role_arn" {
119119 type = string
120120 description = " ARN of the Glue execution role from the parent"
121121}
122+
123+ variable "access_logging_bucket" {
124+ type = string
125+ description = " Name of S3 bucket to use for access logging"
126+ default = " "
127+ }
You can’t perform that action at this time.
0 commit comments