Skip to content

Commit

Permalink
handle notfound error for runtime config (#3731) (#6753)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jul 7, 2020
1 parent 2c61867 commit 403f58a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/3731.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
runtimeconfig: fixed `Requested entity was not found.` error when config was deleted outside of terraform.
```
2 changes: 1 addition & 1 deletion google/resource_runtimeconfig_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func resourceRuntimeconfigConfigRead(d *schema.ResourceData, meta interface{}) e
fullName := d.Id()
runConfig, err := config.clientRuntimeconfig.Projects.Configs.Get(fullName).Do()
if err != nil {
return err
return handleNotFoundError(err, d, fmt.Sprintf("RuntimeConfig %q", d.Id()))
}

project, name, err := resourceRuntimeconfigParseFullName(runConfig.Name)
Expand Down

0 comments on commit 403f58a

Please sign in to comment.