providers/heroku: import heroku_addon resource (#14508)

This commit is contained in:
cmorent 2017-05-24 21:19:46 +02:00 committed by Clint
parent c5bf7a7c60
commit e676813eaa
1 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,10 @@ func resourceHerokuAddon() *schema.Resource {
Update: resourceHerokuAddonUpdate,
Delete: resourceHerokuAddonDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
"app": {
Type: schema.TypeString,
@ -111,8 +115,7 @@ func resourceHerokuAddonCreate(d *schema.ResourceData, meta interface{}) error {
func resourceHerokuAddonRead(d *schema.ResourceData, meta interface{}) error {
client := meta.(*heroku.Service)
addon, err := resourceHerokuAddonRetrieveByApp(
d.Get("app").(string), d.Id(), client)
addon, err := resourceHerokuAddonRetrieve(d.Id(), client)
if err != nil {
return err
}