{ "location": "{{ agw.location }}", "properties": { "sku": { "capacity": "{{ agw.sku.capacity | default(2) }}", "name": "{{ agw.sku.name | default('Standard_v2') }}", "tier": "{{ agw.sku.tier | default('Standard_v2') }}" }, "gatewayIPConfigurations": [ {% for gwipc in agw.gateway_ip_configurations %} { "name": "{{ gwipc.name }}", "properties": { "subnet": { "id": "{{ gwipc.subnet }}" } } }, {% endfor %} ], "sslCertificates": [], "frontendIPConfigurations": [ {% for fipc in agw.frontend_ip_configurations %} { "name": "{{ fipc.name }}", "properties": { "privateIPAllocationMethod": "{{ fipc.private_ip_allocation_method | default('Dynamic') }}", "publicIPAddress": { "id": "{{ fipc.public_ip_address }}" }, {% if fipc.subnet is defined %} "subnet": { "id": "{{ fipc.subnet }}" } {% endif %} } }, {% endfor %} ], "frontendPorts": [ {% for fport in agw.frontend_ports %} { "name": "{{ fport.name }}", "properties": { "port": {{ fport.port }}, } }, {% endfor %} ], "backendAddressPools": [ {% for bp in agw.backend_address_pools %} { "name": "{{ bp.name }}", "properties": { "backendAddresses": [ {% for ip in bp.backend_addresses %} { "ipAddress": "{{ ip }}" }, {% endfor %} ], }, }, {% endfor %} ], "backendHttpSettingsCollection": [ {% for bset in agw.backend_http_settings_collection %} { "name": "{{ bset.name }}", "properties": { "port": {{ bset.port }}, "protocol": "{{ bset.protocol | default('Http') }}", "cookieBasedAffinity": "{{ bset.cookie_based_affinity | default('Enabled') }}", "pickHostNameFromBackendAddress": {{ bset.pick_host_name_from_backend_address | default(false) }}, "probeEnabled": {{ bset.probe_enabled | default(false) }}, {% if bset.probe_enabled is defined and bset.probe_enabled %} "probe": { "id": "{{ bset.probe }}" }, {% endif %} "affinityCookieName": "{{ bset.affinity_cookie_name | default('ApplicationGatewayAffinity') }}", "requestTimeout": {{ bset.request_timeout | default(20) }}, }, }, {% endfor %} ], "httpListeners": [ {% for listener in agw.http_listeners %} { "name": "{{ listener.name }}", "properties": { "frontendIPConfiguration": { "id": "/subscriptions/{{ subscription_id }}/resourceGroups/{{ agw.resource_group }}/providers/Microsoft.Network/applicationGateways/{{ agw.name }}/frontendIPConfigurations/{{ listener.frontend_ip_configuration }}" }, "frontendPort": { "id": "/subscriptions/{{ subscription_id }}/resourceGroups/{{ agw.resource_group }}/providers/Microsoft.Network/applicationGateways/{{ agw.name }}/frontendPorts/{{ listener.frontend_port }}" }, "protocol": "{{ listener.protocol | default('Http') }}", "requireServerNameIndication": {{ listener.require_sni | default(false) }}, {% if listener.protocol is defined and listener.protocol == 'Https' %} "sslCertificate": {{ listener.sslCertificate }}, "sslProfile": {{ listener.sslProfile }}, {% endif %} }, }, {% endfor %} ], "urlPathMaps": [], "requestRoutingRules": [ {% for rrr in agw.request_routing_rules %} { "name": "{{ rrr.name }}", "properties": { "ruleType": "{{ rrr.rule_type | default('Basic') }}", "httpListener": { "id": "/subscriptions/{{ subscription_id }}/resourceGroups/{{ agw.resource_group }}/providers/Microsoft.Network/applicationGateways/{{ agw.name }}/httpListeners/{{ rrr.http_listener }}" }, "backendAddressPool": { "id": "/subscriptions/{{ subscription_id }}/resourceGroups/{{ agw.resource_group }}/providers/Microsoft.Network/applicationGateways/{{ agw.name }}/backendAddressPools/{{ rrr.backend_address_pool }}" }, "backendHttpSettings": { "id": "/subscriptions/{{ subscription_id }}/resourceGroups/{{ agw.resource_group }}/providers/Microsoft.Network/applicationGateways/{{ agw.name }}/backendHttpSettingsCollection/{{ rrr.backend_http_settings }}" } }, }, {% endfor %} ], "probes": [], "redirectConfigurations": [], "enableHttp2": false } }