ApplicationGateway

class ApplicationGateway : KotlinCustomResource

Manages an Application Gateway.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.PublicIp;
import com.pulumi.azure.network.PublicIpArgs;
import com.pulumi.azure.network.ApplicationGateway;
import com.pulumi.azure.network.ApplicationGatewayArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewaySkuArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayGatewayIpConfigurationArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayFrontendPortArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayFrontendIpConfigurationArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayBackendAddressPoolArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayBackendHttpSettingArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayHttpListenerArgs;
import com.pulumi.azure.network.inputs.ApplicationGatewayRequestRoutingRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.addressSpaces("10.254.0.0/16")
.build());
var frontend = new Subnet("frontend", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.254.0.0/24")
.build());
var backend = new Subnet("backend", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.254.2.0/24")
.build());
var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.allocationMethod("Dynamic")
.build());
final var backendAddressPoolName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-beap", name));
final var frontendPortName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-feport", name));
final var frontendIpConfigurationName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-feip", name));
final var httpSettingName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-be-htst", name));
final var listenerName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-httplstn", name));
final var requestRoutingRuleName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-rqrt", name));
final var redirectConfigurationName = exampleVirtualNetwork.name().applyValue(name -> String.format("%s-rdrcfg", name));
var network = new ApplicationGateway("network", ApplicationGatewayArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku(ApplicationGatewaySkuArgs.builder()
.name("Standard_v2")
.tier("Standard_v2")
.capacity(2)
.build())
.gatewayIpConfigurations(ApplicationGatewayGatewayIpConfigurationArgs.builder()
.name("my-gateway-ip-configuration")
.subnetId(frontend.id())
.build())
.frontendPorts(ApplicationGatewayFrontendPortArgs.builder()
.name(frontendPortName)
.port(80)
.build())
.frontendIpConfigurations(ApplicationGatewayFrontendIpConfigurationArgs.builder()
.name(frontendIpConfigurationName)
.publicIpAddressId(examplePublicIp.id())
.build())
.backendAddressPools(ApplicationGatewayBackendAddressPoolArgs.builder()
.name(backendAddressPoolName)
.build())
.backendHttpSettings(ApplicationGatewayBackendHttpSettingArgs.builder()
.name(httpSettingName)
.cookieBasedAffinity("Disabled")
.path("/path1/")
.port(80)
.protocol("Http")
.requestTimeout(60)
.build())
.httpListeners(ApplicationGatewayHttpListenerArgs.builder()
.name(listenerName)
.frontendIpConfigurationName(frontendIpConfigurationName)
.frontendPortName(frontendPortName)
.protocol("Http")
.build())
.requestRoutingRules(ApplicationGatewayRequestRoutingRuleArgs.builder()
.name(requestRoutingRuleName)
.priority(9)
.ruleType("Basic")
.httpListenerName(listenerName)
.backendAddressPoolName(backendAddressPoolName)
.backendHttpSettingsName(httpSettingName)
.build())
.build());
}
}

Import

Application Gateway's can be imported using the resource id, e.g.

$ pulumi import azure:network/applicationGateway:ApplicationGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/applicationGateways/myGateway1

Properties

Link copied to clipboard

One or more authentication_certificate blocks as defined below.

Link copied to clipboard

An autoscale_configuration block as defined below.

Link copied to clipboard

One or more backend_address_pool blocks as defined below.

Link copied to clipboard

One or more backend_http_settings blocks as defined below.

Link copied to clipboard

One or more custom_error_configuration blocks as defined below.

Link copied to clipboard
val enableHttp2: Output<Boolean>?

Is HTTP2 enabled on the application gateway resource? Defaults to false.

Link copied to clipboard
val fipsEnabled: Output<Boolean>?

Is FIPS enabled on the Application Gateway?

Link copied to clipboard
val firewallPolicyId: Output<String>?

The ID of the Web Application Firewall Policy.

Link copied to clipboard

Is the Firewall Policy associated with the Application Gateway?

Link copied to clipboard

One or more frontend_ip_configuration blocks as defined below.

Link copied to clipboard

One or more frontend_port blocks as defined below.

Link copied to clipboard

One or more gateway_ip_configuration blocks as defined below.

Link copied to clipboard

A global block as defined below.

Link copied to clipboard

One or more http_listener blocks as defined below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

An identity block as defined below.

Link copied to clipboard
val location: Output<String>

The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>

The name of the Application Gateway. Changing this forces a new resource to be created.

Link copied to clipboard

A list of private_endpoint_connection blocks as defined below.

Link copied to clipboard

One or more private_link_configuration blocks as defined below.

Link copied to clipboard

One or more probe blocks as defined below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

One or more redirect_configuration blocks as defined below.

Link copied to clipboard

One or more request_routing_rule blocks as defined below.

Link copied to clipboard

The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created.

Link copied to clipboard

One or more rewrite_rule_set blocks as defined below. Only valid for v2 SKUs.

Link copied to clipboard

A sku block as defined below.

Link copied to clipboard

One or more ssl_certificate blocks as defined below.

Link copied to clipboard

a ssl_policy block as defined below.

Link copied to clipboard

One or more ssl_profile blocks as defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A mapping of tags to assign to the resource.

Link copied to clipboard

One or more trusted_client_certificate blocks as defined below.

Link copied to clipboard

One or more trusted_root_certificate blocks as defined below.

Link copied to clipboard

One or more url_path_map blocks as defined below.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

A waf_configuration block as defined below.

Link copied to clipboard
val zones: Output<List<String>>?

Specifies a list of Availability Zones in which this Application Gateway should be located. Changing this forces a new Application Gateway to be created.