Skip to content

Commit f1c2580

Browse files
Removed unnecessary check for name in spanner database post_create (#13695) (#22388)
[upstream:07c000c081f1502692168134ffdacf2860592814] Signed-off-by: Modular Magician <[email protected]>
1 parent 9a7d28b commit f1c2580

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

google/services/spanner/resource_spanner_database.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,8 @@ func resourceSpannerDatabaseCreate(d *schema.ResourceData, meta interface{}) err
360360
// statements at the time of database creation. To avoid users needing to run
361361
// `terraform apply` twice to get their desired outcome, the provider does not set
362362
// `extraStatements` in the call to the `create` endpoint and all DDL (other than
363-
// <CREATE DATABASE>) is run post-create, by calling the `updateDdl` endpoint
364-
365-
_, ok := opRes["name"]
366-
if !ok {
367-
return fmt.Errorf("Create response didn't contain critical fields. Create may not have succeeded.")
368-
}
369-
363+
//
364+
// <CREATE DATABASE>) is run post-create, by calling the `updateDdl` endpoint
370365
retention, retentionPeriodOk := d.GetOk("version_retention_period")
371366
retentionPeriod := retention.(string)
372367
ddl, ddlOk := d.GetOk("ddl")

0 commit comments

Comments
 (0)