|
|
|
|
@ -69,7 +69,6 @@ func resourceHerokuApp() *schema.Resource {
|
|
|
|
|
"config_vars": &schema.Schema{
|
|
|
|
|
Type: schema.TypeList,
|
|
|
|
|
Optional: true,
|
|
|
|
|
Computed: true,
|
|
|
|
|
Elem: &schema.Schema{
|
|
|
|
|
Type: schema.TypeMap,
|
|
|
|
|
},
|
|
|
|
|
@ -141,6 +140,19 @@ func resourceHerokuAppRead(d *schema.ResourceData, meta interface{}) error {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Only get the config vars that we care about
|
|
|
|
|
care := make(map[string]struct{})
|
|
|
|
|
for _, v := range d.Get("config_vars").([]interface{}) {
|
|
|
|
|
for k, _ := range v.(map[string]interface{}) {
|
|
|
|
|
care[k] = struct{}{}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for k, _ := range app.Vars {
|
|
|
|
|
if _, ok := care[k]; !ok {
|
|
|
|
|
delete(app.Vars, k)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
d.Set("name", app.App.Name)
|
|
|
|
|
d.Set("stack", app.App.Stack.Name)
|
|
|
|
|
d.Set("region", app.App.Region.Name)
|
|
|
|
|
|