From 698e263bee1aa0f1ba4d83927f8aa0ecd52811cf Mon Sep 17 00:00:00 2001 From: Matthew Frahry Date: Mon, 29 Jul 2019 14:31:03 -0700 Subject: [PATCH] Fix crash --- 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)