Repository navigation
docs(infra): add READMEs to the rds, redis, secrets, and vpc Terraform modules - #356
Merged
EmeditWeb merged 1 commit intoOct 19, 2026
Conversation
…m modules Each of the four modules under infra/terraform/modules/ had no module-level README, so consuming them meant reading every .tf file first. Add a README to each, following the formatting conventions already used in docs/: an H1 title, an Overview, tables for the resources, inputs, and outputs, a copy-pasteable usage example, and operational notes. Documented per module: - vpc: subnet/AZ count constraints, nat_gateway_count bounds and cost, public vs. private subnet roles, and the modules that consume its outputs. - rds: the empty allowed_cidr_blocks default, master_password landing in state, deletion_protection and skip_final_snapshot behaviour, and writer vs. reader endpoints. - redis: replica_count including the primary, the two-cache-cluster minimum for failover and Multi-AZ, the rediss:// requirement under transit encryption, and auth_token constraints. - secrets: the placeholder-value contract, out-of-band injection, the read policy scope, and the manual rotation procedure. Docs-only change; no .tf file was modified. Closes Elite-Work#320 Closes Elite-Work#321 Closes Elite-Work#322 Closes Elite-Work#323
|
@Osifowora Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a module-level
README.mdto the four Terraform modules that had none, soeach one can be consumed without reading every
.tffile first.rdsinfra/terraform/modules/rds/README.mdredisinfra/terraform/modules/redis/README.mdsecretsinfra/terraform/modules/secrets/README.mdvpcinfra/terraform/modules/vpc/README.mdEach README follows the formatting conventions already used in
docs/: an H1title, a short intro paragraph, then
##sections for Overview,Resources, Inputs, Outputs, Usage, Operational notes, and
Related — with tables for the resources/inputs/outputs, fenced code blocks
for the HCL usage example and CLI snippets, and relative links into
docs/andthe sibling modules.
What each README documents
vpc— the network foundation every other module depends on.rds,redis,eks,admin_isolation) and the factthat the module creates no security groups of its own.
regionis declared forparity with the other modules but is not referenced in the module body.
positionally against
availability_zones,nat_gateway_countmust be>= 1(the private route table association divides by it) and must notexceed
length(public_subnet_cidrs)(NAT gateways land in the first Npublic subnets).
rds— the Aurora PostgreSQL cluster.allowed_cidr_blocksdefaults to[], which means the security group hasno inbound rule at all — nothing, not even the EKS node group, can reach
the database until it is set.
master_passwordis stored on the cluster resource and therefore lands inTerraform state, so the state must stay encrypted (the environment backends
already use
encrypt = true).deletion_protectiondefaults totrueand must be cleared before adestroy;
skip_final_snapshotistruein dev only.replica_countcounts cluster instances and the cluster always keeps onewriter, so
cluster_endpointis for writes andcluster_reader_endpointisfor read-only queries.
redis— the ElastiCache replication group.replica_countmaps straight tonumber_cache_clustersand thereforeincludes the primary — the default of
2is one primary plus onereplica, not two replicas.
automatic_failover_enabledandmulti_az_enabledneed at least two cacheclusters, so
replica_count >= 2whenever either flag is on.transit_encryption_enabled = truemeans the backend'sREDIS_URLmust usethe
rediss://scheme (ioredis) — a plainredis://URL fails thehandshake.
auth_tokenis required, is stored in state, and is rejected by AWS when itis shorter than 16 characters or contains
/,", or@.disruptive operation.
secrets— theADMIN_SECRET_KEYSecrets Manager container.eks_node_role_nameacceptseither a role name or an ARN (the environments pass
module.eks.node_role_arn).REPLACE_WITH_ADMIN_SECRET_KEYversion andignore_changes = [secret_string]keeps it from resetting whatever was injected afterwards.
aws secretsmanager put-secret-value, so it never enters Terraform state,plan output, or CI logs.
GetSecretValueandDescribeSecreton this onesecret, attached to the EKS node role.
aws_secretsmanager_secret_rotationresource, so the README points at theprocedure in
docs/admin-secret-management.mdinstead of claiming automatedrotation.
Scope
Docs only — no
.tffile was modified, and no runtime behaviour, resourceattribute, default, or output changed. All 506 added lines are new README
files.
Every relative link in the new READMEs was verified to resolve to an existing
file, and the one heading anchor (
#rotation,#automated-rotation-optional) was verified against the target document.Related Issues
rdsTerraform module #320redisTerraform module #321secretsTerraform module #322vpcTerraform module #323Type of Change
🔒 Required CI Gates
npm ci,npm run lint,npm run build,npm testinfrontend/(or skipped if nofrontend/changes)npm ci,npm run build,npm testinbackend/(or skipped if nobackend/changes)cargo testincontracts/amana_escrow/(or skipped if nocontracts/changes)npm ci,npm run type-check,npm run lintinmobile/(or skipped if nomobile/changes)PR Checklist
pnpm test/cargo test) — N/A, documentation-only change; no application code touchedREPLACE_WITH_ADMIN_SECRET_KEYand a redacted example key shape, matchingdocs/admin-secret-management.md.Files changed
How to review
infra/terraform/modules/vpc/README.mdfirst — it is the root of themodule dependency graph and explains how the other three consume it.
variableblocks inthat module's
main.tf(name, type, default, required) and the Outputstable against the
outputblocks.part worth a second pair of eyes, since they are derived from reading the
.tffiles rather than from running Terraform.