GithubHelp home page GithubHelp logo

ubuntu / azure-resource-reaper Goto Github PK

View Code? Open in Web Editor NEW
1.0 7.0 0.0 17 KB

Time-triggered Azure function that deletes resources older than their declared lifetime

License: MIT License

Python 100.00%
azure-functions azure-functions-python resource-management

azure-resource-reaper's Introduction

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.

azure-resource-reaper's People

Contributors

gabrielnagy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.