ANS Sandbox Resource Cleanup Automation for Azure

*** WARNING: This will delete any resources with the tag AutoDeleteOn equal to todays date WITHOUT prompting for confirmation ***

Deploy to Azure

How to deploy

Click the blue "Deploy to Azure" button

Or if you prefer commandline;

  1. Clone the repository git clone https://github.com/ans-cloud/auto-delete-resource-automation-azure.git
  2. Ensure you have az cli installed
  3. Run az login
  4. Switch to the correct subscription
az account set -s "YOUR_SUBSCRIPTION_ID"
  1. Create a resource group (optional)
az group create \
  --name "name-for-resource-group" \
  --location "uksouth or another region of your choice"
  1. Update the values in example.parameters.json (Optional)
  2. Run the following command to deploy the ARM template
az deployment group create \
  --name "deploy-auto-delete-resource-automation-azure" \
  --resource-group "name-of-existing-resource-group" \
  --template-file "azure-deploy.json" \
  --parameters "example.parameters.json"

What will this deploy?

This ARM (Azure Resource Manager) template will deploy a logicapp, upon creation you can choose whether to use an existing or new resource group

What do I need to do post deployment?

  1. Navigate to your root management group (or each subscription manually)
  2. Assign Contributor rights to the logicapp's managed identity