Skip to content

alexkhil/az-cleaner

Repository files navigation

AzCleaner

license-badge build-badge

deploy-badge visualize-badge

How does it workds

By Default, the tool will get triggered every 12 hours and search for any resources tagged with expireOn with a value in the past in format yyyy-MM-dd, and delete them. Once all the expired resources are deleted. It will search for empty Resource Group and delete them too.

Development

az login
az ad sp create-for-rbac --sdk-auth

Save returned json to azureauth.json file on src/AzCleaner.Func folder.

Deploy

az group create --name <resource-group-name> --location <location-name>
cd infra
az deployment group create -n <deployment-name> -g <resource-group-name> -f azuredeploy.json

About

The piece of infrastructure which cleans up Azure subscription from expired resources and empty resource groups.

Topics

Resources

License

Stars

Watchers

Forks

Contributors