Skip to content

Instantly share code, notes, and snippets.

@cwoolum
Created January 6, 2019 19:29
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 cwoolum/d37f811ea66131661f44375590af3414 to your computer and use it in GitHub Desktop.
Save cwoolum/d37f811ea66131661f44375590af3414 to your computer and use it in GitHub Desktop.
AKS-Teardown
echo Enter the name of the environment you would like to delete
read envName
echo "Deleting Resource Group"
az group delete --name rg-$envName
echo "Deleting Service Principal"
az ad sp delete --id http://sp-kube-api-$envName
echo "Deleting Applications"
az ad app delete --id "$(az ad app list --query "[?displayName=='kube-aad-server-$envName'].{appId: appId}" -o tsv)"
az ad app delete --id "$(az ad app list --query "[?displayName=='kube-aad-client-$envName'].{appId: appId}" -o tsv)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment