locked
Creating a File systems in ADL Gen2 via ARM template RRS feed

  • Question

  • Is there a way to do that via ARM template?

    Just to be clear, by File systems I'm referring to the "container" equivalent in the bolb storage.

    Sunday, June 9, 2019 8:24 PM

All replies

  •  Hi LironLevy, You should be able to integrate the storage parameters within the ADL Gen2 ARM template, there's a good tutorial in SamaCogan: including and example specific to storage(you may have to add the config to the existing ADL template): 
    {
        "type": "Microsoft.Storage/storageAccounts",
        "apiVersion": "2018-02-01",
        "name": "[parameters('StorageAccountName')]",
        "location": "[resourceGroup().location]",
        "tags": {
            "displayName": "[parameters('StorageAccountName')]"
        },
        "sku": {
            "name": "Standard_LRS"
        },
        "kind": "StorageV2",
        "properties": {},
        "resources": [
            {
                "type": "blobServices/containers",
                "apiVersion": "2018-03-01-preview",
                "name": "[concat('default/', parameters('Container1Name'))]",
                "dependsOn": [
                    "[parameters('StorageAccountName')]"
                ],
                "properties": {
                    "publicAccess": "Container"
                }
            },
            {
                "type": "blobServices/containers",
                "apiVersion": "2018-03-01-preview",
                "name": "[concat('default/', parameters('Container2Name'))]",
                "dependsOn": [
                    "[parameters('StorageAccountName')]"
                ],
                "properties": {
                    "publicAccess": "None"
                }
            }
        ]
    }
    source of the example can be found here
    Monday, June 10, 2019 8:56 PM
  • Hey Adam,

    Maybe I'm missing somthing but the example you provieded is for a normal storage and not adl (which is indeed working), but when i try to do the same for adl gen2, i.e.:

        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('DataLakestorageAccountName')]",
          "apiVersion": "2018-07-01",
          "location": "[resourceGroup().location]",
          "properties": {
            "isHnsEnabled": "true"
          },
          "sku": {
            "name": "[parameters('storageAccountType')]"
          },
          "kind": "StorageV2",
          "resources": [
            {
              "name": "[concat('default/', variables('containerName'))]",
              "type": "blobServices/containers",
              "apiVersion": "2018-07-01",
              "dependsOn": [
                "[variables('DataLakestorageAccountName')]"
              ]
            }
          ]
        },

    I get this error:

    At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.
    Details:
    BadRequest: {
      "error": {
        "code": "ContainerOperationFailure",
        "message": "Blob API is not yet supported for hierarchical namespace accounts.\nRequestId:7ec896f9-401e-004f-3c2e-20d9bb000000\nTime:2019-06-11T08:22:49.6023630Z"
      }
    } undefined
    Task failed while creating or updating the template deployment.

    Am I missing somthing?

    • Edited by LironLevy Tuesday, June 11, 2019 8:34 AM
    Tuesday, June 11, 2019 8:34 AM