Skip to content

Add project_name length validation and documentation - #169

Merged
strick-j merged 1 commit into
mainfrom
fix/project-name-length-validation
Feb 19, 2026
Merged

Add project_name length validation and documentation#169
strick-j merged 1 commit into
mainfrom
fix/project-name-length-validation

Conversation

@strick-j

Copy link
Copy Markdown
Owner

Summary

  • Add Terraform validation blocks on project_name in dev (≤22 chars) and prod (≤21 chars) environments to fail fast at plan time when names are too long
  • Add lifecycle precondition blocks in the ALB module on ALB, target groups, and S3 buckets for defense-in-depth validation
  • Document project name length limitations and format rules in infrastructure/README.md and README.md

Closes #168

Test plan

  • Run terraform plan in environments/dev with default project_name (20 chars) — should succeed
  • Run terraform plan with a project_name exceeding 22 chars (e.g., us-ent-east-aws-infra-visualizer) — should fail with a clear validation error
  • Run terraform plan with an invalid format (e.g., -bad-name-) — should fail with format validation error
  • Verify infrastructure/README.md renders the "Project Name Limitations" section correctly

🤖 Generated with Claude Code

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]>
@strick-j
strick-j merged commit df6b9f5 into main Feb 19, 2026
42 checks passed
@strick-j
strick-j deleted the fix/project-name-length-validation branch February 19, 2026 00:17
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.

Document the maximum project_name length

1 participant