Search code examples
azureazure-functionsazure-rm-template

How to set access restrictions using ARM template?


I have some function apps and I found how to allow access to Azure cloud by following the steps in https://learn.microsoft.com/en-us/azure/app-service/app-service-ip-restrictions. But I use ARM template to deploy the function apps and every time I do a deployment, the restrictions are gone. So, I would like to include the access restriction in my ARM template so add the restrictions every time they get deployed. I couldn't find a relevant resource anywhere to do this. Does anyone have any idea?


Solution

  • As suggested by @classicSchmosby98 that would be one of the solutions to restrict the azure function app using ARM template.

    • Create your own azure function manually from portal and add all the restrictions what you need.
    • Now export the template from the resource group for your resource with this you can even include the IP restrictions.
    • Also, you can go through the Assign roles using Azure Manager templates.
    • For more information you can refer explore ARM templates.