1
votes

Is it possible to get a list of WebApps that exist in a given resource group during an ARM template deployment? If so, how?

If I ask for all the properties of the resource group using an output in my template I get only {"provisioningState":"Succeeded"}.

"outputs": {
    "rg": {
        "type": "Object",
        "value": "[resourceGroup().properties]"
    }
}

Scenario: Trying to create App Gateway path-based rules for every web app automatically as apps are added to an App Service Plan.

1

1 Answers

1
votes

I'm fairly certain you cannot do that, because resource group doesnt have such properties, your options are:

  1. pass in an array of web app names
  2. read resource group tags with the same array, you'd have to prepopulate the webapp names to the tag
  3. create an azure function that would query the Azure rest api to get webapp list and give it back to the ARM Template