惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Jina AI
Jina AI
小众软件
小众软件
GbyAI
GbyAI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
博客园 - 叶小钗
B
Blog
Apple Machine Learning Research
Apple Machine Learning Research
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
有赞技术团队
有赞技术团队
U
Unit 42
博客园 - 司徒正美
博客园 - 聂微东

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Vibe-Coded Infrastructure: How to Ship Fast Without Torch...
James Joyner · 2026-06-23 · via DEV Community

You described what you wanted in plain English, the model wrote the Terraform, you ran apply, and it worked. No docs, no Stack Overflow, no fighting HCL syntax for an hour. That's vibe coding — building by describing intent and riding the model's output — and for infrastructure it is genuinely, addictively fast.

It's also how you accidentally terraform destroy a production VPC at 2 p.m. on a Tuesday.

I run production OpenStack, Kubernetes, and Terraform for a living, and I vibe-code a lot of it now. Here's the honest version of how to keep the speed without the smoking crater — the rules I actually follow.

Vibe coding is great at drafts and terrible at consequences

The thing a model is brilliant at is turning "I need a rate-limited NGINX reverse proxy in front of this service" into 40 lines of config in two seconds. The thing it has no idea about is that this service shares an upstream with the billing API, that your last outage came from exactly this kind of change, and that the "harmless" reload will drop in-flight connections during your peak hour.

The model writes code. It does not carry the consequences. You do. So the entire game of vibe-coding infrastructure safely is keeping the human on the hook for the blast radius while letting the machine do the typing.

Rule 1: Vibe the draft, never the apply

The single most important habit: the AI is allowed to propose changes. It is never allowed to make them. There's a world of difference between "here's the kubectl patch you'd run" and a bot that runs it for you.

Concretely, that means I demand a plan I can read before anything touches a real system:

terraform plan -out=tfplan
terraform show -json tfplan | <paste into the model>

"Read this plan. Tell me in plain English what changes, flag anything that destroys or replaces a resource, and rank the three riskiest changes. Don't tell me it's fine — tell me what could go wrong."

That force-replace buried on line 200 is exactly the thing vibe-coding glosses over and a careful read catches. I wrote up the full version of this — parsing a Terraform plan for AI-assisted review — but the one-liner is: the model reads the plan; you approve the apply.

Rule 2: Make destructive commands earn a second look

Vibe-coded shell scripts are where people get hurt fastest, because bash will cheerfully rm -rf "$DIR/" when $DIR is empty. Before I run anything a model handed me, it goes through a risk pass:

"Scan this script for anything destructive or irreversible — deletes, overwrites, force-pushes, drops, prod credentials. For each, tell me the blast radius and a safer version (dry-run flag, confirmation prompt, backup first)."

This catches the stuff vibe energy skips: missing set -euo pipefail, an unquoted variable that word-splits, a kubectl delete with no namespace scoping. I keep a whole pattern for catching risky shell commands before they run, and another for hardening a bash script with strict mode, traps, and back-out paths. Vibe-code the first draft; harden it before it runs once.

Rule 3: Stage everything the vibe touched

Vibe coding tempts you to skip the boring safety rails because the loop feels so fast. Don't. The fast loop needs the rails or it's just a faster way to break things:

  • Dry-run first. --dry-run=server, terraform plan, ansible --check. If the tool has a no-op mode, the vibe-coded change runs there first, every time.
  • Smallest blast radius. Apply to one node, one namespace, one non-prod env. Watch it. Then widen.
  • Back-out before apply. If you can't answer "how do I undo this in 60 seconds," you're not ready to apply it — no matter how confident the model sounded.

None of this slows the vibe down much. It just moves the "oh no" moment from production to a terminal where it's free.

Rule 4: Vibe-code the toil, hand-hold the crown jewels

Not all infrastructure is equal. I'll vibe-code a Grafana dashboard, a CI lint job, a one-off migration script, or a dev-env bootstrap with barely a glance — the downside is a wasted ten minutes. I will not vibe-code an IAM policy change, a database failover, a network ACL, or anything in the path of customer money without reading every line like it's a hostile PR.

Match your scrutiny to the blast radius. The model doesn't know which is which; you do. (If you're standing up an AI helper that runs alongside real systems, the same principle scales — I wrote about building an AI ops copilot with guardrails that proposes and never silently acts.)

Rule 5: Keep a prompt library so your vibes are reproducible

The dirty secret of good vibe coding is that it's not actually vibes — it's good prompts. A throwaway "fix my nginx config" gets you a throwaway answer. A prompt that says "act as a senior SRE, here's my config and the error, give me ranked causes and the nginx -t to verify before I reload" gets you something you can trust.

I keep the ones that work in a searchable prompt library — filterable by stack, difficulty, and whether they include production-safety guidance — so the next time I vibe-code a Postgres index or a Kubernetes rollout, I'm starting from a prompt that already bakes in the guardrails. Reproducible vibes beat lucky ones.

The honest takeaway

Vibe coding isn't the enemy of careful engineering — it's a power tool, and power tools are exactly as safe as the operator. Used well, you draft in seconds and spend your real attention on the 5% that can actually hurt you. Used badly, you ship confident nonsense at machine speed.

So: vibe the draft, read the plan, stage the apply, scope the blast radius, and keep a human's name on the change ticket. Do that and "vibe-coded" stops being a confession and starts being a workflow.


I write about running AI alongside real production infrastructure at devopsaitoolkit.com. New there? The start-here tour has the free toolkit and the incident assistant. And if your production is painful enough that vibe-coding won't fix it, I do fixed-price infrastructure audits.