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 |
This quickstart describes how to use Bicep to create a Front Door to set up high availability for a web endpoint.
[!INCLUDE About Bicep]
- If you don't have an Azure subscription, create a free account before you begin.
- IP or FQDN of a website or web application.
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:
-
Save the Bicep file as main.bicep to your local computer.
-
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.
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
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
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