Updated the code so it makes use of the available functionality
The `helper/schema` package already knows how to create a set from a slice with set items. So let’s use that functionality…
This commit is contained in:
parent
43a30e7d13
commit
a7667986f9
|
@ -155,18 +155,7 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro
|
|||
|
||||
found = true
|
||||
|
||||
// Create an empty schema.Set to hold all found records
|
||||
records := &schema.Set{
|
||||
F: func(v interface{}) int {
|
||||
return hashcode.String(v.(string))
|
||||
},
|
||||
}
|
||||
|
||||
for _, rec := range record.Records {
|
||||
records.Add(rec)
|
||||
}
|
||||
|
||||
d.Set("records", records)
|
||||
d.Set("records", record.Records)
|
||||
d.Set("ttl", record.TTL)
|
||||
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue