File tree Expand file tree Collapse file tree
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.
Original file line number Diff line number Diff line change @@ -126,4 +126,44 @@ data "aws_iam_policy_document" "s3bucket_event_cache" {
126126 ]
127127 }
128128 }
129+ statement {
130+ sid = " AllowGlueListBucketAndGetLocation"
131+ effect = " Allow"
132+
133+ principals {
134+ type = " AWS"
135+ identifiers = [var . glue_role_arn ]
136+ }
137+
138+ actions = [
139+ " s3:ListBucket" ,
140+ " s3:GetBucketLocation"
141+ ]
142+
143+ resources = [
144+ " arn:aws:s3:::${ module . s3bucket_event_cache [0 ]. bucket } "
145+ ]
146+ }
147+
148+ # Object-level permissions: Get/Put/Delete objects
149+ statement {
150+ sid = " AllowGlueObjectAccess"
151+ effect = " Allow"
152+
153+ principals {
154+ type = " AWS"
155+ identifiers = [var . glue_role_arn ]
156+ }
157+
158+ actions = [
159+ " s3:GetObject" ,
160+ " s3:GetObjectVersion" ,
161+ " s3:PutObject" ,
162+ " s3:DeleteObject"
163+ ]
164+
165+ resources = [
166+ " arn:aws:s3:::${ module . s3bucket_event_cache [0 ]. bucket } /*"
167+ ]
168+ }
129169}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments