From 9f20fc77226927dd6b4925eb55f3fc9b60ae5b55 Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Mon, 19 Nov 2018 11:53:36 +0000 Subject: [PATCH] Ensuing the parameters are a string prior to flattening (#2348) Fixes #2342 --- azurerm/data_source_logic_app_workflow.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/azurerm/data_source_logic_app_workflow.go b/azurerm/data_source_logic_app_workflow.go index 9ccc0d4a5790..e5fff8f414b8 100644 --- a/azurerm/data_source_logic_app_workflow.go +++ b/azurerm/data_source_logic_app_workflow.go @@ -2,6 +2,7 @@ package azurerm import ( "fmt" + "log" "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic" "github.com/hashicorp/terraform/helper/schema" @@ -95,7 +96,13 @@ func flattenLogicAppDataSourceWorkflowParameters(input map[string]*logic.Workflo for k, v := range input { if v != nil { - output[k] = v.Value.(string) + // we only support string parameters at this time + val, ok := v.Value.(string) + if !ok { + log.Printf("[DEBUG] Skipping parameter %q since it's not a string", k) + } + + output[k] = val } }