3
votes

I have app settings that need to be sticky to deployment slots for Azure Function.

I followed example provided from below posting.

How to use sticky staging slots in Azure Arm Templates

However, when the resources are deployed onto resource through VSTS, it keeps failing due to 'conflict' (https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-common-deployment-errors).

I currently have separate resource templates for "Microsoft.Web/Sites" and "Microsoft.Web/Sites/Config"

App settings are specified under "siteConfig" properties for "Microsoft.Web/Sites" template.

If "appSettingNames" is a type of config, can I list it under siteConfig for "Microsoft.Web/Sites" like below?

    {
        "type": "Microsoft.Web/sites",
        "kind": "functionapp",
        "name": "[parameters('name')]",
        "apiVersion": "2016-08-01",
        "location": "[parameters('location')]",
        "properties": {
            "siteConfig": {
                "appSettings": "[parameters('appSettings')]",
                "alwaysOn": true,
                "appSettingNames": "[parameters('appSettingNames')]"
            }
        },
        "dependsOn": [],
        "resources": []
    }

Where as parameter 'appSettingNames' is an array parameter and look like below: ["setting1", "setting2", "setting3"].

if there is any example for specifying this configuration. it would be really helpful

Thanks

1
I think that looks right. Did you try it?David Ebbo
@davidEbbo I tried it, but it fails :(Evan Park
Can you update your question with more details about exactly how it fails?David Ebbo
Also, please don't mix syntactic ARM template questions with Resource Provider specific questions. e.g. here, to simplify, show what you are trying in the simplest possible way, by directly hard coding the value that you want to set this to, as opposed to relying on [parameters] which is completely orthogonal to the Resource Provider concern.David Ebbo

1 Answers

0
votes

For your issue, 'appSettingNames' is not a type of config. So you can not set the template you post. And you can see all the types of config follow this link: SiteConfig object.