队列/表/文件的Azure ARM模板

时间:2018-08-10 14:29:22

标签: azure

我正在使用下面提到的ARM模板在Azure中创建一个存储帐户,但它仅创建blob存储,而不创建队列/表/文件。

 "resources": [
    {
      "type": "Microsoft.Storage/storageAccounts",
      "name": "[variables('storageAccountName')]",
      "apiVersion": "2018-02-01",
      "location": "[parameters('Location')]",
      "sku": {
        "name": "[parameters('storageAccountType')]"
      },
      "tags": {
        "displayName": "Storage"
      },
      "kind": "Storage",
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "keySource": "Microsoft.Storage",
          "services": {
            "blob": {
              "enabled": true
            }
          }
        }
      }
    }
  ],
  "outputs": {
    "storageAccountName": {
      "type": "string",
      "value": "[variables('storageAccountName')]"
    }
  }

请帮助理解如何使用ARM创建所有存储类型,这有可能吗?

谢谢

2 个答案:

答案 0 :(得分:1)

您的ARM模板将部署一个存储帐户,包括博客,文件,队列和表。我使用门户网站中的 Template 服务对其进行了测试,并使用了经过稍微修改的版本:

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "storageAccountName": {
            "type": "string"
        }
    },

"resources": [
    {
      "type": "Microsoft.Storage/storageAccounts",
      "name": "mystoragggg",
      "apiVersion": "2018-02-01",
      "location": "westeurope",
      "sku": {
        "name": "Standard_LRS"
      },
      "tags": {
        "displayName": "Storage"
      },
      "kind": "Storage",
      "properties": {
        "networkAcls": {
          "bypass": "AzureServices",
          "virtualNetworkRules": [],
          "ipRules": [],
          "defaultAction": "Allow"
        },
        "supportsHttpsTrafficOnly": true,
        "encryption": {
          "keySource": "Microsoft.Storage",
          "services": {
            "blob": {
              "enabled": true
            }
          }
        }
      }
    }
  ]
}

证明:

enter image description here

答案 1 :(得分:0)

我认为这是不可能的,没有有关如何执行此操作的文档。

如果需要,请在此处投票: https://feedback.azure.com/forums/217298-storage/suggestions/37651378-allow-to-create-queue-using-arm-template