From 6aa11e57e534b0a6468a53740157e0a936690f62 Mon Sep 17 00:00:00 2001 From: stack72 Date: Mon, 21 Mar 2016 19:40:00 +0000 Subject: [PATCH] provider/azurerm: Fix a potential panic in the `azurerm_template_deployment` resource --- builtin/providers/azurerm/resource_arm_template_deployment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/azurerm/resource_arm_template_deployment.go b/builtin/providers/azurerm/resource_arm_template_deployment.go index 2655702974..fe425af624 100644 --- a/builtin/providers/azurerm/resource_arm_template_deployment.go +++ b/builtin/providers/azurerm/resource_arm_template_deployment.go @@ -143,9 +143,8 @@ func resourceArmTemplateDeploymentRead(d *schema.ResourceData, meta interface{}) } var outputs map[string]string if resp.Properties.Outputs != nil && len(*resp.Properties.Outputs) > 0 { + outputs = make(map[string]string) for key, output := range *resp.Properties.Outputs { - log.Printf("[INFO] Found Key %s", key) - outputMap := output.(map[string]interface{}) outputValue, ok := outputMap["value"] if !ok { @@ -156,6 +155,7 @@ func resourceArmTemplateDeploymentRead(d *schema.ResourceData, meta interface{}) outputs[key] = outputValue.(string) } } + d.Set("outputs", outputs) return nil