This prompt is designed for DevOps, SRE, and platform engineering teams who are automating infrastructure management with AI agents but require a strict human-in-the-loop gate before any configuration change is applied. The core job-to-be-done is to transform a raw intent to modify infrastructure (e.g., 'scale the web tier to 10 nodes') into a structured, evidence-backed change request that a human operator can quickly review, approve, or reject. It forces the AI to act as a meticulous change manager, not an autonomous executor, by generating a diff, a blast radius assessment, a service impact prediction, and a rollback plan.
Prompt
Infrastructure Configuration Change Approval Prompt

When to Use This Prompt
Defines the job, ideal user, and operational boundaries for the Infrastructure Configuration Change Approval Prompt.
Use this prompt when the AI agent has access to infrastructure-as-code repositories, live state querying tools (like kubectl or terraform state), and the ability to propose a plan. It is appropriate for high-risk, irreversible, or regulated environments where a bad configuration push can cause an outage. Do not use this prompt for read-only queries, for changes that have already been approved in a ticketing system, or in non-production sandbox environments where autonomous execution is safe and desired. The prompt assumes the model has access to the current state and the proposed state; if you cannot provide this context programmatically, the output will be speculative and unsafe.
The ideal user is an engineer building an internal platform or operator that wraps Terraform, Kubernetes, or network automation. The prompt is a component in a larger workflow: the AI gathers context, this prompt structures the approval request, and a separate system routes that request to a human via Slack, PagerDuty, or a custom review queue. The human's decision (approve/reject) should be logged and fed back into the system. Before implementing, ensure you have a way to block execution until an explicit approval signal is received; this prompt defines the language of the gate, not the gate mechanism itself.
Use Case Fit
Where the Infrastructure Configuration Change Approval Prompt works, where it fails, and the operational risks to manage before wiring it into a production pipeline.
Good Fit: Pre-Apply Terraform Plans
Use when: A CI/CD pipeline generates a terraform plan diff and needs a structured approval card before terraform apply. Guardrail: The prompt must receive the full plan output, not a truncated summary, to assess blast radius accurately.
Bad Fit: Real-Time Incident Response
Avoid when: A production outage requires immediate rollback or scaling. The approval loop adds latency that violates SLO recovery windows. Guardrail: Use this prompt for planned changes only; pair with a separate, pre-authorized emergency runbook for incidents.
Required Inputs: Diff, Context, and Rollback
Risk: An approval request without a concrete diff, affected service list, or rollback plan forces a human to research before approving. Guardrail: Enforce required fields in the prompt template: [CURRENT_CONFIG], [PROPOSED_CONFIG], [SERVICE_CATALOG], and [ROLLBACK_STEPS]. Reject incomplete submissions.
Operational Risk: Normalized Deviance
Risk: Reviewers approve low-risk changes reflexively, then miss a high-risk change buried in a routine batch. Guardrail: The prompt must classify risk (LOW/MEDIUM/HIGH/CRITICAL) and visually escalate CRITICAL changes with a dedicated warning block and required multi-party approval.
Operational Risk: Drift Between Plan and Apply
Risk: Infrastructure state changes between approval and execution, making the approved plan stale. Guardrail: The approval output must include a short time-to-live (TTL) and instruct the execution harness to re-plan if the approval window expires.
Bad Fit: Fully Autonomous GitOps
Avoid when: A GitOps reconciler automatically syncs cluster state to a trusted repository. Inserting a manual approval prompt breaks the reconciliation loop. Guardrail: Reserve this prompt for human-in-the-loop pipelines; use branch protection rules and CI checks for autonomous GitOps safety.
Copy-Ready Prompt Template
A reusable prompt template for generating structured infrastructure change approval requests with risk assessment and rollback planning.
This prompt template is designed to be integrated into a CI/CD pipeline, chatbot, or internal platform where an AI agent proposes infrastructure changes that require human approval before execution. The template forces the model to produce a structured change request that includes a configuration diff, blast radius assessment, service impact prediction, and a rollback plan. Use this template when the cost of an autonomous misconfiguration is high—such as in production Kubernetes, Terraform, or network changes.
textYou are an infrastructure change reviewer. Your task is to generate a structured change approval request for a proposed infrastructure configuration change. Do not execute any changes. Only produce the approval request payload. ## Inputs - [CURRENT_CONFIG]: The current infrastructure configuration. - [PROPOSED_CONFIG]: The proposed infrastructure configuration. - [CHANGE_CONTEXT]: Why the change is needed, who requested it, and any related tickets or incidents. - [AFFECTED_SERVICES]: A list of services, environments, or resources that may be impacted. - [RISK_LEVEL]: The preliminary risk classification (LOW, MEDIUM, HIGH, CRITICAL). - [OUTPUT_SCHEMA]: The required JSON schema for the approval request. - [CONSTRAINTS]: Any deployment constraints, such as maintenance windows, freeze periods, or required approvers. ## Instructions 1. Compute a human-readable diff between [CURRENT_CONFIG] and [PROPOSED_CONFIG]. 2. Assess the blast radius: which services, teams, or customers could be affected if the change fails or behaves unexpectedly. 3. Predict the service impact during and after the change, including any expected downtime, latency, or error budget consumption. 4. Draft a step-by-step rollback plan that can be executed if the change causes an incident. 5. Re-evaluate the risk level based on your blast radius and impact analysis. If it differs from [RISK_LEVEL], explain why. 6. Populate the [OUTPUT_SCHEMA] with your findings. 7. If any critical information is missing—such as an empty diff, unknown service dependencies, or an untested rollback—flag the request as BLOCKED and list the missing information. 8. Adhere to all [CONSTRAINTS]. If the change violates a constraint, flag it and do not recommend approval. ## Output Rules - Return ONLY valid JSON matching [OUTPUT_SCHEMA]. - Do not include commentary outside the JSON. - If the request is BLOCKED, set `approval_recommendation` to `BLOCKED` and populate `blocking_reasons`. - Use `risk_classification` values: `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`.
To adapt this template for your environment, replace the placeholders with actual configuration data, service catalogs, and your organization's specific output schema. For Terraform changes, [CURRENT_CONFIG] and [PROPOSED_CONFIG] can be populated from terraform plan output. For Kubernetes, use kubectl diff or a GitOps diff. The [OUTPUT_SCHEMA] should match the payload your approval system expects—such as a Jira ticket, a Slack Block Kit message, or a custom API contract. If your organization uses a specific risk matrix, encode those definitions in [CONSTRAINTS] so the model's re-evaluation aligns with your internal standards. Always test this prompt against known safe and dangerous changes to verify that the risk re-evaluation and blocking logic behave as expected before deploying to production pipelines.
Prompt Variables
Required inputs for the Infrastructure Configuration Change Approval Prompt. Each variable must be populated before the prompt is assembled to ensure a complete and accurate risk assessment.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CHANGE_REQUEST_ID] | Unique identifier for tracking and audit trail. | CHG-2024-0421 | Must match regex ^CHG-\d{4}-\d{4}$. Reject if null or duplicate. |
[REQUESTOR] | Identity of the human or system initiating the change. | svc-terraform-runner or jane.doe@example.com | Must be a non-empty string. If a service account, verify it is authorized for change initiation. |
[CURRENT_CONFIG] | The existing infrastructure configuration in a structured format (JSON, HCL, YAML). | {"resource": "aws_instance.web", "instance_type": "t3.medium"} | Must be valid JSON, HCL, or YAML. Parse check required. Reject if empty or unparseable. |
[PROPOSED_CONFIG] | The desired infrastructure configuration after the change. | {"resource": "aws_instance.web", "instance_type": "t3.large"} | Must be valid JSON, HCL, or YAML. Parse check required. Must be structurally different from [CURRENT_CONFIG]. |
[TARGET_ENVIRONMENT] | The deployment environment where the change will be applied. | production, staging-us-east-1 | Must be a non-empty string from the approved environment list. If 'production', enforce strict approval chain. |
[AFFECTED_SERVICES] | A list of business services or system components potentially impacted. | ["user-auth-service", "payment-gateway-api"] | Must be a valid JSON array of strings. If empty, flag for human review as impact is unknown. |
[DEPLOYMENT_WINDOW] | The scheduled time frame for applying the change. | 2024-05-20T02:00:00Z/2024-05-20T04:00:00Z | Must be a valid ISO 8601 time interval. Reject if the window is in the past or overlaps with a declared maintenance blackout. |
Implementation Harness Notes
How to wire the Infrastructure Configuration Change Approval Prompt into a CI/CD pipeline or chat-ops workflow with validation, retries, and human review gates.
This prompt is designed as a pre-execution gate, not a post-hoc audit log. It should be invoked by an automation agent (e.g., a Terraform runner, Kubernetes operator, or chat-ops bot) before terraform apply, kubectl apply, or an equivalent mutating command is executed. The application harness must supply the [CURRENT_CONFIG], [PROPOSED_CONFIG], and [AFFECTED_SERVICES] placeholders by diffing the planned state against the live state. The prompt's output is a structured approval request, not an execution command. The harness must parse this output and block the pipeline until a human reviewer explicitly approves the change via a UI, Slack message, or API call. Do not wire the model's output directly to an execution engine.
The implementation should follow a strict validate → review → execute loop. First, validate the model's JSON output against a strict schema that requires risk_classification, blast_radius_assessment, and rollback_plan fields. If validation fails, retry the prompt once with the validation error injected into the [CONSTRAINTS] field. If it fails again, escalate to an on-call engineer. On successful validation, the harness must render the human_approval_summary in a review interface and set a time-to-live (TTL) for the approval. The pipeline must remain blocked until an authorized reviewer provides a signed decision. Log the full prompt, the model's output, the validator result, and the human's decision to an append-only audit store for every change attempt.
Model choice matters here. Use a model with strong instruction-following and structured output capabilities, such as Claude 3.5 Sonnet or GPT-4o, and set temperature=0 to minimize variance in risk classification. For the tool-use pattern, define a single submit_change_approval_request function with parameters matching the output schema. This forces the model to generate a valid function call, which is easier to parse than free-text JSON. Avoid using this prompt for read-only queries or low-risk plan-only operations; it is specifically designed for mutating infrastructure changes. The next step after implementing this harness is to build a regression test suite using historical change requests to ensure the prompt's risk classification accuracy doesn't drift over time.
Common Failure Modes
What breaks first when using AI to generate infrastructure change approvals and how to guard against it.
Hallucinated Configuration Values
What to watch: The model invents plausible but incorrect parameter values, resource names, or version strings that do not exist in your actual infrastructure. Guardrail: Require the prompt to reference only explicitly provided [CURRENT_CONFIG] and [PROPOSED_CONFIG] inputs. Add a post-generation validation step that diffs generated values against the source of truth before the approval request is shown to a human.
Underestimated Blast Radius
What to watch: The model fails to identify all downstream dependencies, missing critical services, cross-region replication, or shared network paths. Guardrail: Provide a structured [DEPENDENCY_MAP] as input. Instruct the model to cross-reference every changed resource against this map. Implement a hard check that blocks the approval if the number of affected services in the output is zero or does not match a known minimum.
Missing Rollback Complexity
What to watch: The generated rollback plan is overly simplistic, ignoring stateful data changes, schema migrations, or DNS propagation delays that make instant reversion impossible. Guardrail: Add a specific constraint in the prompt: [CONSTRAINTS]: The rollback plan must distinguish between stateless reverts and stateful recovery procedures. Flag any step that involves data loss risk. Use an eval rubric to check for the presence of a 'Stateful Data Warning' section.
Incorrect Risk Classification
What to watch: The model classifies a high-risk change (e.g., database deletion, network ACL modification) as low-risk due to ambiguous language or lack of context. Guardrail: Define explicit risk heuristics in the system prompt (e.g., "Any change to IAM roles or encryption keys is CRITICAL"). Use a [RISK_MATRIX] input. Validate the output risk level against a deterministic rules engine before trusting the AI's classification.
Ignoring Pre-Execution Checklists
What to watch: The approval summary omits critical pre-flight checks like backup completion, maintenance window status, or metric baseline capture. Guardrail: Provide a mandatory [PRE_FLIGHT_CHECKLIST] in the prompt context. Instruct the model to mark each item as 'Confirmed', 'Pending', or 'Blocked' in the output. Use a structural validator to ensure the checklist section is present and all items are accounted for.
Ambiguous Approval Language
What to watch: The generated request uses hedging language (
Evaluation Rubric
Criteria for testing the Infrastructure Configuration Change Approval Prompt before deployment. Each row defines a pass standard, a failure signal, and a concrete test method to validate output quality.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Risk Classification Accuracy | The output risk level (LOW/MEDIUM/HIGH/CRITICAL) matches the pre-labeled risk in the golden dataset for the given [CONFIG_DIFF] and [BLAST_RADIUS]. | Risk level is misclassified by more than one tier (e.g., HIGH labeled as LOW) or is missing entirely. | Run the prompt against 20 curated config diffs with known risk labels. Assert exact match accuracy >= 90% and no off-by-two-tier errors. |
Rollback Plan Completeness | The [ROLLBACK_PLAN] field contains a sequence of at least one concrete command or API call to revert the change, and a verification step. | The rollback plan is empty, contains only generic advice ('revert if needed'), or omits the verification check. | Parse the output JSON. Assert |
Service Impact Prediction Grounding | Every service listed in [SERVICE_IMPACT] is explicitly referenced in the provided [CONFIG_DIFF] or [DEPENDENCY_MAP] input. | The output hallucinates an impact on a service not present in the input context, or fabricates a dependency. | Extract all service names from |
Approval Blocking Condition Enforcement | The [APPROVAL_REQUIRED] field is | The output sets | Run the prompt against 10 destructive or multi-service diffs. Assert |
Output Schema Validity | The generated JSON strictly conforms to the [OUTPUT_SCHEMA] with all required fields present and correct types. | The output is missing a required field (e.g., | Validate the raw model output against the JSON Schema using a programmatic validator (e.g., |
Change Summary Conciseness | The [CHANGE_SUMMARY] is under 150 words and describes the 'what' and 'why' without repeating the full diff. | The summary exceeds 200 words, copies raw diff lines verbatim, or fails to state the operational reason for the change. | Tokenize the |
Idempotency Key Presence | The output includes a deterministic [IDEMPOTENCY_KEY] derived from the change content, not a random UUID. | The key is missing, is a random UUID, or changes on every run for the same input. | Run the prompt twice with identical inputs. Assert |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a single model call and no external tool integration. Replace [CURRENT_CONFIG] and [PROPOSED_CONFIG] with inline YAML or JSON snippets. Skip the blast radius and rollback plan sections initially—focus on generating a clear diff and impact summary.
Simplify the output schema to only require change_summary, affected_services, and risk_level. Add a note at the top of the system prompt: You are a prototype assistant. Flag any missing information rather than guessing.
Watch for
- The model hallucinating config values not present in the input
- Risk classification that is too vague (everything marked "medium")
- Missing service dependency context leading to incomplete affected-services lists

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us