No description
Find a file
2023-09-20 17:57:44 +03:00
.github Add CLA check workflow 2023-09-20 11:13:39 +03:00
.vscode Initial commit 2023-09-14 11:38:24 +03:00
tests Add empty __init__.py file for test autodiscovery 2023-09-18 13:33:46 +03:00
.gitignore Ignore .coverage file 2023-09-18 13:33:46 +03:00
function_app.py Use current time as UTC when checking lifetime 2023-09-18 12:41:38 +03:00
host.json Initial commit 2023-09-14 11:38:24 +03:00
LICENSE Add license and readme 2023-09-20 11:13:48 +03:00
README.md Fix list in README 2023-09-20 17:57:44 +03:00
requirements.txt Initial commit 2023-09-14 11:38:24 +03:00

azure-resource-reaper

Azure Functions Azure

This Azure Function is a time-triggered function designed to automatically delete Azure resources based on a specific lifetime tag. It helps manage and clean up resources that are no longer needed, saving costs and improving resource management in any Azure environment.

Table of Contents

Overview

Azure resources can accumulate over time, leading to increased costs and potential security risks. To mitigate this, this Azure Function provides a solution for automatic resource deletion based on a lifetime tag that can be assigned to resources.

The lifetime tag format is a succession of <value><unit> stanzas where <value> is an integer and <unit> is one of the following:

  • y: years
  • mo: months
  • d: days
  • h: hours
  • m: minutes

Setup

To deploy and use the function, follow the instructions in Create a Python function in Azure from the command line.

Configuration

The timer string for the reap_resources function can be configured in the @app.schedule decorator call via the NCRONTAB expression. Additionally, a subscription ID must be set in the AZURE_SUBSCRIPTION_ID variable.

Development

In order to develop on the function, the following are required:

Note that by using production credentials the function can delete resources from your environment!

Contributing

It is required to sign the Contributor Licence Agreement in order to contribute to this project.

An automated test is executed on PRs to check if it has been accepted.

License

This project is covered by the MIT License.