Proposed Pull Request Change

title titleSuffix description services author ms.author ms.date ms.topic ms.service ms.custom
Quickstart: Direct web traffic using a Resource Manager template Azure Application Gateway In this quickstart, you learn how to use a Resource Manager template to create an Azure Application Gateway that directs web traffic to virtual machines in a backend pool. application-gateway mbender-ms mbender 05/30/2024 quickstart azure-application-gateway mvc, subject-armqs, mode-arm, devx-track-arm-template
πŸ“„ Document Links
GitHub View on GitHub Microsoft Learn View on Microsoft Learn
Raw New Markdown
Generating updated version of doc...
Rendered New Markdown
Generating updated version of doc...
+0 -0
+0 -0
--- title: 'Quickstart: Direct web traffic using a Resource Manager template' titleSuffix: Azure Application Gateway description: In this quickstart, you learn how to use a Resource Manager template to create an Azure Application Gateway that directs web traffic to virtual machines in a backend pool. services: application-gateway author: mbender-ms ms.author: mbender ms.date: 05/30/2024 ms.topic: quickstart ms.service: azure-application-gateway ms.custom: mvc, subject-armqs, mode-arm, devx-track-arm-template # Customer intent: As a solutions architect, I want to create an Azure Application Gateway using a Resource Manager template, so that I can efficiently direct web traffic to backend virtual machines and ensure optimal performance of my web applications. --- # Quickstart: Direct web traffic with Azure Application Gateway - ARM template In this quickstart, you use an Azure Resource Manager template (ARM template) to create an Azure Application Gateway. Then you test the application gateway to make sure it works correctly. The Standard v2 SKU is used in this example. :::image type="content" source="./media/quick-create-portal/application-gateway-qs-resources.png" alt-text="Conceptual diagram of the quickstart setup." lightbox="./media/quick-create-portal/application-gateway-qs-resources.png"::: [!INCLUDE [About Azure Resource Manager](~/reusable-content/ce-skilling/azure/includes/resource-manager-quickstart-introduction.md)] You can also complete this quickstart using the [Azure portal](quick-create-portal.md), [Azure PowerShell](quick-create-powershell.md), or [Azure CLI](quick-create-cli.md). If your environment meets the prerequisites and you're familiar with using ARM templates, select the **Deploy to Azure** button. The template will open in the Azure portal. :::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fdemos%2Fag-docs-qs%2Fazuredeploy.json"::: > [!NOTE] > Application Gateway frontend now supports dual-stack IP addresses (Preview). You can now create up to four frontend IP addresses: Two IPv4 addresses (public and private) and two IPv6 addresses (public and private). ## Prerequisites - An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn). ## Review the template For the sake of simplicity, this template creates a simple setup with a public frontend IP, a basic listener to host a single site on the application gateway, a basic request routing rule, and two virtual machines in the backend pool. > [!NOTE] > Application Gateway frontend now supports dual-stack IP addresses (Public Preview). You can now create up to four frontend IP addresses: Two IPv4 addresses (public and private) and two IPv6 addresses (public and private). The template used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/ag-docs-qs/) :::code language="json" source="~/quickstart-templates/demos/ag-docs-qs/azuredeploy.json"::: > [!TIP] > You can modify values of the `Name` and `Tier` parameters under `resource\applicationGateWay\properties\sku` to use a different SKU. For example: `Basic`. For information about deploying custom templates, see [Create and deploy ARM templates](../azure-resource-manager/templates/quickstart-create-templates-use-the-portal.md). > [!NOTE] > In regions that support availability zones, if you don't specify zones during creation via CLI, PowerShell, ARM/Bicep, or the REST APIβ€”Azure Application Gateway automatically enables zone redundancy, distributing instances across multiple availability zones for enhanced resiliency Multiple Azure resources are defined in the template: - [**Microsoft.Network/applicationgateways**](/azure/templates/microsoft.network/applicationgateways) - [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses) : one for the application gateway, and two for the virtual machines. - [**Microsoft.Network/networkSecurityGroups**](/azure/templates/microsoft.network/networksecuritygroups) - [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualnetworks) - [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualmachines) : two virtual machines - [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkinterfaces) : two for the virtual machines - [**Microsoft.Compute/virtualMachine/extensions**](/azure/templates/microsoft.compute/virtualmachines/extensions) : to configure IIS and the web pages ## Deploy the template Deploy the ARM template to Azure: 1. Select **Deploy to Azure** to sign in to Azure and open the template. The template creates an application gateway, the network infrastructure, and two virtual machines in the backend pool running IIS. :::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fdemos%2Fag-docs-qs%2Fazuredeploy.json"::: 2. Select or create your resource group, type the virtual machine administrator user name and password. 3. Select **Review + Create** and then select **Create**. The deployment can take 20 minutes or longer to complete. ## Validate the deployment Although IIS isn't required to create the application gateway, it's installed to verify if Azure successfully created the application gateway. Use IIS to test the application gateway: 1. Find the public IP address for the application gateway on its **Overview** page.![Record application gateway public IP address](./media/application-gateway-create-gateway-portal/application-gateway-record-ag-address.png) Or, you can select **All resources**, enter *myAGPublicIPAddress* in the search box, and then select it in the search results. Azure displays the public IP address on the **Overview** page. 2. Copy the public IP address, and then paste it into the address bar of your browser to browse that IP address. 3. Check the response. A valid response verifies that the application gateway was successfully created and can successfully connect with the backend. ![Test application gateway](./media/application-gateway-create-gateway-portal/application-gateway-iistest.png) Refresh the browser multiple times and you should see connections to both myVM1 and myVM2. ## Clean up resources When you no longer need the resources that you created with the application gateway, delete the resource group. This removes the application gateway and all the related resources. To delete the resource group, call the `Remove-AzResourceGroup` cmdlet: ```azurepowershell-interactive Remove-AzResourceGroup -Name <your resource group name> ``` ## Next steps > [!div class="nextstepaction"] > [Manage web traffic with an application gateway using the Azure CLI](./tutorial-manage-web-traffic-cli.md)
Success! Branch created successfully. Create Pull Request on GitHub
Error: