From b389391f181708b9c9ae78a6d2b67c7bd821931b Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Mon, 5 Mar 2018 13:38:20 -0700 Subject: [PATCH] `azurerm_application_gateway` - fixes a crash where ssl_policy is nil for existing resources Fixes #933 --- azurerm/resource_arm_application_gateway.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azurerm/resource_arm_application_gateway.go b/azurerm/resource_arm_application_gateway.go index d123852d39b5..6905c98478eb 100644 --- a/azurerm/resource_arm_application_gateway.go +++ b/azurerm/resource_arm_application_gateway.go @@ -1359,9 +1359,11 @@ func flattenApplicationGatewayWafConfig(waf *network.ApplicationGatewayWebApplic func flattenApplicationGatewaySslPolicy(policy *network.ApplicationGatewaySslPolicy) []interface{} { result := make([]interface{}, 0) - if protocols := policy.DisabledSslProtocols; protocols != nil { - for _, proto := range *protocols { - result = append(result, string(proto)) + if pol := policy; policy != nil { + if protocols := pol.DisabledSslProtocols; protocols != nil { + for _, proto := range *protocols { + result = append(result, string(proto)) + } } }