Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Code, Git & Developer Tools

Code, Git & Developer Tools

Review Terraform pull requests with GitHub, GPT-4.1, Postgres and Slack

When something happens in a connected app, it automates developer work with OpenAI / ChatGPT using GitHub, Postgres, Slack.

What it does

## AI Terraform PR Review & Security Agent ### How it works 1. A GitHub pull request touching Terraform files triggers the workflow. 2. An AI agent decides which checks to run — a plan diff, a security scan, a cost estimate, and a search of internal IaC standards. 3. It writes a structured review with a pass/fail verdict per category and an overall risk rating. 4. The review is posted back to the PR as a comment and logged to Postgres for audit history. 5. Clean reviews auto-approve the PR; anything flagged high-risk routes to a human via Slack before it can merge. ### Setup - [ ] Add GitHub credentials (repo scope, PR write access) on the trigger and all GitHub nodes - [ ] Add an OpenAI credential and a Vector Store credential for the RAG tool - [ ] Wire Tool - Run Terraform Plan and Tool - Run Security Scan to your CI runner — never let the agent apply, only plan/scan - [ ] Wire Tool - Estimate Cost Impact to Infracost's API or CLI output - [ ] Add a Postgres credential and create the terraform_pr_reviews table - [ ] Add Slack credentials on the security-review notification node - [ ] Point Wait - For Security Sign-Off's resume webhook at your reviewer UI's approve/request-changes action ### Customization Open a test PR touching a .tf file to run end-to-end, then push again to the same PR to confirm the sessionId keeps review context across revisions.

The steps

  1. GitHub Trigger - PR Opened/Updated
  2. Set - Config
  3. Get - PR Diff
  4. Tool - Run Terraform Plan
  5. Tool - Run Security Scan
  6. Tool - Estimate Cost Impact
  7. Tool - RAG Search IaC Standards
  8. OpenAI Chat Model
  9. Window Buffer Memory
  10. AI Agent - Terraform Reviewer
  11. Set - Parse Agent Output
  12. Postgres - Log PR Review
  13. GitHub - Post Review Comment
  14. IF - Review Passed

20 steps in total.

Similar automations