This post is really a note to self and if its useful to anyone else then great! If your wanting to script setting up many Azure Function Apps then you may find this useful.
I had a task to create a bunch of function apps in different resource groups and locations to support a project. I have created the below powershell script to help me do this. The script assumed your resource groups are already setup and then does the following:
- Connects to your subscription
- Gets the resource group
- Creates an AppInsight instance
- Creates a storage account
- Gets the key from the storage account
- Creates a function app
- Updates the function app so that it is linked to the app insights and storage account
At the bottom of the script you can see how i reused the powershell function to setup the Azure resources for each of our environments.
[snippet id=”953″ title=”Powershell – Azure – Add Function Apps” height=”0″ line_numbers=”true”]