Skip to content

Commit

Permalink
fixed error in ds (#5127) (#9898)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Aug 24, 2021
1 parent 4b5300c commit 29b6ea9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/5127.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
Cloud DNS: fixed not-exists error message on data source `google_dns_managed_zone`
```
2 changes: 1 addition & 1 deletion google/data_source_dns_managed_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func dataSourceDnsManagedZoneRead(d *schema.ResourceData, meta interface{}) erro
zone, err := config.NewDnsClient(userAgent).ManagedZones.Get(
project, name).Do()
if err != nil {
return err
return handleNotFoundError(err, d, fmt.Sprintf("dataSourceDnsManagedZone %q", name))
}

if err := d.Set("name_servers", zone.NameServers); err != nil {
Expand Down

0 comments on commit 29b6ea9

Please sign in to comment.