Skip to content

Commit ec5e6ac

Browse files
Merge pull request #935 from terraform-providers/app-gateway-crash
`azurerm_application_gateway` - fixes a crash where ssl_policy is nil when importing
2 parents 3359ff5 + b389391 commit ec5e6ac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

azurerm/resource_arm_application_gateway.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -1359,9 +1359,11 @@ func flattenApplicationGatewayWafConfig(waf *network.ApplicationGatewayWebApplic
13591359
func flattenApplicationGatewaySslPolicy(policy *network.ApplicationGatewaySslPolicy) []interface{} {
13601360
result := make([]interface{}, 0)
13611361

1362-
if protocols := policy.DisabledSslProtocols; protocols != nil {
1363-
for _, proto := range *protocols {
1364-
result = append(result, string(proto))
1362+
if pol := policy; policy != nil {
1363+
if protocols := pol.DisabledSslProtocols; protocols != nil {
1364+
for _, proto := range *protocols {
1365+
result = append(result, string(proto))
1366+
}
13651367
}
13661368
}
13671369

0 commit comments

Comments
 (0)