Moving Application Gateway along with WAF to another subscription

Ahmed Abdelhadi 40 Reputation points
2023-09-19T07:12:40.5533333+00:00

Migrate Application Gateway and WAF deployments to another subscription on same tenant, if application gateway cannot be moved then how are we supposed to recreate an application gateway that contains 50+ http listener, 100+ Rules, and 20+ backend pools, 20 SSL Certificates??

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,213 questions
Azure Web Application Firewall
Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
287 questions
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 50,021 Reputation points Microsoft Employee Moderator
    2023-09-19T14:28:02.35+00:00

    Hello @Ahmed Abdelhadi ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to know how to move an Application Gateway along with WAF to another subscription without downtime.

    As mentioned by @Tushar Kumar above, Application gateways and WAF policies are not supported for move across resource groups/subscriptions/regions.

    Refer: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-support-resources#microsoftnetwork

    So, the only option is to recreate the Application gateway in the new subscription.

    However, to minimize downtime, you could follow a few steps as below:

    • You can export your existing App gateway configuration via ARM template, Bicep, PowerShell, CLI, etc.
    • You can either export template from your existing resource group or the Application gateway.

    Refer: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/export-template-portal

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/export-template-cli

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/export-template-powershell

    • Deploy the dependent resources such Key vaults and upload certificates as mentioned by @AirGordon .
    • Modify the exported template per your requirement and then deploy the Application gateway in the new subscription using that template.
    • Do a DNS swap to the newly provisioned application gateway (meaning point your DNS name or custom domain to the newly created application gateway).
    • Once the newly created Application gateway is fully provisioned and working, you can delete your old gateway.

    This should result in almost no downtime.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AirGordon 7,150 Reputation points
    2023-09-19T11:51:51.63+00:00

    How are we supposed to recreate an application gateway that contains 50+ http listener, 100+ Rules, and 20+ backend pools, 20 SSL Certificates??

    In an ideal world, you'd have used Infrastructure as code to deploy the Application Gateway and to manage the configuration. In this way, you'd run the deployment again to reproduce the same configuration. If you didn't follow this approach, you can capture the current configuration using the Export Template option in the Portal which provides a great starting place for you to polish and refine the template in order to deploy again.

    There will likely be some prerequisite resources that you will need to create first, a Virtual Network and subnet as well as a Key Vault for the certificates. Deployment of these resources should occur first.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.