我試圖在通過ARM創建時間期間在azure存儲中啓用加密。這是我擁有的簡單存儲資源。Azure存儲在ARM
{
"$schema": "https://schema.management.azure.com/schemas/2016-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "String"
},
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
}
},
"variables": {
"defaultApiVersion": "2016-01-01"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[parameters('StorageAccountName')]",
"apiVersion": "[variables('defaultApiVersion')]",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('storageAccountType')]"
},
"properties": {
"properties": {
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true
}
}
}
}
}
}
]
}
哪個給我下面的錯誤
New-AzureRmResourceGroupDeployment : 8:21:59 AM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'Template schema 'https://schema.management.azure.com/schemas/2016-01-01/deploymentTemplate.json#' is not supported. Supported versions are '2014-04-01-preview,2015-01-01'.
然後我改變架構的URL https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#
然後起身New-AzureRmResourceGroupDeployment : 8:26:40 AM - Error: Code=InvalidTemplateDeployment; Message=The template deployment 'myencryptedstorage' is not valid according to the validation procedure.
任何人都知道什麼是做到這一點的正確方法?
您使用哪種方式訪問存儲空間? CLI,PowerShell或只是休息API? – qin
你有沒有參考正確的模式,即。 v 2016-01-01? azure-resource-manager-schemas/schemas/2016-01-01/Microsoft.Storage.json 您收到什麼錯誤消息? –
@RussellYoung我已更新我的問題。 – roy