I posted some question on stackoverflow and would like to thanks those who take time to answer. Although it exists documentation, i still face an issue related to output feature.
Basically I understand how to retrieve data when format is string. Unfortunately when data is on array format it looks more difficult for me.
"outputs": {
"keyVaultName": {
"type": "string",
"value": "[variables('keyVaultName')]"
},
"websitesname": {
"type": "array",
"copy": {
"count": "[length(variables('webSitesName'))]",
"input": {
"name": "[variables('webSitesName')[copyIndex()].name]"
}
}
}
}
Then i do this:
$deploymentResult = New-AzResourceGroupDeployment -Name $deploymentName -ResourceGroupName
$ResourceGroupName-TemplateFile $TemplateFile
$vaultName = $deploymentResult.Outputs.keyVaultName.Value
$arrayWebsitesName = $deploymentResult.Outputs.websitesname.Value
I need to extract value from returned array. In powershell i expected to use something like
- $arrayWebsitesName[0] to get AppService-Prod-CentralUS
- $arrayWebsitesName[\1] to get AppService-Prod-EastUS
I believe there is something related to conversion and I tried convertto-json without success. Your help is appreciated !
