Merge pull request #1006 from smp-labs/proper_heroku_config_vars_type

providers/heroku: heroku returns config_vars for addon as string array.
This commit is contained in:
Mitchell Hashimoto 2015-02-23 13:59:10 -08:00
commit 9599861350
1 changed files with 6 additions and 1 deletions

View File

@ -114,7 +114,12 @@ func resourceHerokuAddonRead(d *schema.ResourceData, meta interface{}) error {
d.Set("name", addon.Name)
d.Set("plan", plan)
d.Set("provider_id", addon.ProviderID)
d.Set("config_vars", []interface{}{addon.ConfigVars})
configVarsMap := make(map[string]interface{})
for i := range addon.ConfigVars {
configVarsMap[addon.ConfigVars[i]] = addon.ConfigVars[i]
}
d.Set("config_vars", []interface{}{configVarsMap})
return nil
}