frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Using Terraform in *Local* Dev for Reproducible, High-Fidelity Dev Environments

https://runharbor.com/blog/2025-09-30-terraform-for-high-fidelity-local-dev-infra
3•18nleung•1h ago

Comments

18nleung•1h ago
Author here. Wrote a bit about how we use Terraform for local dev at work. 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!

mystifyingpoi•1h ago
I strongly believe, that local dev is a must and the entire system (or at least the part needed to start working on any given microservice) should be runnable on a laptop, no matter how big it is. Sure, there might be a need to mock S3 with Minio, or a payment gateway with some handwritten stub in one-file Python webservice, but that's how it should be.

I've seen lazy devs ignore the underlying issue, and then just push over and over broken code and wait 10-15 min for CI to push new version to the evironment. It's maddening.

ycombinatrix•44m ago
so they already had the environment working in docker-compose, then ported it to terraform for seemingly no reason

Plans for Building Democranet: A new on-chain voting system for governance

https://nickmudge.com/plans-for-building-democranet
1•mudge•4m ago•0 comments

Autism, A.D.H.D., Anxiety: Can a Diagnosis Make You Better?

https://www.nytimes.com/2025/10/03/health/can-a-diagnosis-make-you-better.html
2•whack•11m ago•0 comments

Formally Verified Code Benchmark

https://arxiv.org/abs/2509.22908
1•yuppiemephisto•11m ago•0 comments

Summary of Nix drama so far. Sep27 – Oct4 2025

https://gist.github.com/jonringer/37ea49415bdd06015e7ae5b7661d3696
1•srid•12m ago•0 comments

Thin for the Win: Qualcomm Shows Fanless Desktop PCs Powered Snapdragon X2 Elite

https://www.pcmag.com/news/snapdragon-summit-qualcomm-slim-fanless-desktop-pcs-snapdragon-x2-elite
1•walterbell•15m ago•0 comments

The Free Software Foundation is livestreaming its 40th anniversary celebration

https://www.fsf.org/live
1•MilnerRoute•17m ago•2 comments

Show HN: Imbi-Automations

https://aweber-imbi.github.io/imbi-automations/
2•crad•20m ago•0 comments

Why NetNewsWire Is Not a Web App

https://inessential.com/2025/10/04/why-netnewswire-is-not-web-app.html
4•frizlab•20m ago•1 comments

Saturn's moon Enceladus shows potential for habitability

https://cosmosmagazine.com/space/astronomy/saturn-moon-habitability/
1•gmays•21m ago•0 comments

Economics and AI (Tom Cunningham)

https://tecunningham.github.io/posts/2025-09-19-transformative-AI-notes.html
1•deepdarkforest•21m ago•0 comments

Microsoft 365 Copilot is a commercial failure

https://www.perspectives.plus/p/microsoft-365-copilot-commercial-failure
4•jukkan•22m ago•4 comments

Why Conservatives Are Attacking 'Wokepedia'

https://www.wsj.com/tech/wikipedia-conservative-complaints-ee904b0b
1•voxadam•22m ago•1 comments

Nimletter – Self-hosted newsletter, drip and transactional email system

https://github.com/ThomasTJdev/nimletter
1•TheWiggles•22m ago•0 comments

On Agency, and Design

https://uditsaxena.bearblog.dev/on-agency-and-design/
1•wavelander•27m ago•0 comments

Israel accused of detaining Thunberg in infested cell and making her hold flags

https://www.theguardian.com/world/2025/oct/04/greta-thunberg-israel-gaza-sweden
8•tareqak•31m ago•0 comments

ProPublica Releases New Private School Demographics Lookup

https://www.propublica.org/article/propublica-private-school-demographics-lookup
1•mooreds•33m ago•0 comments

New Poll: Democratic Socialism Is Now Mainstream

https://jacobin.com/2025/09/new-poll-democratic-socialism-mainstream/
24•PaulHoule•34m ago•2 comments

Show HN: OneDollarChat – Global chat where messages cost $1

https://www.onedollarchat.com/
1•skrid•34m ago•1 comments

How Thomas Peterffy automated trading, made Interactive Brokers a $100B business

https://joincolossus.com/article/thomas-peterffy-market-maker/
1•Geekette•36m ago•0 comments

Investor Convicted of Stealing Homes Is Jailed

https://www.nytimes.com/2025/10/03/realestate/sanford-solny-deed-thief-jailed.html
2•randycupertino•36m ago•1 comments

Show HN: ZapForms – Create public forms with instant APIs and webhooks

https://zapforms.io
1•skrid•36m ago•0 comments

Native iOS SwiftUI Client for Actual Budget

https://github.com/BearTS/actual-budget-app
2•todsacerdoti•39m ago•0 comments

When your ISP pays you

https://pluralistic.net/2025/10/03/we-dont-care-we-dont-have-to/
1•freddydumont•40m ago•0 comments

LinkedIn's CEO is saying the future of work won't belong to people with degrees

https://fortune.com/2025/10/02/gen-z-graduates-linkedin-ceo-college-degrees-future-of-work-ai-ski...
2•Ozarkian•44m ago•0 comments

Tidy text: Sloppy notes that auto-correct, one line at a time

https://blog.florianschulz.info/2025/10/tidy-text/
2•florians•44m ago•1 comments

Show HN: Namo Turn Detector v1 – High-performance, semantic turn detection

https://github.com/videosdk-live/NAMO-Turn-Detector-v1
1•arjunkava•46m ago•0 comments

Ask HN: What's the secret sauce behind Claude Projects ?

1•excitednscared•47m ago•0 comments

Dexfile: One-Click PaaS Deployments with Dockerfile-Like Syntax

1•dexfile•48m ago•0 comments

Egypt reopens Amenhotep III's tomb after more than 20 years of renovations

https://www.timesofisrael.com/egypt-reopens-amenhotep-iiis-tomb-after-more-than-20-years-of-renov...
1•wslh•48m ago•0 comments

How2neovim – An opinionated guide on setting up Neovim from scratch

https://jacksmithxyz.github.io/how2neovim/
1•fixedprog•49m ago•0 comments