gabriel / musehub public
04-iac.md markdown
36 lines 2.0 KB
Raw
sha256:7d5985ef251de9f0154f9b185a75cf36174bf73e0c34f5eca133e7bd20224bf4 Merge branch 'feat/opengraph-repo-cards' into dev Human 22 days ago

Section 4 — Infrastructure as Code

Companion to musehub-production-readiness-checklist.md. Document-only pass. No Terraform/CDK/CloudFormation written yet — that's real build work, deferred to after the full sweep per Gabriel's direction.

Current state

No IaC exists. All infrastructure was created by hand via one-off bash scripts (aws-provision.sh, aws-provision-staging.sh, bootstrap-instance.sh, setup-ec2*.sh) or direct console/CLI actions. These scripts are provisioning helpers, not IaC — they're not idempotent state managers, don't track drift, and don't represent a "current state" that can be diffed against reality.

Recommendation (recorded, not yet actioned)

Terraform/OpenTofu — already recorded in the main checklist's Decision Log during Section 0. Rationale unchanged: the actual footprint (2 EC2 instances, 1 SG, 1 ECR repo, 1 S3 bucket, a handful of SSM params, and now confirmed — Cloudflare DNS zone/records, see Section 6) is small and EC2-centric. Terraform has a mature cloudflare provider alongside aws, which matters here since infra now spans both providers, not just AWS.

What the later build pass needs to capture

Everything in "Manually created AWS resources" from the Section 0 doc, plus (per Section 6 finding) the Cloudflare DNS zone and records — Cloudflare state has never been in code either.

Checklist items — all deferred to the build pass

Every remaining Section 4 item (module structure, environment separation, encrypted/locked remote state, provider pinning, static scanning, drift detection, import-existing-resources runbook, tagging standard, teardown guards, deletion protection, policy checks, required review) depends on IaC existing at all. None can be meaningfully started before the tool is chosen and a first module is written. Tracked as a single follow-up: "stand up Terraform/OpenTofu covering the current manually-created resource set, import don't recreate."

File History 1 commit
sha256:be1b2fdf6ab1fc652b3b35a945d0277a36fbf5d96e63692020d36cd7ebe03534 Merge 'docs/security-monitoring-verified' into 'dev' — prop… Human 2 days ago