ALZ-Bicep/.github/azFunction/AzFunctionCode
Jan Faurskov 6424893ae0
Add Azure function to remove used subscriptions (#287)
* Initial commit

* Update readme

* Syntax and readme

* linter fixes

* parLocation

* Update naming in bicep

* remove gitignore

* add rbac

* check Pscred instead

* Increase schedule

* Reset timer

* Invoke-AzRestMethod
2022-07-13 10:27:48 +02:00
..
cancelSubscriptions Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
getPullRequests Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
getSubscriptions Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
timerschedule Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
.funcignore Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
README.md Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
host.json Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
profile.ps1 Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00
requirements.psd1 Add Azure function to remove used subscriptions (#287) 2022-07-13 10:27:48 +02:00

README.md

Overview

This folder contains the various functions that are contained in the overall Azure Functions. The following functions are present:

  1. timerschedule; this is a simple timer trigger which runs every five hours, and triggers the next function through placing a queue item in the startjob queue.
  2. getPullRequests; this is a queue based trigger (startjob queue) which gets the latest x closed pull requests from GitHub. PR title, number and state for each is saved in a queue item in the closedPullRequests queue.
  3. getSubscriptions; this is a queue based trigger (closedPullRequests queue), which for each pull request looks for an corresponding, active subscription. If the subscription is found subscription name and id is saved in a queue item in the subscriptionsToClose queue.
  4. cancelSubscriptions; this is a queue based trigger (subscriptionsToClose queue), which for each subscription tries to cancel the subscription. If succesful subscription name and id is saved in a queue item in the canceledSubscriptions queue.