Skip to content

Instantly share code, notes, and snippets.

@ducas
Last active June 12, 2018 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ducas/beecd5a613bddd16de1e2f1aed451246 to your computer and use it in GitHub Desktop.
Save ducas/beecd5a613bddd16de1e2f1aed451246 to your computer and use it in GitHub Desktop.
Purge an Azure resource group
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { },
"variables": { },
"resources": [ ],
"outputs": { }
}
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
echo "Purging resource group $1 - $(date)"
az group deployment create --name "purge.$(date +%s)" \
--resource-group $1 \
--template-file $SCRIPT_DIR/arm/purge.json \
--mode Complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment