I have a VNET module and getting output as
output subnetids array = [for (name, i) in subnets :{
subnets : virtualNetwork.properties.subnets[i].id
}]
and one module for creating app service plan and getting output as
output servicePlanIds array = [for (name, i) in serviceplans :{
ids : appServicePlan[i].id
}]
Now, I would like to combine both these array outputs and trying to create two web apps: I am unable to find a way to pass values to serverfarmid and virtualnetworksubnetid. Please help.
resource webApp 'Microsoft.Web/sites@2021-01-01' = [for webappName in webappNames: {
name: WebappName
location: location
kind: 'app'
properties: {
serverFarmId: serviplanIds.output.appServicePlan[].id
virtualNetworkSubnetId: subnetids.output.subnets[0].id
httpsOnly: true
siteConfig: {
vnetRouteAllEnabled: true
http20Enabled: true
}
}
}]