[PR #55] [CLOSED] feat(infrastructure): Terraform AWS infrastructure with multi-environment support #95

Closed
opened 2026-02-27 07:20:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/KeygraphHQ/shannon/pull/55
Author: @Dumorro
Created: 1/19/2026
Status: Closed

Base: mainHead: 009-terraform-infrastructure


📝 Commits (10+)

  • 9a5f959 docs: add SaaS transformation plan and PRD
  • 95b42d9 docs: add investor pitch deck for Shannon SaaS
  • 716285e docs: add comprehensive 3-year financial model
  • 3c3eb4e feat: add onboarding feature with Next.js web app and Speckit workflow
  • f84d284 Merge pull request #1 from Dumorro/001-onboarding-setup
  • 9372557 feat: implement core scanning functionality for MVP (Phase 2-3)
  • bfe1f07 feat(auth): implement email/password authentication and account management (Phase 4)
  • 762012b feat(web): implement organization management (Phase 5 / User Story 3)
  • a08b4e4 feat(web): implement team collaboration (Phase 6 / User Story 4)
  • ecab3cf feat(web): implement multi-factor authentication (Phase 7 / User Story 5)

📊 Changes

4416 files changed (+110405 additions, -1189979 deletions)

View changed files

.claude/commands/speckit.analyze.md (+184 -0)
.claude/commands/speckit.checklist.md (+294 -0)
.claude/commands/speckit.clarify.md (+181 -0)
.claude/commands/speckit.constitution.md (+82 -0)
.claude/commands/speckit.implement.md (+135 -0)
.claude/commands/speckit.plan.md (+89 -0)
.claude/commands/speckit.specify.md (+258 -0)
.claude/commands/speckit.tasks.md (+137 -0)
.claude/commands/speckit.taskstoissues.md (+30 -0)
.claude/settings.local.json (+21 -0)
.doc/saas/architecture.md (+734 -0)
.doc/saas/financial-model.md (+1253 -0)
.doc/saas/idea.md (+998 -0)
.doc/saas/pitch-deck.md (+511 -0)
.doc/saas/prd.md (+1312 -0)
📝 .env.example (+33 -2)
.github/workflows/test.yml (+47 -0)
📝 .gitignore (+39 -0)
.specify/memory/constitution.md (+207 -0)
.specify/scripts/powershell/check-prerequisites.ps1 (+148 -0)

...and 80 more files

📄 Description

Summary

Implements Terraform infrastructure-as-code for AWS, providing a complete foundation for deploying Shannon platform resources across dev, staging, and production environments.

Changes

Phase 1: Project Setup

  • Terraform version constraint (1.6.0) via .terraform-version
  • TFLint configuration with AWS ruleset for linting
  • Infrastructure README with quick start guide
  • Updated .gitignore with Terraform patterns

Phase 2: Bootstrap Module

  • S3 bucket for remote state storage (AES-256 encryption, versioning enabled)
  • DynamoDB table for state locking
  • Public access blocking on state bucket

Phase 3: Networking Module + Dev Environment

  • Networking module with:
    • VPC with configurable CIDR
    • Public and private subnets across multiple AZs
    • Internet Gateway and NAT Gateway(s)
    • Route tables with proper associations
    • Security groups for ALB, application servers, and databases
  • Dev environment configured with cost-optimized settings (t3.micro, single NAT)

Phase 4: Multi-Environment Support

  • Staging environment: t3.small instances, single NAT, 10.1.0.0/16 CIDR
  • Production environment: t3.medium instances, multi-AZ NAT (HA), 3 AZs, 10.2.0.0/16 CIDR

Environment Comparison

Setting Dev Staging Prod
VPC CIDR 10.0.0.0/16 10.1.0.0/16 10.2.0.0/16
Availability Zones 2 2 3
Instance Type t3.micro t3.small t3.medium
NAT Gateway Single Single Multi-AZ
ASG Min/Max 1/2 2/4 3/10
RDS Multi-AZ No No Yes

Specification Updates

  • Added 5 clarifications to spec.md (IAM permissions, promotion workflow, naming convention, timeouts, validation)
  • Updated author-review checklist (15/15 items resolved)
  • Marked 33/90 tasks complete in tasks.md

Testing

Terraform CLI validation required locally:

cd infrastructure/bootstrap && terraform init && terraform validate
cd infrastructure/environments/dev && terraform init && terraform validate
cd infrastructure/environments/staging && terraform init && terraform validate
cd infrastructure/environments/prod && terraform init && terraform validate
Related
Spec: specs/009-terraform-infrastructure/spec.md
Tasks: specs/009-terraform-infrastructure/tasks.md (33/90 complete)


---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/KeygraphHQ/shannon/pull/55 **Author:** [@Dumorro](https://github.com/Dumorro) **Created:** 1/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `009-terraform-infrastructure` --- ### 📝 Commits (10+) - [`9a5f959`](https://github.com/KeygraphHQ/shannon/commit/9a5f95921b1dcafbb413812cffce8d1a0a2a9f65) docs: add SaaS transformation plan and PRD - [`95b42d9`](https://github.com/KeygraphHQ/shannon/commit/95b42d9d6222988c57e781ad9f1dd35fafac514d) docs: add investor pitch deck for Shannon SaaS - [`716285e`](https://github.com/KeygraphHQ/shannon/commit/716285e7ac78b6dd0f941295a12cc93308165b80) docs: add comprehensive 3-year financial model - [`3c3eb4e`](https://github.com/KeygraphHQ/shannon/commit/3c3eb4e29a9d0a07fd1eb61469305ac61d2e34c2) feat: add onboarding feature with Next.js web app and Speckit workflow - [`f84d284`](https://github.com/KeygraphHQ/shannon/commit/f84d28486a062d05efca9d5e1c1ed73ef5c23052) Merge pull request #1 from Dumorro/001-onboarding-setup - [`9372557`](https://github.com/KeygraphHQ/shannon/commit/937255797f061b9dbcaadebd250fb01a04ac9211) feat: implement core scanning functionality for MVP (Phase 2-3) - [`bfe1f07`](https://github.com/KeygraphHQ/shannon/commit/bfe1f0786ee93d81d897a6e1ac67a633052dea39) feat(auth): implement email/password authentication and account management (Phase 4) - [`762012b`](https://github.com/KeygraphHQ/shannon/commit/762012b070c3b3641c64c5cd60370ba59c3f8a73) feat(web): implement organization management (Phase 5 / User Story 3) - [`a08b4e4`](https://github.com/KeygraphHQ/shannon/commit/a08b4e4405df5f5b63bb33b07f81280627773c57) feat(web): implement team collaboration (Phase 6 / User Story 4) - [`ecab3cf`](https://github.com/KeygraphHQ/shannon/commit/ecab3cf5cd14f6b7919ec5f34c3a149a51ee11d0) feat(web): implement multi-factor authentication (Phase 7 / User Story 5) ### 📊 Changes **4416 files changed** (+110405 additions, -1189979 deletions) <details> <summary>View changed files</summary> ➕ `.claude/commands/speckit.analyze.md` (+184 -0) ➕ `.claude/commands/speckit.checklist.md` (+294 -0) ➕ `.claude/commands/speckit.clarify.md` (+181 -0) ➕ `.claude/commands/speckit.constitution.md` (+82 -0) ➕ `.claude/commands/speckit.implement.md` (+135 -0) ➕ `.claude/commands/speckit.plan.md` (+89 -0) ➕ `.claude/commands/speckit.specify.md` (+258 -0) ➕ `.claude/commands/speckit.tasks.md` (+137 -0) ➕ `.claude/commands/speckit.taskstoissues.md` (+30 -0) ➕ `.claude/settings.local.json` (+21 -0) ➕ `.doc/saas/architecture.md` (+734 -0) ➕ `.doc/saas/financial-model.md` (+1253 -0) ➕ `.doc/saas/idea.md` (+998 -0) ➕ `.doc/saas/pitch-deck.md` (+511 -0) ➕ `.doc/saas/prd.md` (+1312 -0) 📝 `.env.example` (+33 -2) ➕ `.github/workflows/test.yml` (+47 -0) 📝 `.gitignore` (+39 -0) ➕ `.specify/memory/constitution.md` (+207 -0) ➕ `.specify/scripts/powershell/check-prerequisites.ps1` (+148 -0) _...and 80 more files_ </details> ### 📄 Description ### Summary Implements Terraform infrastructure-as-code for AWS, providing a complete foundation for deploying Shannon platform resources across dev, staging, and production environments. ### Changes #### Phase 1: Project Setup - Terraform version constraint (1.6.0) via `.terraform-version` - TFLint configuration with AWS ruleset for linting - Infrastructure README with quick start guide - Updated `.gitignore` with Terraform patterns #### Phase 2: Bootstrap Module - S3 bucket for remote state storage (AES-256 encryption, versioning enabled) - DynamoDB table for state locking - Public access blocking on state bucket #### Phase 3: Networking Module + Dev Environment - **Networking module** with: - VPC with configurable CIDR - Public and private subnets across multiple AZs - Internet Gateway and NAT Gateway(s) - Route tables with proper associations - Security groups for ALB, application servers, and databases - **Dev environment** configured with cost-optimized settings (t3.micro, single NAT) #### Phase 4: Multi-Environment Support - **Staging environment**: t3.small instances, single NAT, 10.1.0.0/16 CIDR - **Production environment**: t3.medium instances, multi-AZ NAT (HA), 3 AZs, 10.2.0.0/16 CIDR ### Environment Comparison | Setting | Dev | Staging | Prod | |---------|-----|---------|------| | VPC CIDR | 10.0.0.0/16 | 10.1.0.0/16 | 10.2.0.0/16 | | Availability Zones | 2 | 2 | 3 | | Instance Type | t3.micro | t3.small | t3.medium | | NAT Gateway | Single | Single | Multi-AZ | | ASG Min/Max | 1/2 | 2/4 | 3/10 | | RDS Multi-AZ | No | No | Yes | ### Specification Updates - Added 5 clarifications to spec.md (IAM permissions, promotion workflow, naming convention, timeouts, validation) - Updated author-review checklist (15/15 items resolved) - Marked 33/90 tasks complete in tasks.md ### Testing Terraform CLI validation required locally: ```bash cd infrastructure/bootstrap && terraform init && terraform validate cd infrastructure/environments/dev && terraform init && terraform validate cd infrastructure/environments/staging && terraform init && terraform validate cd infrastructure/environments/prod && terraform init && terraform validate Related Spec: specs/009-terraform-infrastructure/spec.md Tasks: specs/009-terraform-infrastructure/tasks.md (33/90 complete) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:20:24 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shannon-KeygraphHQ#95
No description provided.