From ecb300f1948af28b3522bcd5a9c098eef7747d41 Mon Sep 17 00:00:00 2001
From: snowhork <stayheresilence@gmail.com>
Date: Fri, 8 Jan 2021 06:48:02 +0900
Subject: [PATCH] ec_extension: set empty id when delete succeed

---
 ec/ecresource/extensionresource/delete.go      | 1 +
 ec/ecresource/extensionresource/delete_test.go | 1 +
 2 files changed, 2 insertions(+)

diff --git a/ec/ecresource/extensionresource/delete.go b/ec/ecresource/extensionresource/delete.go
index 1c2d4aabb..c51b7a2c0 100644
--- a/ec/ecresource/extensionresource/delete.go
+++ b/ec/ecresource/extensionresource/delete.go
@@ -39,6 +39,7 @@ func deleteResource(_ context.Context, d *schema.ResourceData, meta interface{})
 		return diag.FromErr(err)
 	}
 
+	d.SetId("")
 	return nil
 }
 
diff --git a/ec/ecresource/extensionresource/delete_test.go b/ec/ecresource/extensionresource/delete_test.go
index 8e4f09a96..b8f2af718 100644
--- a/ec/ecresource/extensionresource/delete_test.go
+++ b/ec/ecresource/extensionresource/delete_test.go
@@ -41,6 +41,7 @@ func Test_deleteResource(t *testing.T) {
 		State:  newExtension(),
 		Schema: newSchema(),
 	})
+	wantTC200.SetId("")
 
 	tc500Err := util.NewResourceData(t, util.ResDataParams{
 		ID:     "12345678",