Skip to content

libre-devops/get-azure-microsoft-ips-function-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

Hello 👋

This repo is a fork from the original creator groovy-sky

The fork aims to add some functionality to the app, as well as integrate it with some CI/CD, terraform and other bits and bobes.

What this Python Function App does

This repo hosts all the code and the mechanisms to deploy a Linux Azure Function App into the Libre DevOps tenant.

  • Build function app and needed resources using terraform
  • Debug locally with a simplified script
  • Deploy code via Azure Pipelines

The function itself is a Timer function, which, every 5 hours will fetch a list of IPs and add them to a convenient format inside a storage account created with terraform.

There are 2 functions:

  • Get-ClientIps
  • Get-ClientUrls.

These functions do what they say in the tin, one fetches a list of IPs object from the Office365 API and the other does the exact same, except gets the urls property as well.

These are then outputted to a blob container called $web

Building the environment

At the time of writing, this project only supports Azure DevOps continuous integration and is setup to deploy using some expected items in the Libre DevOps Azure DevOps instance.

You can freely use the modules used to deploy these resources as well as the pipeline templates, but setting up the bits in between will be up to you.

Terraform Build

  • 1x Resource Group
  • 1x Linux Function app on Consumption Service Plan with Python 3.9 Application Stack (up to date with the v3 Azurerm provider changes in terraform)
  • 1x Storage Account, Hot access tier
  • 1x Blob container with blob (anonymous access) for the URLs

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 78.7%
  • HCL 21.3%