providers/heroku: import heroku_addon resource (#14508)
This commit is contained in:
parent
c5bf7a7c60
commit
e676813eaa
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue