Skip to content

Microsoft.Web sites/config appsettings #65

@mszadziul87

Description

@mszadziul87

Describe the noise

Using What-If results in:
Error Code: MultipleErrorsOccurred
Error Message: Long running operation failed with status 'Failed'. Additional Info:'Multiple error occurred: DeploymentWhatIfResourceError,DeploymentWhatIfResourceError,DeploymentWhatIfResourceError,DeploymentWhatIfResourceError. Please see details.'
Error Details: [
{
"Code": "DeploymentWhatIfResourceError",
"Message": "The request to predict template deployment changes to subscription 'XXX' and resource group 'XXX' has failed due to a resource error. See details for more information.",
"Target": "/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Web/sites/XXX/config/appsettings?api-version=2018-11-01",
"Details": [
{
"Code": "DeploymentWhatIfResourceInvalidResponse",
"Message": "The request '/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Web/sites/XXX/config/appsettings?api-version=2018-11-01' resulted in an unexpected HTTP status code 'MethodNotAllowed'. Diagnostic information: timestamp '20200520T114726Z', tracking id 'ca1ad6e8-288c-4b4f-bb3c-4405d5f2ea78', request correlation id 'dcd64ae5-6b16-4941-9390-cc22bc266c31', location 'northeurope'.",
"Target": "/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Web/sites/XXX/config/appsettings?api-version=2018-11-01",
"Details": [],
"AdditionalInfo": []
}
],
"AdditionalInfo": []
}
]
Resource type (i.e. Microsoft.Storage/storageAccounts)
Microsoft.Web sites/config
apiVersion (i.e. 2019-04-01)
2018-11-01
2015-08-01
Client (PowerShell, Azure CLI, or API)
PowerShell
Relevant ARM Template code (we only need the resource object for the above resourceType and apiVersion, but if it's easier you can include the entire template

// WebApp
{
    "type": "Microsoft.Web/sites",
    "apiVersion": "2016-08-01",
    "name": "[parameters('AllParams').WebPart.WebAppName]",
    "location": "[resourceGroup().location]",
    "tags": "[resourceGroup().tags]",
    "properties": {
        "name": "[parameters('AllParams').WebPart.WebAppName]",
        "serverFarmId": "[resourceId(parameters('AllParams').ResourceGroupPart.ServicePlanResourceGroup,'Microsoft.Web/serverfarms', parameters('AllParams').WebPart.ServicePlanName)]",
        "siteConfig": {
            "use32BitWorkerProcess": false,
            "AlwaysOn": true
        }
    },
    "resources": [
        // WebApp Sticky Slot Config
        {
            "type": "config",
            "apiVersion": "2018-11-01",
            "name": "slotconfignames",
            "dependsOn": [
                "[resourceId('Microsoft.Web/Sites', parameters('AllParams').WebPart.WebAppName)]"
            ],
            "properties": {
                "appSettingNames": [
                    "ASPNETCORE_ENVIRONMENT",
                    "APPINSIGHTS_INSTRUMENTATIONKEY"
                ]
            }
        },
        // WebApp General Config
        {
            "type": "config",
            "apiVersion": "2018-11-01",
            "name": "web",
            "dependsOn": [
                "[resourceId('Microsoft.Web/Sites', parameters('AllParams').WebPart.WebAppName)]"
            ],
            "properties": {
                "phpVersion": ""
            }
        },
        // WebApp AppSettings
        {
            "type": "config",
            "apiVersion": "2018-11-01",
            "name": "appsettings",
            "dependsOn": [
                "[resourceId('Microsoft.Web/sites', parameters('AllParams').WebPart.WebAppName)]"
            ],
            "properties": {
                "ASPNETCORE_ENVIRONMENT": "",
                "APPINSIGHTS_INSTRUMENTATIONKEY": "",
                "WEBSITE_HTTPLOGGING_RETENTION_DAYS": "3",
                "APPINSIGHTS_JAVASCRIPT_ENABLED": "true",
                "MSDEPLOY_RENAME_LOCKED_FILES": "1"
            }
        }
    ]
}

Expected response (i.e. "I expected no noise since the template has not been modified since the resources were deployed)
Expected behaviour would be to show the results of App Settings deployment operation.
The ARM template works fine without What-If
Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text)
See above.
Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    provider bugIssue exists in the resource provider

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions