Closed kyle-thomas-TT closed 6 years ago
@kyle-thomas-TT Thanks for bringing this to our attention. Your issue has been shared with the content owner for further review.
@kyle-thomas-TT - thanks for this question. You have a couple of options. You can use property iteration in the resource to correctly resolve the if statement. Or, you can move the if statement directly into the place where the suffixName variable is used.
I am trying to verify exactly which functions won't work in this situation of using copy in a variable.
@kyle-thomas-TT - the product team is researching why this is happening. I'll let you know if there is an update on this issue.
@kyle-thomas-TT - I have confirmed that this issue has been resolved. Thanks for your feedback.
The following code:
"suffixName": "[if(empty(parameters('Suffix')), '', concat('-', parameters('Suffix')))]", "notificationHubNames": { "copy": [ { "name": "names", "count": "[length(variables('applicationTypes'))]", "input": { "name": "[concat(variables('applicationName'), variables('suffixName'), '-', variables('applicationTypes')[copyIndex('names')],'-notifyhub')]" } } ] }
results in the error: 3:57:25 PM - Resource Microsoft.NotificationHubs/namespaces/notificationHubs 'mobility-ktlocal-notifynamespace/mobility[if(empty(parameters('Suffix')), '', concat('-', parameters('Suffix')))]-crewForce-notifyhub' failed with message '{ "error": { "message": "Bad Request", "code": "BadRequest" }
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.