Skip to content

Commit 574c026

Browse files
committed
comments
1 parent 8afd7c2 commit 574c026

File tree

2 files changed

+19
-24
lines changed

2 files changed

+19
-24
lines changed

infra/mesh.tf

Lines changed: 0 additions & 20 deletions
This file was deleted.

infra/mesh_processor.tf

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ locals {
33
create_mesh_processor = var.mesh_mailbox_id != null
44
}
55

6+
# MESH Client Module - conditionally created based on environment configuration
7+
module "mesh" {
8+
count = local.create_mesh_processor ? 1 : 0
9+
source = "git::https://github.com/nhsdigital/terraform-aws-mesh-client.git//module?ref=v2.1.5"
10+
11+
name_prefix = "imms-${var.environment}"
12+
mesh_env = var.environment == "prod"? "production" : "integration"
13+
subnet_ids = data.aws_subnets.default.ids
14+
15+
mailbox_ids = [var.mesh_mailbox_id]
16+
verify_ssl = "true"
17+
get_message_max_concurrency = 10
18+
compress_threshold = 1 * 1024 * 1024
19+
handshake_schedule = "rate(24 hours)"
20+
21+
account_id = var.imms_account_id
22+
}
23+
624
# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
725
locals {
826
mesh_processor_lambda_dir = abspath("${path.root}/../mesh_processor")
@@ -146,10 +164,7 @@ resource "aws_iam_policy" "mesh_processor_lambda_exec_policy" {
146164
Resource = [
147165
"arn:aws:s3:::${local.mesh_s3_bucket_name}",
148166
"arn:aws:s3:::${local.mesh_s3_bucket_name}/*",
149-
"arn:aws:s3:::${local.mesh_s3_logs_bucket_name}/*",
150-
"arn:aws:s3:::local-immunisation-mesh",
151-
"arn:aws:s3:::local-immunisation-mesh/*",
152-
"arn:aws:s3:::local-immunisation-mesh-s3logs/*"
167+
"arn:aws:s3:::${local.mesh_s3_logs_bucket_name}/*"
153168
]
154169
}
155170
]

0 commit comments

Comments
 (0)