Skip to content

Commit

Permalink
azurerm_hdinsight_hadoop_cluster: Fix edge node related acc tests (#…
Browse files Browse the repository at this point in the history
…23971)

* azurerm_hdinsight_hadoop_cluster: Fix edge node related acc tests

* Fix test case by set value from config

* remove unused line
  • Loading branch information
jiaweitao001 authored Dec 5, 2023
1 parent 930fbfa commit 12ea051
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 12ea051

Please sign in to comment.