Skip to content

Commit 5532418

Browse files
Merge pull request #153 from NHSDigital/feature/CCM-14600_Enable_Access_Logging_For_EventCache_Buckets
CCM-14600: Enable Access Logging for Event Cache Buckets
2 parents 67c5b88 + c69a5ae commit 5532418

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

infrastructure/terraform/modules/eventpub/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
| Name | Description | Type | Default | Required |
1313
|------|-------------|------|---------|:--------:|
14+
| <a name="input_access_logging_bucket"></a> [access\_logging\_bucket](#input\_access\_logging\_bucket) | S3 Access logging bucket name. | `string` | `""` | no |
1415
| <a name="input_additional_policies_for_event_cache_bucket"></a> [additional\_policies\_for\_event\_cache\_bucket](#input\_additional\_policies\_for\_event\_cache\_bucket) | A list of JSON policies to use to build the bucket policy | `list(string)` | `[]` | no |
1516
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
1617
| <a name="input_component"></a> [component](#input\_component) | The name of the terraformscaffold component calling this module | `string` | n/a | yes |
@@ -41,7 +42,7 @@
4142

4243
| Name | Source | Version |
4344
|------|--------|---------|
44-
| <a name="module_s3bucket_event_cache"></a> [s3bucket\_event\_cache](#module\_s3bucket\_event\_cache) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.30/terraform-s3bucket.zip | n/a |
45+
| <a name="module_s3bucket_event_cache"></a> [s3bucket\_event\_cache](#module\_s3bucket\_event\_cache) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/3.0.3/terraform-s3bucket.zip | n/a |
4546
## Outputs
4647

4748
| Name | Description |

infrastructure/terraform/modules/eventpub/module_s3bucket_event_cache.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "s3bucket_event_cache" {
2-
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.30/terraform-s3bucket.zip"
2+
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/3.0.3/terraform-s3bucket.zip"
33

44
count = var.enable_event_cache ? 1 : 0
55

@@ -41,6 +41,11 @@ module "s3bucket_event_cache" {
4141
var.additional_policies_for_event_cache_bucket
4242
)
4343

44+
bucket_logging_target = {
45+
bucket = "${var.access_logging_bucket}"
46+
}
47+
48+
4449
public_access = {
4550
block_public_acls = true
4651
block_public_policy = true

infrastructure/terraform/modules/eventpub/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,9 @@ variable "event_publishing_anomaly_band_width" {
153153
description = "The width of the anomaly detection band. Higher values (e.g. 4-6) reduce sensitivity and noise, lower values (e.g. 2-3) increase sensitivity. Recommended: 2-4."
154154
default = 5
155155
}
156+
157+
variable "access_logging_bucket" {
158+
type = string
159+
description = "S3 Access logging bucket name."
160+
default = ""
161+
}

0 commit comments

Comments
 (0)