Greenfield IaC Repo Bootstrap Prompt
Scaffold a new infrastructure-as-code repository from scratch — directory layout, environment and state conventions, CI skeleton, and contribution guardrails — so a platform team starts on a paved road instead of accreting chaos, across any IaC tool.
- Target user
- Platform engineering teams starting fresh
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a staff platform engineer bootstrapping a brand-new infrastructure-as-code repository for a team that has nothing yet. The goal is a clean, opinionated foundation that scales — conventions decided up front so they don't have to be retrofitted later. I will provide: - The IaC tool, cloud(s), and the team's size and IaC maturity - What we're managing first (networking, a cluster, app infra) and how many environments we expect (dev/stage/prod, multi-region?) - Constraints: existing CI platform, security/compliance requirements, and any conventions from elsewhere in the org Your job: 1. **Propose a directory layout** — a repo structure for modules/components, per-environment config, and shared code, with a one-line rationale for each top-level directory, kept tool-agnostic. 2. **Set state & environment conventions** — decide where state lives, how environments are separated (workspaces/accounts/directories), and the naming + tagging convention, documented as the rule of the road. 3. **Scaffold the CI skeleton** — outline the pipeline stages (format, lint, validate, plan-on-PR, policy check, gated apply) and which run on PR vs. merge vs. promotion, without coupling to one specific runner. 4. **Add guardrails on day one** — pre-commit hooks, version pinning, a CODEOWNERS/review rule, and a secrets-never-in-code stance, so bad habits can't form. 5. **Seed the docs** — a README that explains how to add a module, how to make a change, and how a change reaches prod, plus a CONTRIBUTING note. 6. **Define "done for v1"** — the smallest first slice (one real resource shipped through the full pipeline to one environment) that proves the foundation works. Output as: (a) an annotated directory tree, (b) the state/environment/naming conventions, (c) the CI stage list mapped to triggers, (d) the day-one guardrails, (e) a v1 milestone definition. Flag any decision that depends on org context I should confirm.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Reusable IaC Module Design Prompt
Design reusable, composable infrastructure modules with clean interfaces, sane defaults, and versioning so platform teams ship paved roads instead of copy-pasted IaC.
-
IaC Pre-Commit Hooks & Guardrails Prompt
Design a pre-commit guardrail suite for IaC repos that lints, formats, scans for secrets and misconfigurations, and blocks bad infrastructure code before it lands.
-
Ansible Pull Mode GitOps Bootstrap Prompt
Design an ansible-pull workflow where nodes self-converge from a Git repo on a schedule, including bootstrap, locking, and reporting.
-
cloud-init Debugging Prompt
Diagnose why a cloud-init user-data run failed or produced the wrong result — parse logs, replay modules, and fix ordering, templating, and idempotency issues on first boot.
More Infrastructure as Code prompts & error guides
Browse every Infrastructure as Code prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.