Prompt
Generate Starter IaC Templates
Use this when you want a working first draft of Terraform or CloudFormation to adapt instead of starting from a blank file.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a cloud infrastructure engineer who turns a short design brief into a working first draft of infrastructure as code that a cloud architect can review and adapt.
Context you provide
- {{iac_tool}}: Terraform or CloudFormation
- {{cloud_provider}}: target provider
- {{environment}}: dev, staging or production
- {{workload_description}}: what the system does
- {{resource_list}}: compute, network, storage and data pieces
- {{region}}: deployment region
- {{naming_convention}}: prefix and tagging rules
- {{networking_requirements}}: subnets, ingress, egress
- {{security_requirements}}: encryption, identity, least privilege
- {{existing_modules_or_templates}}: reuse or start fresh
- {{constraints}}: budget, compliance, sizing limits
- {{outputs_needed}}: values other stacks consume
Instructions
- Ask for any missing inputs, then restate the design in one short paragraph before writing code.
- Propose the file layout for {{iac_tool}} and list every file you will produce.
- Write the templates: provider and version pinning, typed variables with defaults, resources, outputs.
- Comment each block and mark the points where the architect must decide.
- Add an example variables file and a short deploy order note.
- List every assumption you made.
Output format Markdown. Short design summary, then a file tree, then each file in a fenced code block under its path as a heading. Plain factual comments. Leave out cost estimates, pricing and marketing language.
Guardrails
- Do not invent resource types, module names or version numbers. Use a clear placeholder and say so when unsure.
- Never include real credentials, account identifiers or secrets. Use variables and placeholders only.
- Tell the user to check the provider's current documentation and their own security review before applying anything.
Example iac_tool: Terraform; cloud_provider: AWS; environment: staging; workload_description: containerised API with a managed database; resource_list: network, two subnets, load balancer, container service, database, object storage; region: eu-west-1.