Application Gateway

circle-info

Updated: February 13, 2026

circle-info

These examples assume that linked resources (VNet, Subnet, Public IP) already exist in the same resource group.

Creating a Basic Application Gateway

defaults:
  resource_group: rg1

resources:
  - type: "Microsoft.Network/applicationGateways"
    name: "public-appgw-v2"
    api_version: "2025-05-01"
    props:
      sku:
        tier: "Basic"
        name: "Basic"
      gateway_ip_configurations:
        - name: "appgw-ip-config"
          props:
            subnet:
              id: "/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/appgw-subnet"

      frontend_ip_configurations:
        - name: "appgw-frontend"
          props:
            public_ip_address:
              id: "/providers/Microsoft.Network/publicIPAddresses/appgw-public-ip"

      frontend_ports:
        - name: "http-port"
          props:
            port: 80

      backend_address_pools:
        - name: "backend-pool"
          props:
            backend_addresses:
              - ip_address: "10.0.1.4"

      backend_http_settings_collection:
        - name: "backend-http-settings"
          props:
            port: 80
            protocol: "Http"
            cookie_based_affinity: "Disabled"
            request_timeout: 30

      http_listeners:
        - name: "http-listener"
          props:
            frontend_ip_configuration:
              id: "ref:public-appgw-v2/frontend_ip_configurations/appgw-frontend"
            frontend_port:
              id: "ref:public-appgw-v2/frontend_ports/http-port"
            protocol: "Http"

      probes:
        - name: "health-probe"
          props:
            protocol: "Http"
            path: "/"
            interval: 30
            timeout: 30
            unhealthy_threshold: 3

      request_routing_rules:
        - name: "basic-routing-rule"
          props:
            rule_type: "Basic"
            http_listener:
              id: "ref:public-appgw-v2/http_listeners/http-listener"
            backend_address_pool:
              id: "ref:public-appgw-v2/backend_address_pools/backend-pool"
            backend_http_settings:
              id: "ref:public-appgw-v2/backend_http_settings_collection/backend-http-settings"

Example plan output

Creating a Standard v2 Application Gateway

Example plan output

Creating a WAF v2 Application Gateway

Example plan output

Last updated