From adf846ee7e25bd99f353b5d972ddd427726a4b97 Mon Sep 17 00:00:00 2001 From: Jordan Caussat Date: Tue, 13 Mar 2018 17:08:45 +0100 Subject: [PATCH] TER-235: Use eveMetadta.ID as ID instead of the name --- ghost/resource_ghost_app.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ghost/resource_ghost_app.go b/ghost/resource_ghost_app.go index 39f2032..dc753af 100644 --- a/ghost/resource_ghost_app.go +++ b/ghost/resource_ghost_app.go @@ -416,9 +416,6 @@ func resourceGhostApp() *schema.Resource { func resourceGhostAppCreate(d *schema.ResourceData, meta interface{}) error { client := meta.(*ghost.Client) - name := d.Get("name").(string) - d.SetId(name) - log.Printf("[INFO] Creating Ghost app %s", d.Get("name").(string)) app := expandGhostApp(d) @@ -429,6 +426,8 @@ func resourceGhostAppCreate(d *schema.ResourceData, meta interface{}) error { log.Fatalf("[ERROR] error: %v", err) } + d.SetId(eveMetadata.ID) + return nil }