Skip to content

BCSS-23409 - feat(elasticache)!: create elasticache module#93

Open
nhs-oliverslater wants to merge 6 commits into
mainfrom
feature/BCSS-23409-create-elasticache-module
Open

BCSS-23409 - feat(elasticache)!: create elasticache module#93
nhs-oliverslater wants to merge 6 commits into
mainfrom
feature/BCSS-23409-create-elasticache-module

Conversation

@nhs-oliverslater

Copy link
Copy Markdown
Contributor

Description

Refactor the ElastiCache module to support multiple deployment modes, simplify security group handling, and enhance logging configuration. Update the gitleaks configuration for improved IPv4 and IPv6 rule handling. Align the context.tf file and update documentation for case sensitivity.

Context

These changes are required to improve the flexibility and usability of the ElastiCache module, allowing for various deployment configurations while ensuring better security practices and logging capabilities.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT include any PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that does contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

…eployment modes (replication_group, cluster, serverless)

- Updated locals.tf to define deployment modes and naming conventions.
- Enhanced main.tf to configure ElastiCache resources based on deployment mode.
- Added outputs for replication group, cluster, and serverless cache details.
- Removed deprecated readme.md and updated variables.tf with comprehensive input descriptions.
- Improved validation for engine types, deployment modes, and snapshot configurations.
- Adjusted versions.tf to require compatible provider versions.

BREAKING CHANGE: Replaces exisiting module, replaces all explicit and implicit resources and changes upstream module version. All resources will be re-created.
@nhs-oliverslater nhs-oliverslater marked this pull request as ready for review June 23, 2026 09:36
@nhs-oliverslater nhs-oliverslater requested review from a team and saliceti as code owners June 23, 2026 09:36
@nhs-oliverslater nhs-oliverslater enabled auto-merge (squash) June 23, 2026 11:21
@dave4420 dave4420 changed the title BCSS-23409 - feat(elasticache): create elasticache module BCSS-23409 - feat(elasticache)!: create elasticache module Jun 23, 2026
Comment on lines +125 to +127
# TODO: Pre-create log groups via the cloudwatch module for stronger
# control over KMS key, retention class, and skip_destroy behaviour. Example
# using terraform-aws-modules/cloudwatch/aws//modules/log-group:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this something we need to do before merging?

Or something we're doing in a follow up PR/ticket?

If it's tech debt, could you raise a ticket and include the ticket number in the comment, please?

Comment on lines +323 to +330
## Exemplar Modules

Reference these for patterns:

- [s3-bucket](../s3-bucket) — full wrapper with comprehensive security
- [kms](../kms) — customer-managed key creation
- [security-group](../security-group) — security group patterns
- [sns](../sns) — notification topic setup

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be part of the README for an individual module?

Comment on lines +332 to +343
## Terraform Validation

```bash
# Format
terraform fmt -recursive infrastructure/modules/elasticache

# Initialize (required for validate)
terraform -chdir=infrastructure/modules/elasticache init

# Validate
terraform -chdir=infrastructure/modules/elasticache validate
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again, this doesn't feel like it should be part of consuming developer—facing documentation?

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.

2 participants