Skip to content

Commit 45c0823

Browse files
update error message for instanceAlreadyExists (#4979) (#9591)
Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 8a16fc4 commit 45c0823

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.changelog/4979.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
sql: fixed bug where the provider would retry on an error if the database instance name couldn't be reused.
3+
```

google/error_retry_predicates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func isSqlInternalError(err error) (bool, string) {
182182
// concurrent operations.
183183
func isSqlOperationInProgressError(err error) (bool, string) {
184184
if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 409 {
185-
if strings.Contains(gerr.Body, "you cannot reuse the name of the deleted instance until one week from the deletion date.") {
185+
if strings.Contains(gerr.Body, "instanceAlreadyExists") {
186186
return false, ""
187187
}
188188

0 commit comments

Comments
 (0)