git - 如何引用存储在 VSTS 或 Azure DevOps Git Repo 中的链接 ARM 模板?
问题描述
ARM 模板允许您使用“templateLink”属性引用另一个“链接的”ARM 模板。我想在 Azure DevOps (VSTS) 中使用原始 git uri 来执行此操作。我可以用 github 做到这一点,如下所示:
"resources": [
{
"apiVersion": "2017-05-10",
"name": "linkedTemplate",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "incremental",
"templateLink": {
"uri": "https://raw.githubusercontent.com/lw/BaseARMTemplates/master/ARM.json"",
"contentVersion": "1.0.0.0"
},
}
}
]
解决方案
最佳做法是使用带有 sas 令牌的存储帐户来检索模板。这将允许您安全地引用您的模板 ( https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-powershell-sas-token )。
如果您可以在 url 中传递身份验证(仅获取请求),则可以使用任何安全存储。或者您可以创建一个 azure 函数,将您的请求代理到私有存储并检索模板(显然是 hack)。
推荐阅读
- apache - Installing multiple RSA SSL certificates with Apache for one website
- javascript - 如何使用javascript从多个连续跨度中获取单个组合字符串
- python - 之后应该调用什么小部件?
- active-directory - 在循环依赖的情况下使用 1.2.840.113556.1.4.1941 实现是否安全?
- ruby-on-rails - How can I route to a belongs_to table in Rails (using PostgreSQL)?
- r - Error with Multi-variate Time Series clustering using dtwclust - There are missing values in the series
- python - 如何将从 cv2.findContours 获得的 NumPy 数组转换为 Shapely 多边形?
- typescript - Generic json deserialzation in typescript
- python - 在指定索引之间填充向量值
- javascript - 从 Firebase 的 Firestore 读取时无法写入值。说“更新不是功能”