Skip to main content
prompt GP ChatGPT

Terraform taste — ChatGPT prompt: what it does, how to use

This prompt lays out Terraform practices for project structure, state management, and CI checks. Use it to review an infrastructure configuration or draft conventions for a repository.

Open on GitHub

What Terraform taste does

The prompt covers pinned Terraform and provider versions, remote state with locking, and separate state for each environment and system. It recommends focused modules, typed variables with descriptions, and safeguards against deleting resources that hold stateful data.

For team workflows, it suggests running terraform fmt, validate, and tflint on every pull request, then sharing the plan for review and applying it from CI. It also addresses OIDC authentication, secrets managers, and scheduled drift checks. Pinning Terraform and provider versions matters: otherwise, the configuration can change between runs.

What it helps with

  • split Terraform state by environment and system
  • set up Terraform checks for pull requests
  • guard databases and buckets against accidental deletion
  • move secrets out of tfvars and into a secrets manager
  • detect infrastructure drift on a schedule

Example prompts for the agent

  • Review my Terraform configuration against the cloud platform engineering practices in this prompt and list issues.
  • Suggest a Terraform project layout with separate directories for prod and staging.
  • Draft a pull request checklist for Terraform that includes terraform fmt, validate, and tflint.

How to install Terraform taste

How to use

Paste the text at the start of a chat or into project instructions

Questions about Terraform taste

How do I install Terraform taste in ChatGPT?

There is no separate ChatGPT install command listed. Use the prompt text in a ChatGPT or Claude.ai conversation.

What does Terraform taste do?

It gives guidance on Terraform and provider versions, module design, remote state, and CI checks.

Which Terraform checks does the prompt recommend for CI?

It recommends running terraform fmt, validate, and tflint on every pull request, then posting the plan for review.

Source text

prompts.csv · CC0-1.0
# Terraform taste of a cloud platform engineer
- Pin the Terraform version and every provider version, and commit .terraform.lock.hcl. Confidence: 0.95
- Store state remotely with locking enabled, for example S3 with DynamoDB or Terraform Cloud. Confidence: 0.95
- Split state per environment and per system so one apply never touches everything. Confidence: 0.90
- Use separate directories per environment instead of Terraform workspaces for prod and staging. Confidence: 0.75
- Keep modules small and focused on one concern, such as a network or a database. Confidence: 0.85
- Pin module sources to a tag or version, never to a moving branch. Confidence: 0.90
- Give every variable a type and a description, and add validation blocks for risky inputs. Confidence: 0.85
- Expose only the outputs that other stacks actually consume. Confidence: 0.70
- Name resources in snake_case and avoid repeating the resource type in the name. Confidence: 0.75
- Apply a shared tag set (owner, environment, cost center) through provider default_tags. Confidence: 0.85
- Prefer for_each over count so adding or removing an item does not reshuffle addresses. Confidence: 0.90
- Use moved blocks for refactors instead of manual terraform state mv. Confidence: 0.85
- Bring existing resources in with import blocks that are reviewed in a pull request. Confidence: 0.80
- Run terraform fmt, validate and tflint in CI on every pull request. Confidence: 0.90
- Post the terraform plan output as a pull request comment for review. Confidence: 0.85
- Apply only from CI using the reviewed plan file, never from a laptop. Confidence: 0.85
- Authenticate CI to the cloud with OIDC instead of long-lived access keys. Confidence: 0.90
- Never put secrets in tfvars; read them from a secrets manager at apply time. Confidence: 0.90
- Use prevent_destroy on stateful resources like databases and buckets. Confidence: 0.80
- Scan configurations with a policy tool such as checkov or tfsec before merging. Confidence: 0.75
- Avoid provisioners and local-exec; hand configuration off to images or config tools. Confidence: 0.80
- Run a scheduled plan to detect drift and alert when it is not empty. Confidence: 0.75
- Keep data sources for lookups and avoid hardcoding IDs or ARNs. Confidence: 0.80

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for DevOps and infrastructure →

From the same set133

The whole set →
GraphQL API taste A prompt that steers an agent to shape a GraphQL schema from client use cases rather than database tables. Useful when the API exists but the types no longer match what the frontend needs. GP ChatGPT ★ 174,676repo stars Web Performance taste This prompt gives frontend work a performance checklist, from real-user Core Web Vitals to JavaScript budgets and image loading. GP ChatGPT ★ 174,676repo stars Error Handling taste A prompt that gives an AI assistant the error-handling taste of a TypeScript backend engineer: validate input, split expected errors from bugs, log once, answer with problem+json. GP ChatGPT ★ 174,676repo stars Kubernetes taste A prompt that hands your AI assistant a platform team's Kubernetes rules: GitOps, probes, resources, pod security. Useful when you ask a model to write or review manifests. GP ChatGPT ★ 174,676repo stars Git Workflow taste A prompt that gives an AI assistant trunk-based habits: short-lived branches, Conventional Commits, squash-merge and a protected main. GP ChatGPT ★ 174,676repo stars Monorepo taste A prompt that hands the agent a fixed set of monorepo conventions: pnpm workspaces, Turborepo, package boundaries and shared configs. Useful when repo structure keeps drifting. GP ChatGPT ★ 174,676repo stars Go Service taste A backend engineer's Go preferences handed to the model: which router to use, how to lay out packages, how to handle errors and logs. Handy when the agent scaffolds a service. GP ChatGPT ★ 174,676repo stars Testing taste A prompt establishing pragmatic TypeScript testing habits for ChatGPT and Claude.ai. It enforces Vitest, Testcontainers, and strict UI testing standards. GP ChatGPT ★ 174,676repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor