diff --git a/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go b/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go index f92bb72194de..40fe20549004 100644 --- a/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go +++ b/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go @@ -462,7 +462,7 @@ func resourceHDInsightHadoopClusterRead(d *pluginsdk.ResourceData, meta interfac } if edgeNodeProps := edgeNode.Properties; edgeNodeProps != nil { - flattenedRoles = flattenHDInsightEdgeNode(flattenedRoles, edgeNodeProps) + flattenedRoles = flattenHDInsightEdgeNode(flattenedRoles, edgeNodeProps, d) } if props.DiskEncryptionProperties != nil { @@ -512,7 +512,7 @@ func resourceHDInsightHadoopClusterRead(d *pluginsdk.ResourceData, meta interfac return tags.FlattenAndSet(d, resp.Tags) } -func flattenHDInsightEdgeNode(roles []interface{}, props *hdinsight.ApplicationProperties) []interface{} { +func flattenHDInsightEdgeNode(roles []interface{}, props *hdinsight.ApplicationProperties, d *pluginsdk.ResourceData) []interface{} { if len(roles) == 0 || props == nil { return roles } @@ -545,7 +545,7 @@ func flattenHDInsightEdgeNode(roles []interface{}, props *hdinsight.ApplicationP for _, action := range *installScriptActions { actions["name"] = action.Name actions["uri"] = action.URI - actions["parameters"] = action.Parameters + actions["parameters"] = d.Get("roles.0.edge_node.0.install_script_action.0.parameters").(string) } }