When deploying an Azure Application Gateway for an application, the first resource that should be created is the virtual network and its subnets, specifically a subnet dedicated to the application gateway itself and another for the backend servers. This is because the application gateway needs a network to operate within, and it requires separate subnets for its own instances and for the resources it will be routing traffic to. Reference: https://learn.microsoft.com/sv-se/azure/app-service/overview-app-gateway-integration