Enable Proxies through ARM, Powershell, Azure CLI, REST.
Currently there is no way (or not documented?) to enable Proxies through any kind of script. Azure Templetes, Azure Resources, REST call, Powershell, Azure CLI... I would take ANYTHING. This is completely breaking automatic deployment of many projects. Proxies are great even in preview. Please make them "DevOps compatible" ASAP.
Thanks for your hard work ;)
OK Microsoft support informed me that proxies are controlled by: ROUTING_EXTENSION_VERSION in appSettings To enable that it's required to set it to: "~0.2"
This probably should be documented as example somewhere.
Can be closed
@rawlukMike Thanks for following up!
I keep coming up against this, and having automated deployments fail on me.
I deploy a new Function App using an ARM template, grab the local git URI for the app service, push an appsettings.json with "ROUTING_EXTENSION_VERSION": "~0.2" and proxies show up as disabled.
Having to take the extra manual step to visit the Azure portal and enable proxies is incredibly frustrating. Is this a documented feature, or should the issue be re-opened or re-cast into a formal spec for enabling proxies in an automated fashion and a separate documentation issue?
Instead of using appsettings.json, you can set up this parameter in ARM template. It's working in my project. There is a section for AppSettings in ARM template: https://docs.microsoft.com/en-us/azure/azure-functions/functions-infrastructure-as-code
Yes, I use that section to provision AppInsights automatically with an instrumentation key, like so:
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('Microsoft.Insights/components', parameters('functionAppName')), '2014-04-01').InstrumentationKey]"
}
I suppose I will have to add ROUTING_EXTENSION_VERSION, re-apply the template and be done with it. But it breaks one of the rules that I have for ARM templates, which is that I should be using them to provision services and not configure them (the above is an exception because the App Insights service is provisioned at the same time and I tie all the services together from the get go).
Edit: also, ARM templates and apps are typically handled by different teams.
But why it isn’t working in appsettings.json is a mystery to me (let alone why the value appears to be undocumented - I’ve been hunting through samples to fill in a lot of blanks).
@rcarmo appsettings.json (which is now renamed to local.settings.json) is used only locally. It is documented here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#local-settings-file