providers/heroku: clean up heroku_app config vars
This commit is contained in:
parent
39c4fb2005
commit
bb2edb20fd
|
@ -155,17 +155,21 @@ func resourceHerokuAppRead(d *schema.ResourceData, meta interface{}) error {
|
|||
}
|
||||
}
|
||||
for k, v := range app.Vars {
|
||||
if _, ok := care[k]; !ok {
|
||||
if _, ok := care[k]; ok {
|
||||
configVars[k] = v
|
||||
}
|
||||
}
|
||||
var configVarsValue []map[string]string
|
||||
if len(configVars) > 0 {
|
||||
configVarsValue = []map[string]string{configVars}
|
||||
}
|
||||
|
||||
d.Set("name", app.App.Name)
|
||||
d.Set("stack", app.App.Stack.Name)
|
||||
d.Set("region", app.App.Region.Name)
|
||||
d.Set("git_url", app.App.GitURL)
|
||||
d.Set("web_url", app.App.WebURL)
|
||||
d.Set("config_vars", []map[string]string{configVars})
|
||||
d.Set("config_vars", configVarsValue)
|
||||
d.Set("all_config_vars", app.Vars)
|
||||
|
||||
// We know that the hostname on heroku will be the name+herokuapp.com
|
||||
|
|
Loading…
Reference in New Issue