I know how to set Https only manually in the Azure portal. Navigating to My Web Application > Custom domains in the Azure portal opens the Custom domains pane, which has an "Https Only" option. Setting this option to "On" enables the functionality I am looking for. I found how to do this manually on Benjamin Perkins Blog. Unfortunately, it does not contain a description of how to solve the problem in an automated way using ARM templates.
How can I set this "Https only" flag in my ARM template so that I can automate this setting in my deployment? Assume I have a working ARM deployment already, and just need to know where and what to add to the template specifically for this setting.
I would like to keep answers to an ARM template based approach.
Thanks for your time!
In the Azure portal, go to your function app. Platform features > Custom Domains > toggle HTTPS Only to 'On'.
Azure Resource Manager (ARM) Templates It will contain five main sections: schema, parameters, variables, resources, and outputs. ContentVersion: It is a mandatory item.
The magic of deployment slots: we can do swapping with zero downtime which means, end users will notice nothing and experience no downtime. Yes, users will experience no downtime. Therefore, this is one of the awesome features of Azure app services. Default app instance is always mapped to the production slot.
Yes, it is possible. You could check this link. httpsOnly
is a value in properties. For example:
{
"apiVersion": "2015-08-01",
"name": "[parameters('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource",
"displayName": "Website"
},
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
],
"properties": {
"name": "[parameters('webSiteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]",
"httpsOnly": true
}
}
ps. Template reference might contain error, use api reference (its not perfect, but its better).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With