@@ -93,15 +93,12 @@ func resourceDatabaseReadRetry(ctx context.Context, d *schema.ResourceData, meta
9393 http .StatusNotFound : func (ctx context.Context , d * schema.ResourceData , meta interface {}) error {
9494 tflog .Debug (ctx , "database not found, removing from state" ,
9595 map [string ]interface {}{
96- "project_id " : d . Get ( "project_id" ),
97- "branch_id " : d .Get ("branch_id " ),
98- "database_id " : d . Id ( ),
96+ "id " : d . Id ( ),
97+ "project_id " : d .Get ("project_id " ),
98+ "branch_id " : d . Get ( "branch_id" ),
9999 })
100100 d .SetId ("" )
101- tflog .Debug (ctx , "recreating database" , map [string ]interface {}{
102- "project_id" : d .Get ("project_id" ), "branch_id" : d .Get ("branch_id" ),
103- })
104- return resourceDatabaseCreate (ctx , d , meta )
101+ return nil
105102 }})
106103}
107104
@@ -152,9 +149,11 @@ func resourceDatabaseUpdate(ctx context.Context, d *schema.ResourceData, meta in
152149func resourceDatabaseDeleteRetry (ctx context.Context , d * schema.ResourceData , meta interface {}) diag.Diagnostics {
153150 return projectReadiness .RetryWithFallback (resourceDatabaseDelete , ctx , d , meta , map [int ]FallbackFn {
154151 http .StatusNotFound : func (ctx context.Context , d * schema.ResourceData , meta interface {}) error {
152+ d .SetId ("" )
155153 return nil
156154 },
157155 http .StatusUnprocessableEntity : func (ctx context.Context , d * schema.ResourceData , meta interface {}) error {
156+ d .SetId ("" )
158157 return nil
159158 },
160159 })
0 commit comments