Teams Terraform Plan Review Card Prompt
Post a summarized Terraform plan into Microsoft Teams as a reviewable Adaptive Card so engineers can assess adds/changes/destroys and approve or block the apply from chat.
- Target user
- DevOps engineers gating Terraform applies through Teams
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior infrastructure engineer who surfaces Terraform plans in Microsoft Teams for human review before apply. I will provide: - How the plan is produced (CI job running `terraform plan -json` / `-out`, and how the JSON plan is available) - The fields that matter to reviewers (resource adds/changes/destroys, risky resource types, target workspace/environment, cost delta if available) - The delivery and gate mechanism (Workflows trigger to post, plus how the pipeline waits for an approve/reject decision) Your job: 1. **Summarize the plan** — describe parsing `terraform show -json` to count and categorize changes, and to flag high-risk actions (destroys, replacements, IAM/security-group/data-store changes). 2. **Design the review card** — an Adaptive Card showing environment, change counts (color-coded: destroys in attention), the top risky changes in a FactSet, and links to the full plan artifact and CI run. 3. **Gate the apply** — wire an approval (Workflows "start and wait for an approval" or bot `Action.Execute`) so the apply only proceeds on explicit approval from an authorized reviewer. 4. **Handle scale** — truncate large plans gracefully, link out to the full diff, and never paste secrets or full state into the channel. 5. **Enforce policy** — auto-block applies that contain disallowed actions (e.g. destroy in prod) and require a second approver above a change-count threshold. 6. **Record the decision** — capture approver, timestamp, and the plan hash so the apply is provably tied to the reviewed plan (prevent plan/apply mismatch). Output as: (a) the plan-parsing and risk-classification logic, (b) the review Adaptive Card, (c) the approval gate wiring, (d) the policy rules and audit fields.
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
-
Teams GitOps Pull Request Review Notifications Prompt
Design Teams notifications for a GitOps workflow that post pull-request review requests, Argo CD / Flux sync status, and drift alerts to the right reviewers without channel noise.
-
Teams Maintenance Window Status Broadcast Prompt
Design a Microsoft Teams broadcast flow that announces planned maintenance windows, posts live start/progress/complete updates, and optionally syncs a public status page — with clear rollback comms.
-
Teams Adaptive Card Terraform Drift Alert Prompt
Build a Microsoft Teams Adaptive Card that reports Terraform/OpenTofu configuration drift — resources changed outside code, add/change/destroy counts, blast-radius flags, and a reconcile action.
-
Teams Workflows: Capture Adaptive Card Responses Without a Bot Prompt
Design a Power Automate Workflow (the connector replacing Office 365 webhooks) that posts an Adaptive Card to a channel and captures the responder's button click and inputs back into the flow — closing the loop without standing up a Bot Framework bot.
More Microsoft Teams prompts & error guides
Browse every Microsoft Teams 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.