Skip to content

Conversation

@edhall-nhs
Copy link
Contributor

Summary

  • Routine Change
  • ⚠️ Potential issues that might be caused by this change

This PR:

  • Brings all lambda names into alignment by using hyphens instead of underscores where there was a mix previously.
  • Reuses the lambda name local variable where possible.
  • Replaces hard coded AWS region with the global variable.

Since the names of some lambdas have changed this could have unwanted effects. They should be mapped accordingly but we should be careful.

Reviews Required

  • Dev
  • Test
  • Tech Author
  • Product Owner

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all of the acceptance criteria of the ticket.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • If there were changes that are outside of the regular release processes e.g. account infrastructure to setup, manual setup for external API integrations, secrets to set, then I have checked that the developer has flagged this to the Tech Lead as release steps.
  • I have checked that no Personal Identifiable Data (PID) is logged as part of the changes.

Also tidy us hard coded aws regions and use vars instead
@github-actions
Copy link
Contributor

This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket:

VED-1040

REDIS_HOST = data.aws_elasticache_cluster.existing_redis.cache_nodes[0].address
REDIS_PORT = data.aws_elasticache_cluster.existing_redis.cache_nodes[0].port
REDIS_SYNC_PROC_LAMBDA_NAME = "imms-${var.sub_environment}-redis_sync_lambda"
REDIS_SYNC_PROC_LAMBDA_NAME = local.redis_sync_lambda_name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we use this environment variable anywhere? Same probably goes for the SPLUNK_FIREHOSE_NAME.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REDIS_SYNC_PROC_LAMBDA_NAME doesn't appear to be used anywhere in the repo so will delete
I think SPLUNK_FIREHOSE_NAME will be needed as the handler is decorated with the logging decorator

variable "mesh_mailbox_ids" {}
variable "mesh_dlq_mailbox_id" {}
variable "aws_region" {
default = "eu-west-2"
Copy link
Collaborator

@dlzhry2nhs dlzhry2nhs Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional, probably not needed as is inconsistent with the other directories, unless we wanna apply elsewhere.

But terraform offers variable validation. We are only really ever meant to deploy NHS services into eu-west-2. Any developer could override ultimately (so there is limited value), so it relies on higher-level controls etc. But a simple validation could help to express intent.

https://developer.hashicorp.com/terraform/language/block/variable#validation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into this. Sounds like it's worth adding since we're having a tidy 👍

Copy link
Contributor Author

@edhall-nhs edhall-nhs Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A note on this, I noticed we have some AWS shield related stuff set to us-east-1. I'm not too clued up on it so is this an exception and it needs to be in us-east-1?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah my bad. Forgot about those, yes some of those would be global services for the Cyber Security monitoring which are only available there. I think all the resources we deploy that use the variable are eu-west-2. But if it causes issues just dismiss and merge.

dlzhry2nhs
dlzhry2nhs previously approved these changes Jan 30, 2026
@JamesW1-NHS JamesW1-NHS self-requested a review January 30, 2026 11:44
JamesW1-NHS
JamesW1-NHS previously approved these changes Jan 30, 2026
@sonarqubecloud
Copy link

@edhall-nhs edhall-nhs temporarily deployed to internal-dev-sandbox January 30, 2026 15:18 — with GitHub Actions Inactive
@edhall-nhs edhall-nhs deployed to internal-dev-sandbox January 30, 2026 15:18 — with GitHub Actions Active
@edhall-nhs edhall-nhs deployed to internal-dev January 30, 2026 15:21 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants