File tree Expand file tree Collapse file tree
infrastructure/terraform/components/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ No requirements.
4545| ------| --------| ---------|
4646| <a name =" module_authorizer_lambda " ></a > [ authorizer\_ lambda] ( #module\_ authorizer\_ lambda ) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
4747| <a name =" module_domain_truststore " ></a > [ domain\_ truststore] ( #module\_ domain\_ truststore ) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-s3bucket.zip | n/a |
48- | <a name =" module_eventpub " ></a > [ eventpub] ( #module\_ eventpub ) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26 /terraform-eventpub.zip | n/a |
48+ | <a name =" module_eventpub " ></a > [ eventpub] ( #module\_ eventpub ) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.31 /terraform-eventpub.zip | n/a |
4949| <a name =" module_eventsub " ></a > [ eventsub] ( #module\_ eventsub ) | ../../modules/eventsub | n/a |
5050| <a name =" module_get_letter " ></a > [ get\_ letter] ( #module\_ get\_ letter ) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
5151| <a name =" module_get_letter_data " ></a > [ get\_ letter\_ data] ( #module\_ get\_ letter\_ data ) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.29/terraform-lambda.zip | n/a |
Original file line number Diff line number Diff line change 11module "eventpub" {
2- source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26 /terraform-eventpub.zip"
2+ source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.31 /terraform-eventpub.zip"
33
44 name = " eventpub"
55
@@ -27,4 +27,51 @@ module "eventpub" {
2727
2828 data_plane_bus_arn = var. eventpub_data_plane_bus_arn
2929 control_plane_bus_arn = var. eventpub_control_plane_bus_arn
30+
31+ additional_policies_for_event_cache_bucket = [
32+ data . aws_iam_policy_document . eventcache [0 ]. json
33+ ]
34+ }
35+ data "aws_iam_policy_document" "eventcache" {
36+ count = local. event_cache_bucket_name != null ? 1 : 0
37+ statement {
38+ sid = " AllowGlueListBucketAndGetLocation"
39+ effect = " Allow"
40+
41+ principals {
42+ type = " AWS"
43+ identifiers = [aws_iam_role . glue_role . arn ]
44+ }
45+
46+ actions = [
47+ " s3:ListBucket" ,
48+ " s3:GetBucketLocation"
49+ ]
50+
51+ resources = [
52+ " arn:aws:s3:::${ local . csi_global } -eventcache"
53+ ]
54+ }
55+
56+ # Object-level permissions: Get/Put/Delete objects
57+ statement {
58+ sid = " AllowGlueObjectAccess"
59+ effect = " Allow"
60+
61+ principals {
62+ type = " AWS"
63+ identifiers = [aws_iam_role . glue_role . arn ]
64+ }
65+
66+ actions = [
67+ " s3:GetObject" ,
68+ " s3:GetObjectVersion" ,
69+ " s3:PutObject" ,
70+ " s3:DeleteObject"
71+ ]
72+
73+ resources = [
74+ " arn:aws:s3:::${ local . csi_global } -eventcache/*"
75+ ]
76+ }
3077}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments