Skip to content

Commit

Permalink
fixed an issue with cname pool not being read properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nkatarmal-crest committed Sep 29, 2020
1 parent 29b2e8b commit 4e5aefa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions constellix/resource_constellix_cname_record_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ func resourceConstellixCnameRecordPoolImport(d *schema.ResourceData, m interface

mapListRR = append(mapListRR, tpMap)
}

d.Set("values", mapListRR)
log.Printf("[DEBUG] %s finished import", d.Id())
return []*schema.ResourceData{d}, nil
Expand Down Expand Up @@ -301,9 +300,9 @@ func resourceConstellixCnameRecordPoolRead(d *schema.ResourceData, m interface{}
inner := val.(map[string]interface{})
tpMap["value"] = fmt.Sprintf("%v", inner["value"])
tpMap["weight"], _ = strconv.Atoi(fmt.Sprintf("%v", inner["weight"]))
tpMap["disableFlag"] = fmt.Sprintf("%v", inner["disableFlag"])
tpMap["disable_flag"] = fmt.Sprintf("%v", inner["disableFlag"])
tpMap["policy"] = fmt.Sprintf("%v", inner["policy"])
tpMap["checkId"], _ = strconv.Atoi(fmt.Sprintf("%v", inner["checkId"]))
tpMap["check_id"], _ = strconv.Atoi(fmt.Sprintf("%v", inner["checkId"]))

mapListRR = append(mapListRR, tpMap)
}
Expand Down

0 comments on commit 4e5aefa

Please sign in to comment.