Skip to content

Commit

Permalink
Add reading hostname to google_compute_instance data source (Google…
Browse files Browse the repository at this point in the history
  • Loading branch information
karolgorc authored Sep 24, 2024
1 parent 3026798 commit 627a436
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func dataSourceGoogleComputeInstanceRead(d *schema.ResourceData, meta interface{
if err := d.Set("machine_type", tpgresource.GetResourceNameFromSelfLink(instance.MachineType)); err != nil {
return fmt.Errorf("Error setting machine_type: %s", err)
}
if err := d.Set("hostname", instance.Hostname); err != nil {
return fmt.Errorf("Error setting hostname: %s", err)
}

// Set the networks
// Use the first external IP found for the default connection info.
Expand Down

0 comments on commit 627a436

Please sign in to comment.