From 7de18b746b6752a624ce9a87a063172636e14e69 Mon Sep 17 00:00:00 2001 From: Matthew Frahry Date: Mon, 29 Jul 2019 15:44:10 -0700 Subject: [PATCH] Fix crash (#3966) --- azurerm/resource_arm_application_gateway.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/resource_arm_application_gateway.go b/azurerm/resource_arm_application_gateway.go index 785236a2125d..bd46a0ce068d 100644 --- a/azurerm/resource_arm_application_gateway.go +++ b/azurerm/resource_arm_application_gateway.go @@ -1714,7 +1714,7 @@ func flattenApplicationGatewayAuthenticationCertificates(input *[]network.Applic // since the certificate data isn't returned we have to load it from the same index if existing, ok := d.GetOk("authentication_certificate"); ok && existing != nil { existingVals := existing.([]interface{}) - if len(existingVals) >= i { + if len(existingVals) > i { existingCerts := existingVals[i].(map[string]interface{}) if data := existingCerts["data"]; data != nil { output["data"] = data.(string)