将ARM模板上传到存储的机制 [英] Mechanism to upload ARM template into storage

查看:74
本文介绍了将ARM模板上传到存储的机制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用已链接我的ARM部署模型中的模板.我读过的每一篇文章都提到,链接的模板必须位于可访问的位置(例如blob存储).

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.

我希望使用Artifact Storage Account选项,但仅在部署基础结构时不可用.

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

是否有内置方法来实现这一目标,或者它需要诸如Powershell脚本或VSTS构建步骤之类的额外步骤?

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?

推荐答案

在您将两个参数_artifactsLocation和_artifactsLocationSasToken引入部署中后,工件存储帐户选项将立即可用.

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"
      }
    }
  }

这篇关于将ARM模板上传到存储的机制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆