@@ -50,7 +50,8 @@ function Test-ApplicationGatewayCRUD
50
50
$rule02Name = Get-ResourceName
51
51
$nic01Name = Get-ResourceName
52
52
$nic02Name = Get-ResourceName
53
- $authCertName = Get-ResourceName
53
+ $authCertName = Get-ResourceName
54
+ $probeHttpsName = Get-ResourceName
54
55
55
56
try
56
57
{
@@ -71,7 +72,7 @@ function Test-ApplicationGatewayCRUD
71
72
72
73
# create 2 nics to add to backend
73
74
$nic01 = New-AzureRmNetworkInterface - Name $nic01Name - ResourceGroupName $rgname - Location $location - Subnet $nicSubnet
74
- $nic02 = New-AzureRmNetworkInterface - Name $nic02Name - ResourceGroupName $rgname - Location $location - Subnet $nicSubnet
75
+ $nic02 = New-AzureRmNetworkInterface - Name $nic02Name - ResourceGroupName $rgname - Location $location - Subnet $nicSubnet
75
76
76
77
# Create application gateway configuration
77
78
$gipconfig = New-AzureRmApplicationGatewayIPConfiguration - Name $gipconfigname - Subnet $gwSubnet
@@ -88,8 +89,9 @@ function Test-ApplicationGatewayCRUD
88
89
89
90
$authCertFilePath = $basedir + " \ScenarioTests\Data\ApplicationGatewayAuthCert.cer"
90
91
$authcert01 = New-AzureRmApplicationGatewayAuthenticationCertificate - Name $authCertName - CertificateFile $authCertFilePath
92
+ $probeHttps = New-AzureRmApplicationGatewayProbeConfig - Name $probeHttpsName - Protocol Https - HostName " probe.com" - Path " /path/path.htm" - Interval 89 - Timeout 88 - UnhealthyThreshold 8
91
93
$poolSetting01 = New-AzureRmApplicationGatewayBackendHttpSettings - Name $poolSetting01Name - Port 80 - Protocol Http - CookieBasedAffinity Disabled
92
- $poolSetting02 = New-AzureRmApplicationGatewayBackendHttpSettings - Name $poolSetting02Name - Port 443 - Protocol Https - CookieBasedAffinity Enabled - AuthenticationCertificates $authcert01
94
+ $poolSetting02 = New-AzureRmApplicationGatewayBackendHttpSettings - Name $poolSetting02Name - Port 443 - Protocol Https - Probe $probeHttps - CookieBasedAffinity Enabled - AuthenticationCertificates $authcert01
93
95
94
96
$listener01 = New-AzureRmApplicationGatewayHttpListener - Name $listener01Name - Protocol Http - FrontendIPConfiguration $fipconfig01 - FrontendPort $fp01
95
97
$listener02 = New-AzureRmApplicationGatewayHttpListener - Name $listener02Name - Protocol Http - FrontendIPConfiguration $fipconfig02 - FrontendPort $fp02
@@ -104,7 +106,7 @@ function Test-ApplicationGatewayCRUD
104
106
$firewallConfig = New-AzureRmApplicationGatewayWebApplicationFirewallConfiguration - Enabled $true - FirewallMode Prevention
105
107
106
108
# Create Application Gateway
107
- $appgw = New-AzureRmApplicationGateway - Name $appgwName - ResourceGroupName $rgname - Location $location - BackendAddressPools $pool , $nicPool - BackendHttpSettingsCollection $poolSetting01 , $poolSetting02 - FrontendIpConfigurations $fipconfig01 , $fipconfig02 - GatewayIpConfigurations $gipconfig - FrontendPorts $fp01 , $fp02 - HttpListeners $listener01 , $listener02 - RequestRoutingRules $rule01 , $rule02 - Sku $sku - SslPolicy $sslPolicy - AuthenticationCertificates $authcert01 - WebApplicationFirewallConfiguration $firewallConfig
109
+ $appgw = New-AzureRmApplicationGateway - Name $appgwName - ResourceGroupName $rgname - Location $location - Probes $probeHttps - BackendAddressPools $pool , $nicPool - BackendHttpSettingsCollection $poolSetting01 , $poolSetting02 - FrontendIpConfigurations $fipconfig01 , $fipconfig02 - GatewayIpConfigurations $gipconfig - FrontendPorts $fp01 , $fp02 - HttpListeners $listener01 , $listener02 - RequestRoutingRules $rule01 , $rule02 - Sku $sku - SslPolicy $sslPolicy - AuthenticationCertificates $authcert01 - WebApplicationFirewallConfiguration $firewallConfig
108
110
109
111
# Get Application Gateway
110
112
$getgw = Get-AzureRmApplicationGateway - Name $appgwName - ResourceGroupName $rgname
0 commit comments