首页 > 解决方案 > 将 Deployment template.json 和 parameters.json 转换为 AzureRM 对象

问题描述

如果给我一个 template.json 和一个相应的 paramaters.json 文件,有没有办法生成一个 JSON 文件,其中所有引用都已解析并评估了 ARM 函数?

例如,如果我在第一个片段中有类似下面的内容,有没有办法生成一个 JSON 可以完全评估 ARM 函数以获得第二个片段?

{
  "apiVersion": "2018-10-01",
  "type": "Microsoft.Network/publicIPAddresses",
  "name": "[variables('publicIPAddressName')]",
  "location": "[parameters('location')]",
  "properties": {
    "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
    "dnsSettings": {
      "domainNameLabel": "[parameters('dnsLabelPrefix')]"
    }
  }
},


{
  "apiVersion": "2018-10-01",
  "type": "Microsoft.Network/publicIPAddresses",
  "name": "ProdPublicIPAddress",
  "location": "North Europe",
  "properties": {
    "publicIPAllocationMethod": "Static",
    "dnsSettings": {
      "domainNameLabel": "Test"
    }
  }
},

标签: azure-resource-manager

解决方案


推荐阅读