Well, I did it. I finally started working with Azure Functions. I toyed around with PowerShell based Azure Functions for a while, but couldn’t find a good example to get started. A couple of weeks ago I started preparing a video that uses Event Grid and Azure Automation to send a message to Teams when a new Resource Group is created in Azure. This is based on information Microsoft has posted on using PowerShell to post to Teams. The video is listed below.
The Azure Automation example seemed like a perfect task to move to Azure Functions. This gave me an opportunity to get an understanding of how Azure functions operate. I was able to create a working example of sending a message to Microsoft Teams when a new resource is created in an Azure subscription.
The code from the Azure Automation video was modified to support sending messages based on multiple types of resources added to Azure, not just Resource Groups. This was done by adding PowerShell IF statements for each resource type. Additional statements can be added as needed. I also included a link in the description of the video with a list of all ARM Resource Provider Operations. These are used to create advanced filters in Event Grid.
So far, I’m off to a good start. My next video will move another Azure Automation task to Azure Functions. This will be a little more involved, but open a lot of potential for Azure Functions.