Adding an endpoint
After a Traffic Manager profile is created, we have the frontend endpoint and routing method defined. But we still need to define where the traffic needs to go after it's reached Traffic Manager. We need to add endpoints to the backend and define where the traffic is directed. In this recipe, we'll add a new endpoint to Traffic Manager.
Getting ready
Before we can add endpoints to Traffic Manager, we need to create them. Executing the following script in PowerShell can help you create two web apps quickly:
$ResourceGroupName = "packt-demo-webapp" $webappname="packt-demo-webapp" $location1="West Europe" $NumberOfWebApps= 2 New-AzResourceGroup -Name $ResourceGroupName ' -Location $location $i=1 Do { New-AzWebApp -Name $webappname'-0'$i ' -Location $location ' -AppServicePlan $webappname ' -ResourceGroupName $ResourceGroupName } While (($i=$I+1) -le $NumberOfWebApps)
The script can be...