Skip to content

Commit a878f0c

Browse files
Removed integrations authconfig set_computed_name post_create (#13633) (#22310)
[upstream:3b2d7715848ce6bde0bcca75ccfb862ad9874d72] Signed-off-by: Modular Magician <[email protected]>
1 parent 51b88d4 commit a878f0c

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

google/services/integrations/resource_integrations_auth_config.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -601,24 +601,6 @@ func resourceIntegrationsAuthConfigCreate(d *schema.ResourceData, meta interface
601601
}
602602
d.SetId(id)
603603

604-
// `name` is autogenerated from the api so needs to be set post-create
605-
name, ok := res["name"]
606-
if !ok {
607-
respBody, ok := res["response"]
608-
if !ok {
609-
return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.")
610-
}
611-
612-
name, ok = respBody.(map[string]interface{})["name"]
613-
if !ok {
614-
return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.")
615-
}
616-
}
617-
if err := d.Set("name", name.(string)); err != nil {
618-
return fmt.Errorf("Error setting name: %s", err)
619-
}
620-
d.SetId(name.(string))
621-
622604
log.Printf("[DEBUG] Finished creating AuthConfig %q: %#v", d.Id(), res)
623605

624606
return resourceIntegrationsAuthConfigRead(d, meta)

0 commit comments

Comments
 (0)