/azure-sap-automation:sdaf-safe-removalfrom azure-sap-automation
Removes SDAF-managed SAP resources in reverse dependency order: stops services, backs up data, removes SAP systems before workload zones before control plane. Validates incomplete teardown before retry or ARM fallback.
Ships in azure-sap-automation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Action-loop skill. Remove SDAF-managed resources only in the documented reverse dependency order and only after a reviewed destroy plan.
Trigger on: "remove an SAP system", "remove the workload zone", "remove the control plane", "safe teardown", "run remover.sh", "run remove_controlplane.sh", "destroy left resources behind", "the control-plane removal said success but the deployer is still there".
Do NOT trigger on: explicit Terraform state surgery, generic failed-run triage, or greenfield deployment.
docs/local/07-00-operations.md § Inputs, § Prepare an operational change).§ Remove resources)..sap_deployment_automation metadata, and destroy output (§ Before you begin, § Retain logs and evidence).docs/local/troubleshooting.md § A parameter file is not found).Apply this order on every teardown (docs/local/07-00-operations.md § Remove resources):
Do not continue to a broader scope until the narrower dependency is gone and the destroy output has been reviewed.
From WORKSPACES/SYSTEM/<SAP_SYSTEM>, exactly per docs/local/07-00-operations.md § Remove an SAP system:
cd "$CONFIG_REPO_PATH/WORKSPACES/SYSTEM/<SAP_SYSTEM>"
ARM_SUBSCRIPTION_ID="<WORKLOAD_SUBSCRIPTION_ID>" \
"$SAP_AUTOMATION_REPO_PATH/deploy/scripts/remover.sh" \
--type sap_system \
--parameterfile "<SAP_SYSTEM>.tfvars" \
--control_plane_name "<CONTROL_PLANE>" \
--deployer_tfstate_key "<DEPLOYER_STATE_KEY>" \
--landscape_tfstate_key "<LANDSCAPE_STATE_KEY>" \
--storageaccountname "<STATE_STORAGE_ACCOUNT>" \
--state_subscription "<STATE_SUBSCRIPTION_ID>"
Review the destroy plan and confirm only after backups and approvals are complete.
Only after every dependent SAP system is removed. From WORKSPACES/LANDSCAPE/<WORKLOAD_ZONE>-INFRASTRUCTURE, exactly per docs/local/07-00-operations.md § Remove a workload zone:
cd "$CONFIG_REPO_PATH/WORKSPACES/LANDSCAPE/<WORKLOAD_ZONE>-INFRASTRUCTURE"
ARM_SUBSCRIPTION_ID="<WORKLOAD_SUBSCRIPTION_ID>" \
"$SAP_AUTOMATION_REPO_PATH/deploy/scripts/remover.sh" \
--type sap_landscape \
--parameterfile "<WORKLOAD_ZONE>-INFRASTRUCTURE.tfvars" \
--control_plane_name "<CONTROL_PLANE>" \
--deployer_tfstate_key "<DEPLOYER_STATE_KEY>" \
--storageaccountname "<STATE_STORAGE_ACCOUNT>" \
--state_subscription "<STATE_SUBSCRIPTION_ID>"
Confirm the workload-zone state and any retained shared resources match the approved removal scope before approval.
Only after every dependent workload zone is removed. From WORKSPACES, exactly per docs/local/07-00-operations.md § Remove the control plane:
cd "$CONFIG_REPO_PATH/WORKSPACES"
"$SAP_AUTOMATION_REPO_PATH/deploy/scripts/remove_controlplane.sh" \
--deployer_parameter_file \
"$CONFIG_REPO_PATH/WORKSPACES/DEPLOYER/<CONTROL_PLANE>-INFRASTRUCTURE/<CONTROL_PLANE>-INFRASTRUCTURE.tfvars" \
--library_parameter_file \
"$CONFIG_REPO_PATH/WORKSPACES/LIBRARY/<ENVIRONMENT>-<LOCATION>-SAP_LIBRARY/<ENVIRONMENT>-<LOCATION>-SAP_LIBRARY.tfvars"
Review each destroy operation. Use --keep_agent only when the deployment agent retention was explicitly approved and you understand the resulting partial removal (docs/local/07-00-operations.md § Remove the control plane).
docs/local/troubleshooting.md § Removal is incomplete is canonical:
Do not use the generic rerun rule for an interrupted control-plane removal. Inspect $CONFIG_REPO_PATH/.sap_deployment_automation, its persisted step, the library destroy result, and the remaining deployer state and resources (docs/local/07-00-operations.md § Retry deterministically, docs/local/troubleshooting.md § Removal is incomplete).
After the library destroy, remove_controlplane.sh persists step=1; a later invocation can exit successfully without destroying the deployer. Do not treat that exit as completion, do not edit the step to bypass the guard, and do not switch to ad-hoc resource-group deletion. Obtain expert review for a component-specific recovery path.
The only documented ARM fallback here is the Azure DevOps removal fallback. It removes SAP systems, the workload zone, and the region through ARM resource-group deletion and is a fallback only when Terraform destroy does not remove everything.
Use that pipeline only after:
This repo does not document a local-script or GitHub Actions ARM-fallback procedure. Do not invent one.
--auto-approve (docs/local/07-00-operations.md § Review before execution).docs/local/troubleshooting.md § Removal is incomplete).az group delete, direct ARM deletion, or explicit Terraform state list / import / remove commands in place of the documented sequence; the state-operation boundary belongs to sdaf-state-management.0 after step=1 as completed removal..github/copilot-instructions.md.sdaf-state-management, sdaf-failure-triage, sdaf-control-plane-bootstrap, sdaf-workload-zone, sdaf-sap-system.docs/local/07-00-operations.md, docs/local/troubleshooting.md, and
docs/local/README.md.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub azure/sap-automation --plugin azure-sap-automation18 skills in this plugin
/sdaf-bom-selectionPick the right SDAF BOM for a target SAP product / release / DB platform / version / kernel / topology. Explains where BOMs live in the samples repo (`SAP/` for whole products, `BOM/` for components), decodes the `ms`, `v####`, and `latest` suffix conventions, points at the compatibility guardrails (`supportedPlatforms`, `supportedDBVersions`, `supportedKernels`), and reminds the operator that the download flow needs four explicit BOM keys in `sap-parameters.yaml`. Use when a user says "which BOM do I use", "product BOM vs component BOM", "SAP samples BOM catalog", "BOM_CATALOG", "S4/2023 BOM", "HANA BOM", or "how do I pick a BOM for HANA/Oracle/DB2/ASE". Do NOT use to author a new BOM, to acquire media (`sdaf-media-acquisition`), or to troubleshoot a checksum / 404 (`sdaf-media-diagnostics`).
/sdaf-control-plane-bootstrapDeploy the SDAF control plane locally: prepare DEPLOYER and LIBRARY tfvars, review the plan, run `deploy_controlplane.sh` per `docs/local/03-00-control-plane.md § Run`, and validate the deployer + library + state hand-off. Grounded in `docs/local/03-00-control-plane.md`. Use when a user says "deploy the SDAF control plane", "run deploy_controlplane.sh", "bootstrap SDAF from an empty subscription", "install the deployer" or "create the SAP library". Do NOT use for workload zone (see sdaf-workload-zone), SAP system (see sdaf-sap-system), removal (`sdaf-safe-removal`), or Azure Government / sovereign-cloud deltas (`sdaf-sovereign-cloud`).
Other plugins' skills for the same job