Score:0

How to fix errors of arm template for storage account creation?

ke flag

I have exported ARM template of exiting resource and modified the template.

But when deploying the same, getting errors as invalid xml.

{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
    "storageAccounts_zuscutaastd1shared": {
        "defaultValue": "zuscutaastd1shared",
        "type": "String"
    }
},
"variables": {},
"resources": [
    {
        "type": "Microsoft.Storage/storageAccounts",
        "apiVersion": "2022-09-01",
        "name": "[parameters('storageAccounts_zuscutaastd1shared')]",
        "location": "centralus",
        "tags": {
            "wk_application_name": "AlwaysOn-Supportability",
        },
        "sku": {
            "name": "Standard_RAGRS",
            "tier": "Standard"
        },
        "kind": "StorageV2",
        "properties": {
            "dnsEndpointType": "Standard",
            "defaultToOAuthAuthentication": false,
            "publicNetworkAccess": "Enabled",
            "allowCrossTenantReplication": true,
            "routingPreference": {
                "routingChoice": "InternetRouting",
                "publishMicrosoftEndpoints": false,
                "publishInternetEndpoints": false
            },
            "minimumTlsVersion": "TLS1_2",
            "allowBlobPublicAccess": true,
            "allowSharedKeyAccess": true,
            "networkAcls": {
                "bypass": "AzureServices",
                "virtualNetworkRules": [],
                "ipRules": [],
                "defaultAction": "Allow"
            },
            "supportsHttpsTrafficOnly": true,
            "encryption": {
                "requireInfrastructureEncryption": false,
                "services": {
                    "file": {
                        "keyType": "Account",
                        "enabled": true
                    },
                    "blob": {
                        "keyType": "Account",
                        "enabled": true
                    }
                },
                "keySource": "Microsoft.Storage"
            },
            "accessTier": "Hot"
        }
    },
    {
        "type": "Microsoft.Storage/storageAccounts/blobServices",
        "apiVersion": "2022-09-01",
        "name": "[concat(parameters('storageAccounts_zuscutaastd1shared'), '/default')]",
        "dependsOn": [
            "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_zuscutaastd1shared'))]"
        ],
        "sku": {
            "name": "Standard_RAGRS",
            "tier": "Standard"
        },
        "properties": {
            "changeFeed": {
                "enabled": false
            },
            "restorePolicy": {
                "enabled": false
            },
            "containerDeleteRetentionPolicy": {
                "enabled": true,
                "days": 7
            },
            "cors": {
                "corsRules": []
            },
            "deleteRetentionPolicy": {
                "allowPermanentDelete": false,
                "enabled": true,
                "days": 7
            },
            "isVersioningEnabled": false
        }
    },
    {
        "type": "Microsoft.Storage/storageAccounts/fileServices",
        "apiVersion": "2022-09-01",
        "name": "[concat(parameters('storageAccounts_zuscutaastd1shared'), '/default')]",
        "dependsOn": [
            "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_zuscutaastd1shared'))]"
        ],
        "sku": {
            "name": "Standard_RAGRS",
            "tier": "Standard"
        },
        "properties": {
            "protocolSettings": {
                "smb": {}
            },
            "cors": {
                "corsRules": []
            },
            "shareDeleteRetentionPolicy": {
                "enabled": true,
                "days": 7
            }
        }
    },
    {
        "type": "Microsoft.Storage/storageAccounts/queueServices",
        "apiVersion": "2022-09-01",
        "name": "[concat(parameters('storageAccounts_zuscutaastd1shared'), '/default')]",
        "dependsOn": [
            "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_zuscutaastd1shared'))]"
        ],
        "properties": {
            "cors": {
                "corsRules": []
            }
        }
    },
    {
        "type": "Microsoft.Storage/storageAccounts/tableServices",
        "apiVersion": "2022-09-01",
        "name": "[concat(parameters('storageAccounts_zuscutaastd1shared'), '/default')]",
        "dependsOn": [
            "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_zuscutaastd1shared'))]"
        ],
        "properties": {
            "cors": {
                "corsRules": []
            }
        }
    }
]
    
        }
   

When I tried to fix, I am getting errors as date is wrong in template, but that is the same generated from UI.

Please suggest what are the corrections required and any specific tools to correct.

Score:0
ru flag

you can use default settings for fileServices -> protocolSettings

"protocolSettings": {
        "smb": {
            "authenticationMethods": 'NTLMv2;Kerberos'
            "channelEncryption": 'AES-128-CCM;AES-128-GCM;AES-256-GCM'
            "kerberosTicketEncryption": 'RC4-HMAC;AES-256'
            "versions": 'SMB2.1;SMB3.0;SMB3.1.1'
        }
    }

fileServices

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.