Skip to content

Files

Latest commit

f144e11 · Mar 30, 2022

History

History
109 lines (71 loc) · 3.49 KB

quickstart-create-front-door-bicep.md

File metadata and controls

109 lines (71 loc) · 3.49 KB
title description services documentationcenter author ms.author ms.date ms.topic ms.service ms.workload ms.tgt_pltfrm ms.custom
Quickstart: Create an Azure Front Door Service using Bicep
This quickstart describes how to create an Azure Front Door Service using Bicep.
front-door
schaffererin
v-eschaffer
03/30/2022
quickstart
frontdoor
infrastructure-services
na
devx-track-azurepowershell, subject-armqs, mode-arm

Quickstart: Create a Front Door using Bicep

This quickstart describes how to use Bicep to create a Front Door to set up high availability for a web endpoint.

[!INCLUDE About Bicep]

Prerequisites

  • If you don't have an Azure subscription, create a free account before you begin.
  • IP or FQDN of a website or web application.

Review the Bicep file

The Bicep file used in this quickstart is from Azure Quickstart Templates.

In this quickstart, you'll create a Front Door configuration with a single backend and a single default path matching /*.

:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.network/front-door-create-basic/main.bicep":::

One Azure resource is defined in the Bicep file:

Deploy the Bicep file

  1. Save the Bicep file as main.bicep to your local computer.

  2. Deploy the Bicep file using either Azure CLI or Azure PowerShell.

    az group create --name exampleRG --location eastus
    az deployment group create --resource-group exampleRG --template-file main.bicep --parameters frontDoorName=<door-name> backendAddress=<backend-address>
    
    New-AzResourceGroup -Name exampleRG -Location eastus
    New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -frontDoorName "<door-name>" -backendAddress "<backend-address>"
    

    [!NOTE] Replace <door-name> with the name of the Front Door resource. Replace <backend-address> with the hostname of the backend. It must be an IP address or FQDN.

    When the deployment finishes, you should see a message indicating the deployment succeeded.

Validate the deployment

Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.

az resource list --resource-group exampleRG
Get-AzResource -ResourceGroupName exampleRG

Clean up resources

When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the Front Door service and the resource group. This removes the Front Door and all the related resources.

az group delete --name exampleRG
Remove-AzResourceGroup -Name exampleRG

Next steps

In this quickstart, you created a Front Door.

To learn how to add a custom domain to your Front Door, continue to the Front Door tutorials.

[!div class="nextstepaction"] Front Door tutorials