Skip to content

Clean up stale Azure resource groups based on resource group tag.

Notifications You must be signed in to change notification settings

mboersma/rg-cleanup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rg-cleanup

A tool that bulk removes stale resource groups in an Azure subscription.

Usage

Prerequisites

  • Service principal credentials
  • An Azure subscription
export AAD_CLIENT_ID=...
export AAD_CLIENT_SECRET=...
export TENANT_ID=...
export SUBSCRIPTION_ID=...
make
./bin/rg-cleanup

By default, this tool deletes stale resource groups that are older than three days. If you want to customize that, you could add a flag --ttl=... when running. For example, if you want to delete stale resource groups that are older than one day, add --ttl=1d.

About

Clean up stale Azure resource groups based on resource group tag.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 94.9%
  • Makefile 4.3%
  • Dockerfile 0.8%