Search code examples
azure-traffic-manager

Traffic manager does not show web app I just created


I have multiple RGs in my subscription. I have created a TM and a single web app (higher than S1 plan).

As a step in the TM configuration I have a list of web apps to choose from, but the one I have just created does not show up in that list.

Is there a policy around regions or perhaps RG's, that can explain this behaviour ?


Solution

  • As far as I know, there are no region or resource group limitations when you add web apps as the endpoints of the Traffic Manager but only Web Apps at the 'Standard' SKU or above are eligible for use with Traffic Manager. Read some additional considerations apply when configuring Web Apps as endpoints in Traffic Manager.

    First of all, ensure that you have implemented the app service well and follow the correct steps to an App service endpoint to a Traffic Manager profile. You click add, select Azure EndpointType, and select app service or app service slot as the Target resource type.

    Then, if you have multiple subscriptions, ensure that you have created the app service and traffic manager in the same subscription.

    If there is any portal issue or web browser issue, I suggest adding the app service endpoints with Azure CLI or PowerShell.

    In this example, create a Traffic Manager profile and add one App Service endpoint using the Add-AzTrafficManagerEndpointConfig cmdlet.

    $TmProfile = New-AzTrafficManagerProfile -Name myprofile -ResourceGroupName MyRG -TrafficRoutingMethod Performance -RelativeDnsName myapp -Ttl 30 -MonitorProtocol HTTP -MonitorPort 80 -MonitorPath "/"
    
    $webapp1 = Get-AzWebApp -Name webapp1
    Add-AzTrafficManagerEndpointConfig -EndpointName webapp1ep -TrafficManagerProfile $TmProfile -Type AzureEndpoints -TargetResourceId $webapp1.Id -EndpointStatus Enabled
    
    Set-AzTrafficManagerProfile -TrafficManagerProfile $TmProfile