Skip to content

Commit

Permalink
Added comments as per review comment
Browse files Browse the repository at this point in the history
1) Added inline comment
2) Edited error string
  • Loading branch information
niharika-98 authored Nov 1, 2023
1 parent c723b42 commit dd1e92a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func flattenBackupDRManagementServerResourceResp(v interface{}, d *schema.Resour
fmt.Printf("Interface is : %s", v)
l := v.([]interface{})
for _, raw := range l {
// Management server is a singleton resource. It is only present in one location per project. Hence returning first resource present.
return flattenBackupDRManagementServerResource(raw, d, config)
}
return nil
Expand Down Expand Up @@ -75,7 +76,7 @@ func dataSourceGoogleCloudBackupDRServiceRead(d *schema.ResourceData, meta inter
UserAgent: userAgent,
})
if err != nil {
return fmt.Errorf("Error constructing id: %s", err)
return fmt.Errorf("Error reading ManagementServer: %s", err)
}
resourceResponse := flattenBackupDRManagementServerResourceResp(res["managementServers"], d, config)
if err := d.Set("project", project); err != nil {
Expand All @@ -101,4 +102,4 @@ func dataSourceGoogleCloudBackupDRServiceRead(d *schema.ResourceData, meta inter
d.Set("name", name)
return nil
}
<% end -%>
<% end -%>

0 comments on commit dd1e92a

Please sign in to comment.