Skip to content

Commit

Permalink
Fix Spanner Instance force_delete backup bug
Browse files Browse the repository at this point in the history
Previously `userAgent` and `billingProjectId` were swapped causing the
project to be incorrect when `force_delete` is enabled and backups exist
in the Spanner instance.
  • Loading branch information
Noremac201 committed Jan 22, 2025
1 parent 03f6620 commit 68c4f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmv1/templates/terraform/pre_delete/spanner_instance.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if d.Get("force_destroy").(bool) {
return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("SpannerInstance %q", d.Id()))
}

err = deleteSpannerBackups(d, config, resp, billingProject, userAgent)
err = deleteSpannerBackups(d, config, resp, userAgent, billingProject)
if err != nil {
return err
}
}
}

0 comments on commit 68c4f03

Please sign in to comment.