azure-live-arm-deployment-stack-guard
Guard live ARM, Bicep, and Deployment Stack changes with what-if evidence, denySettings review, changeset diff, rollback posture, and approval gates.
Install
npx skills add https://github.com/VincentChuWaiChow/vanguard-frontier-agentic/tree/master/skills/azure/azure-live-arm-deployment-stack-guard
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install vincentchuwaichow-vanguard-frontier-agentic@llmmart
git clone https://github.com/VincentChuWaiChow/vanguard-frontier-agentic.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole vincentchuwaichow/vanguard-frontier-agentic collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Azure Live ARM Deployment Stack Guard
Purpose
Act as the guarded live Azure operator for azure-live-arm-deployment-stack-guard work. Insist on preview evidence before execution and treat ambiguous target or approval state as a stop condition.
When to use
Use this skill when:
- an ARM or Bicep deployment must be previewed and possibly executed against a live Azure environment
- the session involves Deployment Stacks with denySettings and protected resource scopes
- a human needs guarded execution help with change evidence and rollback design
Lean operating rules
- Prefer Microsoft Learn documentation through the user's configured documentation MCP; use sampled read-only Azure evidence when available, then sanitized user evidence.
- Do not execute a live Azure change until subscription, resource group, active principal, and resource ownership are explicit.
- Prefer what-if, preview, describe, status, dry-run, plan, and rollback evidence before execution.
- If the request skips preview or rollback design, push back.
- Never print secrets, access tokens, connection strings, or raw environment values. Summarize sanitized evidence only.
- Load references only when needed.
References
Load these only when needed:
- Azure ARM Deployment Stack Operations — use for current service behavior, common failure modes, hard design rules, verification targets, and push-back conditions.
- Preflight commands — CLI commands to run before any mutation.
- Rollback playbook — concrete rollback steps for this service.
- Permission model — RBAC role definitions and PIM guidance.
- MCP and evidence path — use when choosing documentation-based evidence, sampled read-only evidence, or sanitized user evidence.
- Safety checklist — use for evidence labels, what-if evidence, deployment stack deny settings, action-on-unmanage choices, stack sync state, and stateful-resource rollback limits.
- Workflow and output contract — execution flow and final response contract.
- Official sources — authoritative Azure documentation links.
Response minimum
Return, at minimum:
- confirmed target subscription, resource group, and principal
- preflight evidence (what-if diff, status, health check, or plan output)
- approval status for the proposed mutation
- rollback posture or explicit statement of what cannot be rolled back
- post-action verification steps or refusal reason
Files (vanguard-frontier-agentic)
-
references
-
deployment-stack-operations.md 4.6 KB
# Azure ARM Deployment Stack Operations Use this reference for current, source-grounded service behavior and the hard live-operation gates that the lean `SKILL.md` intentionally does not carry. ## What people get wrong - Treating what-if as optional because the template is in source control. - Using deleteAll or deleteResources without listing every managed resource and dependency. - Ignoring deny settings exclusions and assuming they protect data-plane child objects. - Bypassing stack-out-of-sync warnings by default. - Claiming rollback when the change deletes or mutates stateful resources. ## Officially grounded service shape Microsoft Learn evidence says Deployment Stacks manage a group of resources as one unit, can detach or delete resources removed from the template through actionOnUnmanage, and can protect managed resources with deny settings. Documentation also calls out limitations: stacks do not manage implicitly created resources, deny settings apply to control plane only, some portal support is absent, and out-of-sync warnings require managed-resource review before bypass. - ARM/Bicep deployments and Deployment Stacks are live control-plane changes. - Deployment Stacks add lifecycle ownership, managed-resource tracking, action-on-unmanage behavior, and deny settings. - Deny settings can block write/delete control-plane actions but not all data-plane operations or implicit resources. - Action-on-unmanage determines whether removed template resources detach or delete. - Deployment-stack commands can create or update existing stacks, so idempotency assumptions must be verified. ## Non-negotiable design rules - Confirm deployment scope: resource group, subscription, or management group. - Require exact template, parameters, target scope, and current stack resource list before mutation. - Default action-on-unmanage to detach unless deletion is explicitly approved and proven safe. - Review deny-settings mode, child-scope behavior, excluded actions, and excluded principals. - Never bypass out-of-sync warnings without reviewing managed resources. ## Minimal safe implementation flow - Scope deployment, stack, template, parameters, active principal, and approval owner. - Collect what-if output where supported, existing deployments, stack resources, deny settings, locks, and stateful resources. - Classify each change as create, modify, delete, detach, or protection change. - Gate execution on rollback limitations and explicit approval. - After action, verify provisioning state, managed-resource list, deny settings, and drift indicators. ## High-risk assumptions to kill - Source-controlled Bicep does not prove safe live state; deployment stacks can delete, detach, or lock resources based on current managed-resource tracking. - Deny settings are not a universal lock. Microsoft Learn documents control-plane limits, implicit-resource gaps, data-plane exclusions, and current portal limitations. - `deleteAll` or `deleteResources` is not cleanup; it is destructive lifecycle ownership and needs an explicit managed-resource inventory. - A stack-out-of-sync bypass is not a normal retry flag. It is only defensible after reviewing the managed resources the service believes it controls. - Rollback is not credible for deleted resource groups, networking, identity, Key Vault, or stateful resources without separate recovery evidence. ## Safe command/code verification targets - Capture stack scope, template source, parameters, deny settings, action-on-unmanage, and managed-resource list before mutation. - Run what-if or an equivalent reviewed diff where supported; if unavailable, label that gap and require stronger human approval. - Search proposed commands/templates for destructive flags and deny-setting exclusions before execution. - Verify provisioning state, synchronized managed-resource list, deny assignments, and locks after action. - Treat bypass flags and delete flags as high-risk findings unless approval and recovery evidence are attached. ## Safe verification targets - What-if or equivalent managed-resource diff is attached and reviewed. - No unmanaged deletion is hidden behind action-on-unmanage. - Deny settings match intended protection and do not lock out operators unexpectedly. - Stateful resources have backup/restore or detach-first plan. - Stack status and managed-resource list are synchronized after change. ## When to push back - The user asks to run deployment without what-if or equivalent diff. - Template provenance or parameters are unknown. - The change deletes resource groups, Key Vault objects, databases, networking, or identity resources without recovery evidence. - A bypass flag is requested as routine behavior. -
mcp-and-evidence.md 1.4 KB
# Documentation and Evidence Path ## Preferred evidence order 1. Microsoft Learn documentation through the user's configured documentation MCP for documented Azure behavior. 2. Sampled read-only Azure evidence, when safely available, for current configured-environment observations. 3. Sanitized user-provided evidence. 4. Clearly labeled inference. ## What each evidence type can prove - Microsoft Learn documentation can prove documented service behavior, supported concepts, limitations, and recommended patterns. - Sampled read-only evidence can prove the sampled configured state at the time observed. - Sanitized user evidence can prove only what the snippet shows. - None of these alone prove broad regional availability, future success, full account posture, or production readiness. ## Safe usage pattern - State whether each claim is documentation-based, sampled-current-state, user-provided, or inference. - Use read-only queries before recommending changes. - Do not include sensitive internal identifiers, tenant identifiers, subscription identifiers, or secrets in committed docs or final findings. - If no sampled evidence is available, say the review is documentation-based and list the exact evidence still needed. ## Live-operation rule For live operations, documentation is never enough. Require target confirmation, current-state evidence, explicit approval, rollback constraints, and post-action verification. -
official-sources.md 2.7 KB
# Official Sources Use these sources to ground the skill. Microsoft Learn documentation proves documented Azure behavior; it does not prove the user's tenant, subscription, RBAC, quota, deployed resources, current cost, vault state, app health, or production readiness. ## Primary Microsoft Learn sources - https://learn.microsoft.com/azure/azure-resource-manager/templates/deploy-what-if - https://learn.microsoft.com/azure/azure-resource-manager/bicep/deployment-stacks - https://learn.microsoft.com/azure/templates/microsoft.resources/deploymentstacks - https://learn.microsoft.com/azure/role-based-access-control/deny-assignments - https://learn.microsoft.com/azure/azure-resource-manager/templates/best-practices ## Grounding notes - Documentation-based claim: Microsoft Learn evidence says Deployment Stacks manage a group of resources as one unit, can detach or delete resources removed from the template through actionOnUnmanage, and can protect managed resources with deny settings. Documentation also calls out limitations: stacks do not manage implicitly created resources, deny settings apply to control plane only, some portal support is absent, and out-of-sync warnings require managed-resource review before bypass. - Current-state claim: requires sampled read-only Azure evidence or sanitized user-provided evidence. - Live-operation claim: requires target, principal, approval, preflight evidence, rollback constraints, and post-action verification. - Inference: allowed only when labeled and tied to observed fields or documented behavior. - Do not include sensitive internal identifiers or secret material in findings. ## Source use rules - Prefer Microsoft Learn documentation through the user's configured documentation MCP for current Azure service behavior. - Use sampled read-only Azure evidence only to validate current configured-environment observations. - If documentation and sampled evidence appear to conflict, report both and stop short of a production-ready verdict. - Re-check official sources before changing high-risk guidance, because cloud behavior and feature availability can change. ## Current Microsoft Learn deltas checked on 2026-06-05 - Deployment Stacks manage resources through Microsoft.Resources/deploymentStacks and action-on-unmanage choices; delete behavior must be explicit before execution. - Microsoft Learn still distinguishes ARM/Bicep deployment what-if from Deployment Stack limitations; do not overclaim native stack what-if coverage. - Deny settings protect control-plane operations, not data-plane content, and do not cover implicitly created resources. - denyDelete, denyWriteAndDelete, exclusions, and deleteAll are governance decisions with materially different blast radius. -
permission-model.md 2.8 KB
# Permission Model: Azure Live ARM Deployment Stack Guard ## Custom role — what-if and stack write, stack deletion excluded ```json { "Name": "ARM Deployment Stack Guard", "IsCustom": true, "Description": "Minimum rights for guarded ARM what-if and Deployment Stack changes in one target resource group. Stack deletion is EXCLUDED — it requires a separate PIM-elevated role.", "Actions": [ "Microsoft.Resources/deployments/read", "Microsoft.Resources/deployments/write", "Microsoft.Resources/deployments/whatIf/action", "Microsoft.Resources/deploymentStacks/read", "Microsoft.Resources/deploymentStacks/write", "Microsoft.Resources/deploymentStacks/manageDenySetting/action", "Microsoft.Resources/subscriptions/resourceGroups/read" ], "NotActions": [ "Microsoft.Resources/deploymentStacks/delete" ], "DataActions": [], "NotDataActions": [], "AssignableScopes": [ "$APPROVED_RESOURCE_GROUP_SCOPE" ] } ``` `deploymentStacks/delete` is in `NotActions`. Stack deletion requires a separate PIM-eligible role activated only for confirmed decommission windows (see below). ## PIM-elevated delete role (activate only for planned decommission) ```json { "Name": "ARM Deployment Stack Delete (PIM)", "IsCustom": true, "Description": "Stack deletion only. Must be PIM-activated with approval and time-bound to a decommission window.", "Actions": [ "Microsoft.Resources/deploymentStacks/read", "Microsoft.Resources/deploymentStacks/delete" ], "NotActions": [], "AssignableScopes": [ "$APPROVED_RESOURCE_GROUP_SCOPE" ] } ``` $APPROVED_RESOURCE_GROUP_SCOPE is a local placeholder for the approved resource group scope from the change record. Do not paste raw subscription or resource identifiers into chat or committed docs. Assign as **PIM-eligible only**. Require manager approval. Maximum 2-hour activation. ## Deployment Stacks denySettings recommendation ```bash az deployment-stack group create \ --deny-settings-mode denyDelete \ --deny-settings-apply-to-child-scopes \ ... ``` Use `denyWriteAndDelete` for compliance-mandated immutable resources. ## Do not assign - `Owner` at subscription scope - `Contributor` at management-group scope - `Microsoft.Resources/*` wildcards - `Microsoft.Authorization/roleAssignments/write` (privilege escalation risk) ## Deny-setting permission caveat Microsoft Learn documents dedicated deployment stack roles and a separate `Microsoft.Resources/deploymentStacks/manageDenySetting/action` permission for managing deny settings. If the operator cannot prove this permission with sampled read-only evidence or an approved eligible role activation, do not change deny settings. Use exact resource scopes from approved change records; do not paste raw subscription identifiers into chat. -
preflight-commands.md 2.4 KB
# Preflight Commands: Azure Live ARM Deployment Stack Guard Use shell variables for examples instead of raw identifiers. Populate them from an approved change record or already configured shell context; never paste tenant, subscription, resource, or secret values into chat. ## Evidence-variable convention Variables such as $AZURE_RESOURCE_GROUP_NAME, $APP_SERVICE_APP_NAME, or $KEY_VAULT_NAME are local operator placeholders. Do not commit real values, and redact them from shared evidence unless the change record explicitly allows disclosure. Run these before any ARM or Deployment Stack mutation. Paste sanitized output as evidence. ## 1. Confirm identity and subscription target ```bash az account show --query "{subscription:id, name:name, user:user.name}" az group show -n $AZURE_RESOURCE_GROUP_NAME --query "{name:name, location:location, provisioningState:properties.provisioningState}" ``` ## 2. Run what-if before any deployment ```bash # ARM template what-if az deployment group what-if \ -g $AZURE_RESOURCE_GROUP_NAME \ --template-file $ARM_TEMPLATE_FILE \ --parameters @$ARM_PARAMETERS_FILE # Bicep what-if az deployment group what-if \ -g $AZURE_RESOURCE_GROUP_NAME \ --template-file $BICEP_TEMPLATE_FILE \ --parameters @$BICEP_PARAMETERS_FILE ``` Review the what-if output for resource replacements (marked with `~` or `-/+`). Any replacement of a stateful resource (database, storage, Key Vault) must be explicitly approved before proceeding. ## 3. Inspect existing Deployment Stack state ```bash az deployment-stack group show \ -n $DEPLOYMENT_STACK_NAME \ -g $AZURE_RESOURCE_GROUP_NAME \ --query "{provisioningState:provisioningState, denySettings:properties.denySettings, resources:properties.resources[].id}" ``` ## 4. List managed resources and their protection status ```bash az deployment-stack group show -n $DEPLOYMENT_STACK_NAME -g $AZURE_RESOURCE_GROUP_NAME \ --query "properties.resources[].{id:id, denyStatus:denyStatus}" ``` ## 5. Validate the template without deploying ```bash az deployment group validate \ -g $AZURE_RESOURCE_GROUP_NAME \ --template-file $ARM_TEMPLATE_FILE \ --parameters @$ARM_PARAMETERS_FILE ``` ## Deployment Stack what-if caveat Microsoft Learn currently documents that what-if support is not yet available for Deployment Stacks. Use ARM/Bicep what-if for the underlying deployment where available, then explicitly label any stack-level delete/detach and deny-setting risk that what-if does not prove. -
rollback-playbook.md 2.2 KB
# Rollback Playbook: Azure Live ARM Deployment Stack Guard ## Evidence-variable convention Variables such as $AZURE_RESOURCE_GROUP_NAME, $APP_SERVICE_APP_NAME, $DEPLOYMENT_NAME, or $DEPLOYMENT_STACK_NAME are local operator placeholders. Do not commit real values, and redact them from shared evidence unless the change record explicitly allows disclosure. ## Cancel an in-progress deployment ```bash # List recent deployments to find the in-flight one az deployment group list -g $AZURE_RESOURCE_GROUP_NAME \ --query "[?properties.provisioningState=='Running'].{name:name, timestamp:properties.timestamp}" # Cancel by name az deployment group cancel -g $AZURE_RESOURCE_GROUP_NAME -n $DEPLOYMENT_NAME ``` Cancellation is best-effort. Resources already provisioned before cancel are NOT torn down. ## Redeploy the last known-good template version ```bash # List deployment history to find the target az deployment group list -g $AZURE_RESOURCE_GROUP_NAME \ --query "[].{name:name, state:properties.provisioningState, timestamp:properties.timestamp}" \ --output table # Export the template from a prior successful deployment az deployment group export -g $AZURE_RESOURCE_GROUP_NAME -n $KNOWN_GOOD_DEPLOYMENT_NAME \ --output json > rollback-template.json # Redeploy az deployment group create \ -g $AZURE_RESOURCE_GROUP_NAME \ --template-file rollback-template.json \ --parameters @$ARM_PARAMETERS_FILE ``` ## Deployment Stack — update back to previous config ```bash # Re-apply the previous stack config (update, not recreate) az deployment-stack group create \ -n $DEPLOYMENT_STACK_NAME \ -g $AZURE_RESOURCE_GROUP_NAME \ --template-file rollback-template.json \ --parameters @$ARM_PARAMETERS_FILE \ --action-on-unmanage deleteResources \ --deny-settings-mode denyDelete ``` ## Rollback limitations - ARM deployments are additive by default — they do not auto-delete resources added in the failed run. - Deployment Stack `deleteResources` on unmanage will delete resources removed from the template. - Stateful resources (databases, storage accounts, Key Vaults) cannot be "rolled back" — only re-provisioned from backup. - If a resource was replaced (`~` in what-if), the original resource may already be deleted. -
safety-checklist.md 1.8 KB
# Safety Checklist ## Evidence labels - `documentation-based`: grounded in Microsoft Learn or listed official documentation. - `sampled-current-state`: grounded in read-only Azure or Kubernetes observations from the user's configured tools. - `user-provided`: grounded in sanitized snippets supplied by the user. - `inference`: reasoned from evidence but not directly proven. ## Mutation boundary - Default to read-only review. - Do not perform create, update, delete, rotate, purge, recover, apply, swap, reset, complete, deploy, assign, revoke, deallocate, quota, budget, or policy changes unless the user explicitly asks and approval is clear. - Prefer preview, what-if, dry-run, status, describe, list, show, diff, activity-log, and policy evaluation evidence before any mutation. ## Credential and data boundary - Never ask users to paste credentials, tokens, tenant IDs, subscription IDs, customer data, private keys, kubeconfig contents, CA requester credentials, secret values, connection strings, or raw environment dumps. - Summarize sensitive evidence by field presence, control state, and risk; do not reproduce secret material. ## Risk gates - Stop on ambiguous target, ambiguous principal, missing approval, missing rollback, missing financial owner, or missing asset owner for high-impact assets. - Treat broad permissions, permanent privileged access, public exposure, purge authority, destructive deployment behavior, quota increases, budget automation, and production slot swaps as high-risk. - Separate documented product behavior from sampled configured-environment evidence. ## Asset-specific hard line Never execute an ARM, Bicep, or Deployment Stack change without confirmed scope, template/parameter provenance, what-if or managed-resource diff, deny-settings review, action-on-unmanage review, rollback constraints, and explicit human approval. -
workflow-and-output.md 1.8 KB
# Workflow and Output Contract ## Execution flow 1. Scope the exact target, environment boundary, owner, requested operation, approval state, and rollback owner. 2. Load `official-sources.md`, then the component operations guide for service behavior and risk gates. 3. Gather sampled read-only evidence only when available and safe. 4. Compare observed posture against documented behavior, least-privilege expectations, and live-operation safety rules. 5. Refuse or defer mutation if target, approval, rollback, or evidence is incomplete. 6. Return a verdict with evidence level, blockers, safe next actions, and open questions. ## Required output - `verdict`: pass, warn, fail, or blocked. - `evidence_level`: documentation-based, sampled-current-state, user-provided, inference, or mixed. - `scope`: what was reviewed and what was not reviewed. - `approval_status`: explicit approval, missing approval, or not applicable for read-only review. - `blockers`: issues that prevent a safe or production-ready conclusion. - `findings`: severity-labeled risks with source labels. - `rollback_posture`: exact rollback path or explicit non-reversibility caveat. - `safe_next_actions`: reversible actions first; mutation only with explicit approval. - `open_questions`: missing facts that would change the verdict. ## Stress checks - What assumption would make this recommendation unsafe? - Which role, policy, budget, quota, deployment, swap, or purge action has the largest blast radius? - What evidence would disprove the claimed readiness? - Is the answer accidentally treating documentation as environment-specific proof? ## Response discipline Use Microsoft Learn documentation through the user's configured documentation MCP for documented Azure behavior. Use sampled read-only Azure evidence only for current configured-environment observations and label it as sampled evidence.
-
-
metadata.json 1.3 KB
{ "id": "azure-live-arm-deployment-stack-guard", "name": "Azure Live ARM Deployment Stack Guard", "type": "skill", "provider": "azure", "harnesses": [ "codex", "claude-code", "cursor", "gemini", "kiro", "other" ], "summary": "Guard live ARM, Bicep, and Deployment Stack changes with what-if evidence, deny-settings review, action-on-unmanage safety, managed-resource diff, rollback posture, and approval gates.", "source_type": "original", "official_docs": [ "https://learn.microsoft.com/azure/azure-resource-manager/templates/deploy-what-if", "https://learn.microsoft.com/azure/azure-resource-manager/bicep/deployment-stacks", "https://learn.microsoft.com/azure/templates/microsoft.resources/deploymentstacks", "https://learn.microsoft.com/azure/role-based-access-control/deny-assignments", "https://learn.microsoft.com/azure/azure-resource-manager/templates/best-practices" ], "security_notes": "Never execute an ARM, Bicep, or Deployment Stack change without confirmed scope, template/parameter provenance, what-if or managed-resource diff, deny-settings review, action-on-unmanage review, rollback constraints, and explicit human approval.", "last_verified": "2026-06-05", "path": "skills/azure/azure-live-arm-deployment-stack-guard", "author": "github: VincentChuWaiChow", "version": "0.1.5" } -
SKILL.md 3 KB
--- name: azure-live-arm-deployment-stack-guard description: Guard live ARM, Bicep, and Deployment Stack changes with what-if evidence, denySettings review, changeset diff, rollback posture, and approval gates. allowed-tools: Read Grep Glob WebFetch metadata: author: "github: VincentChuWaiChow" version: 0.1.5 updated: "2026-06-05" category: delivery --- # Azure Live ARM Deployment Stack Guard ## Purpose Act as the guarded live Azure operator for azure-live-arm-deployment-stack-guard work. Insist on preview evidence before execution and treat ambiguous target or approval state as a stop condition. ## When to use Use this skill when: - an ARM or Bicep deployment must be previewed and possibly executed against a live Azure environment - the session involves Deployment Stacks with denySettings and protected resource scopes - a human needs guarded execution help with change evidence and rollback design ## Lean operating rules - Prefer Microsoft Learn documentation through the user's configured documentation MCP; use sampled read-only Azure evidence when available, then sanitized user evidence. - Do not execute a live Azure change until subscription, resource group, active principal, and resource ownership are explicit. - Prefer what-if, preview, describe, status, dry-run, plan, and rollback evidence before execution. - If the request skips preview or rollback design, push back. - Never print secrets, access tokens, connection strings, or raw environment values. Summarize sanitized evidence only. - Load references only when needed. ## References Load these only when needed: - [Azure ARM Deployment Stack Operations](references/deployment-stack-operations.md) — use for current service behavior, common failure modes, hard design rules, verification targets, and push-back conditions. - [Preflight commands](references/preflight-commands.md) — CLI commands to run before any mutation. - [Rollback playbook](references/rollback-playbook.md) — concrete rollback steps for this service. - [Permission model](references/permission-model.md) — RBAC role definitions and PIM guidance. - [MCP and evidence path](references/mcp-and-evidence.md) — use when choosing documentation-based evidence, sampled read-only evidence, or sanitized user evidence. - [Safety checklist](references/safety-checklist.md) — use for evidence labels, what-if evidence, deployment stack deny settings, action-on-unmanage choices, stack sync state, and stateful-resource rollback limits. - [Workflow and output contract](references/workflow-and-output.md) — execution flow and final response contract. - [Official sources](references/official-sources.md) — authoritative Azure documentation links. ## Response minimum Return, at minimum: - confirmed target subscription, resource group, and principal - preflight evidence (what-if diff, status, health check, or plan output) - approval status for the proposed mutation - rollback posture or explicit statement of what cannot be rolled back - post-action verification steps or refusal reason
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.