|
| 1 | +--- |
| 2 | +title: Post Migration Dev-Ops Experience |
| 3 | +description: Guidance to update Terraform, ARM templates, Bicep, PowerShell, and Azure CLI pipelines after migrating from Azure Front Door (Classic) or CDN Classic to Azure Front Door Standard/Premium. |
| 4 | +author: jainsabal |
| 5 | +ms.author: jainsabal |
| 6 | +ms.service: azure-frontdoor |
| 7 | +ms.topic: overview |
| 8 | +ms.date: 08/06/2025 |
| 9 | +--- |
| 10 | +# Post Migration Dev-Ops Experience |
| 11 | + |
| 12 | +After migrating from Azure Front Door (Classic) or CDN Classic to Azure Front Door Standard/Premium, update your DevOps pipeline scripts to deploy and manage the new Front Door Standard/Premium resources. Use the guidance below for various tools and pipeline types. |
| 13 | + |
| 14 | +## Terraform |
| 15 | + |
| 16 | +### Prerequisites |
| 17 | + |
| 18 | +- Ensure the Terraform CLI is installed. See [Install Terraform](https://developer.hashicorp.com/terraform/tutorials/azure-get-started/install-cli). |
| 19 | +- Install the Azure Resource Manager Export extension for Terraform to export existing Azure resources to Terraform templates. See [Overview of Azure Export for Terraform](https://learn.microsoft.com/azure/developer/terraform/azure-export-for-terraform/export-terraform-overview). |
| 20 | + |
| 21 | +### Steps |
| 22 | + |
| 23 | +After migration, all classic AFD resources are migrated to AFD Standard and Premium. Then: |
| 24 | + |
| 25 | +- **Export the new AFD Standard/Premium configuration**: Use Azure’s export tool to generate Terraform configurations for your new Front Door Standard/Premium resources. Follow [Quickstart: Export your first resources using Azure Export for Terraform](https://learn.microsoft.com/azure/developer/terraform/azure-export-for-terraform/export-first-resources?tabs=azure-cli) to export the Front Door Standard/Premium resources into Terraform files. |
| 26 | +- **Update Terraform templates in your pipeline**: Replace references to Front Door Classic resources with the exported Standard/Premium configuration. |
| 27 | + - For AFD Classic, the Terraform resource is [`azurerm_frontdoor`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/frontdoor). |
| 28 | + - For CDN Classic, use the [`azurerm_cdn_*`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_endpoint) resources. |
| 29 | + - For AFD Standard/Premium (AFDx), use the [`azurerm_cdn_frontdoor_*`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_profile) resources. |
| 30 | +- Check in the updated Terraform code to your pipeline and run plan/apply to start managing the new Front Door via Terraform. |
| 31 | + |
| 32 | +## ARM template |
| 33 | + |
| 34 | +### Steps |
| 35 | + |
| 36 | +After migration, all classic AFD resources are migrated to AFD Standard and Premium. |
| 37 | + |
| 38 | +- **Export ARM templates for Front Door Standard/Premium** using any of the following: |
| 39 | + - **Azure portal**: [Export template in Azure portal](../azure-resource-manager/templates/export-template-portal.md). |
| 40 | + - **Azure CLI**: [Export template in Azure CLI](../azure-resource-manager/templates/export-template-cli.md). |
| 41 | + - **Azure PowerShell**: [Export template in Azure PowerShell](../azure-resource-manager/templates/export-template-powershell.md). |
| 42 | +- **Update ARM templates in your pipeline** to use the new Front Door Standard/Premium template instead of the Front Door (Classic) template. In Azure DevOps or GitHub Actions, update the template path and parameters in your deployment step, then deploy the new template. |
| 43 | +- **Validate**: Remove or archive references to the classic Front Door template to avoid confusion. |
| 44 | + |
| 45 | +## Bicep |
| 46 | + |
| 47 | +### Prerequisites |
| 48 | + |
| 49 | +- Install the Bicep CLI and tools. See [Set up Bicep development and deployment environments](../azure-resource-manager/bicep/install.md). |
| 50 | + |
| 51 | +### Steps |
| 52 | + |
| 53 | +After migration, all classic AFD resources are migrated to AFD Standard and Premium. |
| 54 | + |
| 55 | +- **Generate a Bicep template for Front Door Standard/Premium** by decompiling an exported ARM template. See [Decompile ARM template JSON to Bicep](../azure-resource-manager/bicep/decompile.md?tabs=azure-cli). |
| 56 | +- **Update Bicep files in your pipeline**: Replace Front Door Classic definitions with Standard/Premium. This may include updating resource types such as [`Microsoft.Cdn/profiles`](https://learn.microsoft.com/azure/templates/microsoft.cdn/profiles?pivots=deployment-language-bicep) and child resources (endpoints, routes, etc.). |
| 57 | +- **Test** a deployment (for example, `az deployment group create`) to verify provisioning of AFD Standard/Premium. |
| 58 | + |
| 59 | +## PowerShell |
| 60 | + |
| 61 | +### Prerequisites |
| 62 | + |
| 63 | +Make sure you have the latest Azure PowerShell Az modules installed (Az.Cdn module version that supports AFD Standard/Premium). See [Install Azure PowerShell](https://learn.microsoft.com/powershell/azure/install-azps-windows). |
| 64 | + |
| 65 | +### Steps |
| 66 | + |
| 67 | +- **Update PowerShell deployment scripts**: Replace any Front Door (Classic) cmdlets with AFD Standard/Premium cmdlets. For examples, see the [Azure Front Door PowerShell quickstart](create-front-door-powershell.md). |
| 68 | +- **Incorporate new configuration and remove old references**: Ensure scripts configure required components (origins, origin groups, routes, rules, etc.). Remove or comment commands that manage Classic Front Door. |
| 69 | +- Command group mapping: |
| 70 | + - AzFrontDoorCdn commands under the [Az.Cdn module](https://learn.microsoft.com/powershell/module/az.cdn/) are for AFD Standard/Premium. |
| 71 | + - AzCdn commands under the [Az.Cdn module](https://learn.microsoft.com/powershell/module/az.cdn/) are for CDN Classic. |
| 72 | + - The [Az.FrontDoor module](https://learn.microsoft.com/powershell/module/az.frontdoor/) is for AFD Classic. |
| 73 | +- **Test** your script (locally or in a test pipeline) to verify creation or updates to AFD Standard/Premium, then commit changes to your pipeline. |
| 74 | + |
| 75 | +## CLI |
| 76 | + |
| 77 | +### Prerequisites |
| 78 | + |
| 79 | +- Ensure Azure CLI is installed and updated to a version that supports the `afd` command group (for example, 2.63.0 or later). See [Install Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli). |
| 80 | +- Log in (`az login`) and set the correct subscription context. |
| 81 | + |
| 82 | +### Steps |
| 83 | + |
| 84 | +- **Update CLI commands in scripts**: Use the Azure Front Door Standard/Premium command group: [`az afd`](https://learn.microsoft.com/cli/azure/afd). |
| 85 | +- **Replace or remove Front Door Classic CLI usage**: |
| 86 | + - CDN Classic commands: [`az cdn`](https://learn.microsoft.com/cli/azure/cdn) |
| 87 | + - AFD Classic commands: [`az network front-door`](https://learn.microsoft.com/cli/azure/network/front-door) |
| 88 | +- **Validate** the updated CLI script manually or in a staging pipeline to ensure successful configuration of Front Door Standard/Premium. |
| 89 | + |
| 90 | +## Next step |
| 91 | + |
| 92 | +* For more questions, refer to the [AFD/CDN Classic Migration FAQ](migration-faq.md). |
| 93 | +* Understand the [settings mapping between Azure Front Door tiers](tier-mapping.md). |
| 94 | + |
0 commit comments