'Microsoft.Web/sites/config' azureStorageAccounts fails due to 500 InternalError

匆匆过客 提交于 2021-01-01 11:01:40

问题


I have the following resource in a template:

{
    "type": "Microsoft.Web/sites/config",
    "apiVersion": "2018-11-01",
    "name": "[concat(parameters('appservice_name'), '/web')]",
    "location": "East US",
    "dependsOn": [
        "[resourceId('Microsoft.Web/sites', parameters('appservice_name'))]",
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_name'))]",
"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', parameters('storageAccounts_name'), 'default', 'frontend')]"
    ],
    "properties": {
        "numberOfWorkers": 1,
        "defaultDocuments": [
            "Default.htm",
            "Default.html",
            "Default.asp",
            "index.htm",
            "index.html",
            "iisstart.htm",
            "default.aspx",
            "index.php",
            "hostingstart.html"
        ],
"applicationLogs": "FileSystem",
        "netFrameworkVersion": "v4.0",
        "linuxFxVersion": "DOTNETCORE|3.1",
        "requestTracingEnabled": false,
        "remoteDebuggingEnabled": false,
        "remoteDebuggingVersion": "VS2019",
        "httpLoggingEnabled": true,
        "logsDirectorySizeLimit": 35,
        "detailedErrorLoggingEnabled": false,
        "publishingUsername": "$stelck",
        "azureStorageAccounts": {
            "frontend": {
                "type": "AzureBlob",
                "accountName": "[parameters('storageAccounts_name')]",
                "shareName": "frontend",
                "mountPath": "/home/site/wwwroot/frontend"
            }
        },
        "scmType": "None",
        "use32BitWorkerProcess": true,
        "webSocketsEnabled": false,
        "alwaysOn": true,
        "appCommandLine": "/home/site/wwwroot/entrypoint.sh",
        "managedPipelineMode": "Integrated",
        "virtualApplications": [
            {
                "virtualPath": "/",
                "physicalPath": "site\\wwwroot",
                "preloadEnabled": false
            }
        ],
        "loadBalancing": "LeastRequests",
        "experiments": {
            "rampUpRules": []
        },
        "autoHealEnabled": false,
        "localMySqlEnabled": false,
        "managedServiceIdentityId": 782,
        "ipSecurityRestrictions": [
            {
                "ipAddress": "Any",
                "action": "Allow",
                "priority": 1,
                "name": "Allow all",
                "description": "Allow all access"
            }
        ],
        "scmIpSecurityRestrictions": [
            {
                "ipAddress": "Any",
                "action": "Allow",
                "priority": 1,
                "name": "Allow all",
                "description": "Allow all access"
            }
        ],
        "scmIpSecurityRestrictionsUseMain": false,
        "http20Enabled": false,
        "minTlsVersion": "1.2",
        "ftpsState": "FtpsOnly",
        "reservedInstanceCount": 0
    }
},

But when deploying it fails due to:

"code": "InternalServerError", "message": "There was an unexpected InternalServerError. Please try again later. x-ms-correlation-request-id: ......"

If I delete the azureStorageAccounts part from the resource it does not fail and deploys perfectly.

How can I deploy this kind of resource with the storage mount point in the arm template?

RELATED: The template function 'reference' is not expected at this location

来源:https://stackoverflow.com/questions/64877968/microsoft-web-sites-config-azurestorageaccounts-fails-due-to-500-internalerror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!