From 28875f49cdd50ab976b4432dd278a678c1e9c14f Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Thu, 7 May 2015 09:11:31 -0500 Subject: [PATCH] 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. --- builtin/providers/heroku/resource_heroku_addon.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builtin/providers/heroku/resource_heroku_addon.go b/builtin/providers/heroku/resource_heroku_addon.go index 96f4fa1bd..3555fbea4 100644 --- a/builtin/providers/heroku/resource_heroku_addon.go +++ b/builtin/providers/heroku/resource_heroku_addon.go @@ -51,7 +51,9 @@ func resourceHerokuAddon() *schema.Resource { "config_vars": &schema.Schema{ Type: schema.TypeList, 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("plan", plan) 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 }