We are currently utilizing the Deploy Azure Web App step that evaluates deployment target by Role/Environment using tags. The issue is that we are expecting to have multiple azure web apps match a role/environment. As it stands, we have a deployment targets (Azure Web Apps) set up as such:
we have the roles selected, so the Deploy Azure Web App step works perfectly in deploying to both applications, however we are having issues when it comes time to swap slots. We wanted to utilize the custom Powershell script, but we have no way of it figuring out the name and resource group name of the target role web app without us having to hard-code web app names in the project variables. We would like to have the script figure out the list of azure web apps that are being targeted based on the target role and environment being deployed to, and then have them as an array of objects, and then in the script to swap slots, have a for-each loop and pass the web app name and resource group.
Is there a) an easier way to do this, and if not, b) which info should I output as a variable that would build an array of objects that have at least Web App Name and Resource Group?