2016-11-12 7 views
1

私はリソースから変数にいくらかの値を移動したいと思います。特定のホスト名。Azure RMテンプレートは複雑な値を変数に入れます

enter image description here ただし、公式ドキュメントの構文は機能していないようです。 https://azure.microsoft.com/en-us/documentation/articles/resource-group-authoring-templates/#variables

 "variables": { 
    "sites_site1_hostNames": { 
     "hostNames": [ 
     "host1.com", 
     "host2.com", 
     "host3.net", 
     "host4.azurewebsites.net" 
     ] 
    }, 
    }, 
    "resources": [ 
     { 
     "type": "Microsoft.Web/sites", 
     "name": "[variables('sites_site1_name')]", 
     "apiVersion": "2015-08-01", 
     "location": "West US 2", 
     }, 
     "properties": { 
      "name": "[variables('sites_site1_name')]", 
      "hostNames": "[variables('sites_site1_hostNames')]", 
      "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverfarm1'))]" 
     }, 
     "resources": [], 
     "dependsOn": [ 
      "[resourceId('Microsoft.Web/serverfarms', variables('serverfarm1'))]" 
     ] 
     } 

何変数にそのような値(ホスト名)を移動するための適切な方法でしょうか?

そう等

答えて

3

修正変数宣言("type": "array",を追加):

"sites_site1_hostNames": { 
    "type": "array", 
    "hostNames": [ 
    "host1.com", 
    "host2.com", 
    "host3.net", 
    "host4.azurewebsites.net" 
    ] 
関連する問題