将存储添加到Azure资源管理器

时间:2014-12-07 20:04:11

标签: azure azure-storage azure-resource-manager

是否可以向资源组添加存储? IIRC我的存储组是在我使用“旧”时自动创建的。门户网站的版本。 我可以在组中看到我的域和VM,但没有存储空间。我该如何添加它?

2 个答案:

答案 0 :(得分:2)

您可以通过ARM API或Powershell使用以下模板在资源组中创建存储帐户:

{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
    "name": {
        "type": "string"
    },
    "location": {
        "type": "string"
    },
    "accountType": {
        "type": "string"
    }
},
"resources": [
    {
        "apiVersion": "2014-06-01",
        "name": "[parameters('name')]",
        "type": "Microsoft.ClassicStorage/StorageAccounts",
        "location": "[parameters('location')]",
        "properties": {
            "accountType": "[parameters('accountType')]"
        }
    }
]}

答案 1 :(得分:0)

假设您的意思是存储帐户,您可以在preview portal的资源组中创建存储帐户。但是,您还无法通过ARM API或Powershell执行此操作(请参阅this question)。

相关问题