Terraform Apply Risk Gate

    by Prateek

    1

    Reads a Terraform plan and shows what will be destroyed, replaced or exposed before you run apply.

    Free

    Security scanned

    Works with the AI Agents you already use

    What it does

    • Flags database, bucket and volume replacements
    • Finds security rules open to the whole internet
    • Catches wildcard IAM policies and disabled encryption
    • Lists every resource that will be destroyed

    Who it's for

    DevOps and Platform engineers managing cloud infrastructure

    Catch accidental database deletions and security holes before they hit production.

    Try asking: “Review this plan.json for any resource replacements or security risks.”

    Security teams auditing infrastructure changes

    Automatically flag open ports and wide-open permissions in every infrastructure update.

    Try asking: “Check this terraform plan for public buckets or unsafe firewall rules.”

    Engineering leads reviewing team pull requests

    Know exactly which resources will be destroyed without reading thousands of lines of code.

    Try asking: “Show me a summary of what will be deleted or replaced in this plan.”

    Terraform Apply Risk Gate

    Example session with this skill installed

    I have a plan.json for our cloud update. Can you review it for any risks, especially anything that might delete our database or open up our security groups?

    • Read your context and instructions
    • Compiled the terraform apply risk

    I have analyzed your infrastructure plan. Here is the risk report based on the changes detected.

    Verdict: BLOCK

    There are critical risks that need your attention before you apply these changes.

    Summary

    • Critical Risks: 2
    • High Risks: 1
    • Medium Risks: 1
    • Total Changes: 4

    Findings Table

    AddressActionRiskWhyWhat to do
    aws_db_instance.mainREPLACECRITICALReplacing a database causes data loss.Check why the identifier or engine changed.
    aws_security_group.webUPDATECRITICALPort 22 is open to 0.0.0.0/0.Restrict SSH access to your specific IP.
    aws_iam_policy.adminUPDATEHIGHPolicy grants * on * resources.Follow the rule of least privilege.
    aws_route53_record.wwwDELETEMEDIUMDeleting a DNS record stops traffic.Ensure this record is moved or no longer needed.

    Destroy List

    The following resources will be DELETED or REPLACED:

    • aws_db_instance.main (Replacement)
    • aws_route53_record.www (Deletion)

    You should not apply this plan until the database replacement and the open SSH port are fixed. Would you like me to explain why the database is being replaced?

    Connects securely to your tools. The creator never sees your data.

    About this skill

    You are about to update your cloud setup, but one wrong line in your code could delete a database or open a private server to the internet. This skill reads your planned changes and warns you about the scary stuff before you say yes. It looks specifically for "destroys" and "replacements" that might cause downtime or data loss.

    How it works

    1. You provide a JSON file of your planned infrastructure changes.
    2. The skill runs a specialized script to scan every resource in that file.
    3. Your AI agent looks for dangerous patterns like public access or deleted disks.
    4. You get a clear report with a verdict: Block, Review, or Safe.

    Frameworks & tools

    This skill works with Terraform plan files saved in JSON format. It uses a Python script to analyze the resource changes.

    Why this beats prompting it yourself

    A standard AI might miss a single "replace" line buried in a 5,000-line file. This skill uses a dedicated script to ensure every single resource change is checked against strict security and safety rules. It treats a "replacement" as a high-risk event because it knows that means deleting the old one first, which a general prompt might overlook.

    Use cases

    • Checking if a database will be deleted before running an update
    • Catching firewall rules that accidentally open your database to the whole internet
    • Finding where encryption was turned off by mistake
    • Making sure a DNS change won't accidentally kill your website traffic

    Known limitations

    This only reads JSON plan files, not the original code. It cannot see changes made manually in the cloud console that are not part of the plan, and it cannot guarantee a way to undo changes.

    The skill requires a Terraform plan converted to JSON using `terraform show -json`. It executes a bundled `review_plan.py` script to parse the `resource_changes` array. It evaluates risks based on action types (delete, replace) and specific attributes like CIDR blocks (0.0.0.0/0) and sensitive ports. It returns an exit code 1 if critical risks are found to support automated gating.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 day ago

    • Free with an Agensi account

    Software
    Python 3.9+

    Permissions

    Terminal / Shell
    Read Files

    File Scopes

    The
    Terraform
    plan
    JSON
    the
    user
    passes
    in

    Read-only. Nothing is applied.

    Listed1 day ago

    What's inside

    Frequently Asked Questions

    Reads a Terraform plan and shows what will be destroyed, replaced or exposed before you run apply.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use Terraform Apply Risk Gate on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Free