(푸른 RM 템플릿)의 기능 사용 :참조() 자원의 copy.count 나도 같은 템플릿에 정의 된 푸른 앱 서비스의 아웃 바운드 IP 주소를 SQL Server의 방화벽 예외를 추가 할 필요가 ARM 템플릿 배포에서
{
"name": "[concat(variables('sqlServerName'),'/azureFireWallRule',copyIndex())]",
"type": "Microsoft.Sql/servers/firewallRules",
"apiVersion": "2014-04-01",
"properties": {
"startIpAddress": "[split(reference(variables('appServiceRef')).possibleOutboundIpAddresses,',')[copyIndex()]]",
"endIpAddress": "[split(reference(variables('appServiceRef')).possibleOutboundIpAddresses,',')[copyIndex()]]"
},
"copy": {
"name": "[concat(variables('sqlServerName'),'azureFireWallRule')]",
"count": "[length(split(reference(variables('appServiceRef')).possibleOutboundIpAddresses,','))]"
},
"dependsOn": [
"[variables('sqlServerRef')]",
"[variables('appServiceRef')]"
]
}
그러나 copy.count에서 reference() 함수 사용은 허용되지 않습니다.
내가이 (안 행운)를 해결하려고 : paramater으로 IP 수를 통과 중첩 배포 리소스를함으로써 조건 속성년 OFC를, 문제가 될 수 있습니다 2 개의 순차적 배포로 해결됩니다. 그러나 단일 ARM 템플릿의 관점에서이 작업을 수행 할 수있는 방법이 있습니까?
[Azure 웹 앱의 ** possibleOutboundIpAddresses ** 또는 ** outboundIpAddresses ** 확인] (http://ruslany.net/2015/06/how-to-find-out-outbound-ip-addresses -used-by-azure-web-app /)를 사용하면 일반적으로 4 개의 아웃 바운드 IP 주소가 있음을 알 수 있습니다. 따라서 "count"를 4로 직접 설정할 수 있습니다. –
항상 그렇지는 않습니다. 나는 5-6 가지의 가능성을 가지고있다 .OutbounIpAddresses 때때로 –