Azure ignores site config settings in ARM template -
i trying develop arm template deployment of multiple webapps, stuck trying configure webapp using settings available in microsoft.web/sites/config. whatever put in there, settings ignored when deploy webapp. i'm basing template on david ebbos example.
this trying @ moment:
// serverfarm (appservice) { "apiversion": "2015-08-01", "type": "microsoft.web/serverfarms", "sku": { "name": "b1", "tier": "standard", "size": "b1", "family": "b", "capacity": 1 }, "name": "[variables('appsvcname')]", "location": "[resourcegroup().location]", "tags": { "project": "[[variables('webappname')]]" }, "properties": { "name": "[variables('appsvcname')]", "numberofworkers": 1 } }, // site (webapp) { "apiversion": "2015-08-01", "type": "microsoft.web/sites", "name": "[variables('webappname')]", "location": "[resourcegroup().location]", "tags": { "project": "[[variables('webappname')]]" }, "dependson": [ "[resourceid('microsoft.web/serverfarms', variables('appsvcname'))]" ], "properties": { "serverfarmid": "[resourceid('microsoft.web/serverfarms', variables('appsvcname'))]", "hostnames": [ "[concat(variables('webappname'), '.azurewebsites.net')]" ], "enabledhostnames": [ "[concat(variables('webappname'), '.azurewebsites.net')]", "[concat(variables('webappname'), '.scm.azurewebsites.net')]" ], // todo : these resources ignored far "resources": [ { "apiversion": "2015-08-01", "name": "web", "type": "microsoft.web/sites/config", "location": "[resourcegroup().location]", "dependson": [ "[resourceid('microsoft.web/sites', variables('webappname'))]" ], "properties": { "phpversion": "", "netframeworkversion": "v4.6", "use32bitworkerprocess": false, /* 64-bit platform */ "websocketsenabled": true, "alwayson": true, "requesttracingenabled": true, /* failed request tracing, aka 'freb' */ "httploggingenabled": true, /* iis logs (aka web server logging) */ "logsdirectorysizelimit": 40, /* 40 mb limit iis logs */ "detailederrorloggingenabled": true, /* detailed error messages */ "remotedebuggingenabled": false, "remotedebuggingversion": "vs2015", "defaultdocuments": [ "default.aspx", "default.htm", "default.html", "index.html", "hostingstart.html" ] } }, { "apiversion": "2015-08-01", "name": "connectionstrings", "type": "microsoft.web/sites/config", "location": "[resourcegroup().location]", "dependson": [ "[resourceid('microsoft.web/sites', variables('webappname'))]" ], "properties": { "umbracodbdsn": { "value": "[concat('data source=tcp:', reference(concat('microsoft.sql/servers/', variables('sqlservername'))).fullyqualifieddomainname, ',1433;initial catalog=', variables('sqldbname'), ';user id=', variables('appsvcname'), '@', variables('sqlservername'), ';password=e15co1ptir5dtq3zulwk;')]", "type": "sqlazure" } } } ] } }
one thing bit confused when run (get-azurermresourceprovider -providernamespace microsoft.web).resourcetypes
in azure powershell console there no sites/config resourcetypename available.
what gives? have config resourcetype been removed template definitions? using wrong apiversion? have tried number of different combinations, no avail.
please see blog - http://wp.sjkp.dk/arm-templates-set-always-on-and-other-site-properties/
you need siteconfig object under resource.properties of web/config.
{ "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'))]" }, "resources": [ { "apiversion": "2015-08-01", "name": "web", "type": "config", "dependson": [ "[concat('microsoft.web/sites/', parameters('websitename'))]" ], "properties": { "javaversion": "1.8", "javacontainer": "tomcat", "javacontainerversion": "8.0", "siteconfig": { "<supported-property>": "<value>", } } } ] }
Comments
Post a Comment