Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.45 KB

README.md

File metadata and controls

71 lines (51 loc) · 2.45 KB

Add route

afd/add-route/README.md

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Create an Azure Front Door Profile
  3. Create an Azure Front Door Endpoint
  4. Create an Azure Front Door Origin Group
  5. Create an Azure App Service Plan
  6. Deploy a managed JavaSE Spring Boot application
  7. Deploy a managed JavaSE Quarkus application
  8. Add origins to an Azure Front Door Origin Group

Add route

We need to add a route to our Front Door to map the endpoint to the origin group. Use the following command line below:

  az afd route create \
    --resource-group $RESOURCE_GROUP \
    --profile-name $AFD_PROFILE_NAME \
    --endpoint-name $AFD_ENDPOINT_NAME \
    --forwarding-protocol MatchRequest \
    --route-name route \
    --https-redirect Enabled \
    --origin-group $AFD_ORIGIN_GROUP_NAME \
    --supported-protocols Http Https \
    --link-to-default-domain Enabled 

The next step is to get the endpoint and browse to it.To get the endpoint Use the following command line:

  az afd endpoint show --resource-group $RESOURCE_GROUP --profile-name $AFD_PROFILE_NAME --endpoint-name $AFD_ENDPOINT_NAME --query hostName --output tsv

Cleanup

Do NOT forget to remove the resources once you are done running the example.

1m