Mechanism to upload ARM template into storage

主宰稳场 提交于 2019-12-11 06:56:30

问题


I want to use linked templates in my ARM deployment model. Every article I've read mentions that the linked template needs to be in an accessible location (such as blob storage).

This works OK if I manually upload the files to storage but I'm looking for a mechanism to upload a template to Storage as part of the build or Deployment process.

I'd hoped to use the Artifact Storage Account option but it is unavailable when deploying infrastructure only.

Is there a built-in method to achieve this or would it require either an extra step such as powershell script or VSTS build step?


回答1:


The Artifact Storage Account option becomes available as soon as you introduce the two parameters _artifactsLocation and _artifactsLocationSasToken into your deployment.

  "parameters": {
    "_artifactsLocation": {
      "type": "string",
      "metadata": {
        "description": "Auto-generated container in staging storage account to receive post-build staging folder upload"
      }
    },
    "_artifactsLocationSasToken": {
      "type": "securestring",
      "metadata": {
        "description": "Auto-generated token to access _artifactsLocation"
      }
    }
  }


来源:https://stackoverflow.com/questions/50906732/mechanism-to-upload-arm-template-into-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!