Skip to content

Commit e94fb60

Browse files
Removed securitycenterv2 projectnotificationconfig set_computed_name post_create (#13646) (#9807)
[upstream:bd89d4c4efd2c2d4408632e6d42ba07963c9ba3a] Signed-off-by: Modular Magician <[email protected]>
1 parent 37602ae commit e94fb60

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

google-beta/services/securitycenterv2/resource_scc_v2_project_notification_config.go

-18
Original file line numberDiff line numberDiff line change
@@ -218,24 +218,6 @@ func resourceSecurityCenterV2ProjectNotificationConfigCreate(d *schema.ResourceD
218218
}
219219
d.SetId(id)
220220

221-
// `name` is autogenerated from the api so needs to be set post-create
222-
name, ok := res["name"]
223-
if !ok {
224-
respBody, ok := res["response"]
225-
if !ok {
226-
return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.")
227-
}
228-
229-
name, ok = respBody.(map[string]interface{})["name"]
230-
if !ok {
231-
return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.")
232-
}
233-
}
234-
if err := d.Set("name", name.(string)); err != nil {
235-
return fmt.Errorf("Error setting name: %s", err)
236-
}
237-
d.SetId(name.(string))
238-
239221
log.Printf("[DEBUG] Finished creating ProjectNotificationConfig %q: %#v", d.Id(), res)
240222

241223
return resourceSecurityCenterV2ProjectNotificationConfigRead(d, meta)

0 commit comments

Comments
 (0)