locked
ARM Template to upload a file to Azure Blob container RRS feed

  • Question

  • Hi

    I am able to create a container using below ARM template. Now i would like to upload a file to Container using ARM template as part my deployment. I am not able to find any document in MSDN, it would be great if you can help on this.

    {

      "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

      "contentVersion": "1.0.0.0",

      "parameters": {

        "location": {

          "type": "string"

        },

        "storageAccountName": {

          "type": "string"

        },

        "accountType": {

          "type": "string"

        },

        "kind": {

          "type": "string"

        },

        "accessTier": {

          "type": "string"

        },

        "supportsHttpsTrafficOnly": {

          "type": "bool"

        },

        "containerName": {

          "type": "string"

        }

      },

      "variables": {

      },

      "resources": [

        {

          "type": "Microsoft.Storage/storageAccounts",

          "apiVersion": "2019-06-01",

          "name": "[parameters('storageAccountName')]",

          "location": "[parameters('location')]",

          "dependsOn": [],

          "tags": {},

          "sku": {

            "name": "[parameters('accountType')]"

          },

          "kind": "[parameters('kind')]",

          "properties": {

            "accessTier": "[parameters('accessTier')]",

            "supportsHttpsTrafficOnly": "[parameters('supportsHttpsTrafficOnly')]"

          },

          "resources": [

            {

              "name": "[concat('default/', parameters('containerName'))]",

              "type": "blobServices/containers",

              "apiVersion": "2018-07-01",

              "dependsOn": [

                "[parameters('storageAccountName')]"

              ],

              "properties": {

                "publicAccess": "Blob"

              }

            }

          ]

        }

      ],

      "outputs": {}

    }


    Regards,

    Nara


    Wednesday, May 20, 2020 10:06 PM

All replies

  • @NarayanaReddyy Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused. 

     

    ARM templates can't be used to upload files. They can be used to refer to one to use one in a VM.

    Kindly let us know if the above helps or you need further assistance on this issue. 
    ------------------------------------------------------------------------------------------
    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members.

    Tuesday, May 26, 2020 6:05 AM
  •  Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Wednesday, May 27, 2020 8:15 AM
  • Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Thursday, June 4, 2020 3:25 PM