provider/heroku: fix config_vars in addons

These were never read properly - on Addons they show up as just a list
of var names, not a Map.

Fixes one issue in Addon acceptance tests.
This commit is contained in:
Paul Hinze 2015-05-07 09:11:31 -05:00
parent e7b101dba4
commit 28875f49cd
1 changed files with 6 additions and 2 deletions

View File

@ -51,7 +51,9 @@ func resourceHerokuAddon() *schema.Resource {
"config_vars": &schema.Schema{ "config_vars": &schema.Schema{
Type: schema.TypeList, Type: schema.TypeList,
Computed: true, Computed: true,
Elem: &schema.Schema{Type: schema.TypeMap}, Elem: &schema.Schema{
Type: schema.TypeString,
},
}, },
}, },
} }
@ -114,7 +116,9 @@ func resourceHerokuAddonRead(d *schema.ResourceData, meta interface{}) error {
d.Set("name", addon.Name) d.Set("name", addon.Name)
d.Set("plan", plan) d.Set("plan", plan)
d.Set("provider_id", addon.ProviderID) d.Set("provider_id", addon.ProviderID)
d.Set("config_vars", []interface{}{addon.ConfigVars}) if err := d.Set("config_vars", addon.ConfigVars); err != nil {
return err
}
return nil return nil
} }