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