@@ -317,14 +317,13 @@ func resourceGkeHubFeatureMembershipCreate(d *schema.ResourceData, meta interfac
317317 }
318318 client := NewDCLGkeHubClient (config , userAgent , billingProject )
319319 res , err := client .ApplyFeatureMembership (context .Background (), obj , createDirective ... )
320- if err != nil {
321- if _ , ok := err .(dcl.DiffAfterApplyError ); ok {
322- log .Printf ("[DEBUG] Diff after apply returned from the DCL: %s" , err )
323- } else {
324- // The resource didn't actually create
325- d .SetId ("" )
326- return fmt .Errorf ("Error creating FeatureMembership: %s" , err )
327- }
320+
321+ if _ , ok := err .(dcl.DiffAfterApplyError ); ok {
322+ log .Printf ("[DEBUG] Diff after apply returned from the DCL: %s" , err )
323+ } else if err != nil {
324+ // The resource didn't actually create
325+ d .SetId ("" )
326+ return fmt .Errorf ("Error creating FeatureMembership: %s" , err )
328327 }
329328
330329 log .Printf ("[DEBUG] Finished creating FeatureMembership %q: %#v" , d .Id (), res )
@@ -415,14 +414,13 @@ func resourceGkeHubFeatureMembershipUpdate(d *schema.ResourceData, meta interfac
415414 }
416415 client := NewDCLGkeHubClient (config , userAgent , billingProject )
417416 res , err := client .ApplyFeatureMembership (context .Background (), obj , directive ... )
418- if err != nil {
419- if _ , ok := err .(dcl.DiffAfterApplyError ); ok {
420- log .Printf ("[DEBUG] Diff after apply returned from the DCL: %s" , err )
421- } else {
422- // The resource didn't actually create
423- d .SetId ("" )
424- return fmt .Errorf ("Error updating FeatureMembership: %s" , err )
425- }
417+
418+ if _ , ok := err .(dcl.DiffAfterApplyError ); ok {
419+ log .Printf ("[DEBUG] Diff after apply returned from the DCL: %s" , err )
420+ } else if err != nil {
421+ // The resource didn't actually create
422+ d .SetId ("" )
423+ return fmt .Errorf ("Error updating FeatureMembership: %s" , err )
426424 }
427425
428426 log .Printf ("[DEBUG] Finished creating FeatureMembership %q: %#v" , d .Id (), res )
0 commit comments