Te

Terraform for *Local* Dev Infra

Hacker News

Terraform for *Local* Dev Infra

Author here with yet another solution for local dev — let me know your thoughts, would love to trade notes. In brief: Our Docker Compose local dev setup started to break down once we had to model more complicated production behavior locally – things like table-specific Postgres roles for audit logs and dynamically provisioned databases per-clinical-trial. We were drifting toward a bespoke Bash mess to keep dev and prod in sync. Our core idea was instead to embrace Terraform in the local dev environment too. We were already using Terraform heavily in prod, and Terraform's robust provider ecosystem meant that we could e.g. substitute Docker containers for RDS and MinIO for S3 without deviating too far from our production configuration. The really fun part is how we use Terraform to handle dynamic provisioning, which we need for isolated, per-clinical-trial databases. The way we do it in prod is by giving each clinical trial its own, isolated Terraform state, stored in a cloud storage bucket. By writing an equivalent local Terraform config for this provisioning step, we enable the app to run the same `terraform apply` command as it does in prod to locally to spin up a new database, with the individual state for that new db stored in a local MinIO bucket... which is itself created by the original `terraform apply` that sets up the initial local dev infrastructure. Altogether, Terraform gives us a super high-fidelity local environment that lets us test complex application behavior and infrastructure logic without the full overhead of spinning up a local k8s cluster (which is what I imagine the next best alternative might be?). It's readable, declarative, and required no new tooling on our side since we were already using Docker and Terraform anyways. Curious to hear how other folks are managing complex local dev setups, especially if you're not on Kubernetes!

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: model, dock, new · Missing: mac, agents, macos
86%86% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: created, started · Missing: supports, reddit linkedin, podcasting
78%78% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
56%56% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
39%39% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
36%36% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
18%18% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Unweave Inc
Unweave Inc26%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Reproducible dev environments and infra for machine learning

Indie Hackers3ai
Br
Brawl.dev51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Brawl.dev

Hacker News3
Ra
RateYourRecruiter.dev49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

RateYourRecruiter.dev

Hacker News13
Pa
Payitfwd.dev – Donate to Dependencies of Dependencies60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Payitfwd.dev – Donate to Dependencies of Dependencies

Hacker News1
Be
Bestcodingpractices.dev60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Bestcodingpractices.dev

Hacker News1
no
nozl.dev61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

nozl.dev

Hacker News2
Bu
Buildo.dev54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Buildo.dev

Hacker News1
Tr
Trendin.dev69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Trendin.dev

Hacker News7
La
Lazytilt TUI for Tilt.dev54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Lazytilt TUI for Tilt.dev

Hacker News2
af
africalatency.dev42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.
TrustMRRwhop