File tree Expand file tree Collapse file tree
infrastructure/modules/eventpub Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module "s3bucket_event_cache" {
2- source = " git:: https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket?ref=v1 .0.8 "
2+ source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2 .0.30/terraform-s3bucket.zip "
33
44 count = var. enable_event_cache ? 1 : 0
55
@@ -36,9 +36,10 @@ module "s3bucket_event_cache" {
3636 }
3737 ]
3838
39- policy_documents = [
40- data . aws_iam_policy_document . s3bucket_event_cache [0 ]. json
41- ]
39+ policy_documents = concat (
40+ [data . aws_iam_policy_document . s3bucket_event_cache [0 ]. json ],
41+ var. additional_policies_for_event_cache_bucket
42+ )
4243
4344 public_access = {
4445 block_public_acls = true
Original file line number Diff line number Diff line change @@ -123,3 +123,9 @@ variable "force_destroy" {
123123 description = " When enabled will force destroy event-cache S3 bucket"
124124 default = false
125125}
126+
127+ variable "additional_policies_for_event_cache_bucket" {
128+ type = list (string )
129+ description = " A list of JSON policies to use to build the bucket policy"
130+ default = []
131+ }
You can’t perform that action at this time.
0 commit comments