Terraform Configuration Review
Check modules, state handling and permissions.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it.
Review Terraform code. Paste the main modules, variables and backend configuration with secrets removed: [TERRAFORM_CODE]. Cloud account structure: [ACCOUNT_STRUCTURE]. Who applies changes: [CHANGE_PROCESS]. Check state storage and locking, secrets in variables or state, overly broad permissions, hardcoded values, module reuse, drift detection, plan review practice and destructive changes without safeguards. Judge what can only be confirmed in the cloud console. Return a table with Item, Risk (red, amber, green) and Fix, a safe change workflow, and tests or checks to run in a sandbox. Keep advice defensive. Also suggest how to structure environments, how to review plans in pull requests, and how to detect drift on a schedule. Add a list of resources whose deletion should require extra approval, and a policy for who can run applies in production. Then design a safe change workflow and recovery plan. Describe the process from a proposed change to production: branch, plan output review, approval by a second person, apply in a controlled pipeline, and verification. Specify which resources need extra protection, such as databases and storage, and how to prevent accidental destruction with lifecycle rules and permissions. Provide a state recovery plan: where backups of state live, how to restore, and what to do if the state and reality diverge. Add a drift detection routine and a module versioning policy. Include a short guide to splitting configuration into environments without copy-paste, and a list of naming and tagging standards for cost and ownership. Finish with a tabletop exercise in which an apply fails halfway through, with questions for the team to answer. Keep all steps defensive and test in a sandbox account first. Add a closing exercise: describe how the team would recover if an apply deleted a production resource by mistake, and which control would have prevented it. Suggest detection and prevention measures only. Where a finding touches regulatory duties such as breach notification, tag it [VERIFY] for [JURISDICTION] and tell me to involve the responsible officer.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.