Last active
June 12, 2018 23:41
-
-
Save ducas/beecd5a613bddd16de1e2f1aed451246 to your computer and use it in GitHub Desktop.
Purge an Azure resource group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { }, | |
"variables": { }, | |
"resources": [ ], | |
"outputs": { } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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