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:

  1. Connects to your subscription
  2. Gets the resource group
  3. Creates an AppInsight instance
  4. Creates a storage account
  5. Gets the key from the storage account
  6. Creates a function app
  7. 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”]


Buy Me A Coffee