Skip to content

Commit

Permalink
azurerm_hdinsight_kafka_cluster no longer panics from an empty compon…
Browse files Browse the repository at this point in the history
…ent_version (hashicorp#12261)

Co-authored-by: Xiaochuan Gong <[email protected]>
  • Loading branch information
2 people authored and yupwei68 committed Jul 26, 2021
1 parent e3a8f7e commit 90c898b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ func resourceHDInsightKafkaClusterRead(d *pluginsdk.ResourceData, meta interface
}

func expandHDInsightKafkaComponentVersion(input []interface{}) map[string]*string {
if len(input) == 0 || input[0] == nil {
return map[string]*string{"kafka": utils.String("")}
}
vs := input[0].(map[string]interface{})
return map[string]*string{
"kafka": utils.String(vs["kafka"].(string)),
Expand Down

0 comments on commit 90c898b

Please sign in to comment.