Add project_name length validation and documentation - #169
Merged
Conversation
Long project_name values cause Terraform failures when derived AWS resource names exceed service limits (e.g., S3 bucket 63-char limit, ALB target group 32-char limit). Add Terraform variable validations at the environment level (dev ≤ 22 chars, prod ≤ 21 chars) and lifecycle preconditions in the ALB module for defense-in-depth. Document the constraints in both READMEs. Closes #168 Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.
Summary
validationblocks onproject_namein dev (≤22 chars) and prod (≤21 chars) environments to fail fast at plan time when names are too longlifecyclepreconditionblocks in the ALB module on ALB, target groups, and S3 buckets for defense-in-depth validationinfrastructure/README.mdandREADME.mdCloses #168
Test plan
terraform planinenvironments/devwith defaultproject_name(20 chars) — should succeedterraform planwith aproject_nameexceeding 22 chars (e.g.,us-ent-east-aws-infra-visualizer) — should fail with a clear validation errorterraform planwith an invalid format (e.g.,-bad-name-) — should fail with format validation errorinfrastructure/README.mdrenders the "Project Name Limitations" section correctly🤖 Generated with Claude Code