Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry committed Oct 28, 2019
1 parent 944ebbe commit f51339d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions azurerm/data_source_client_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ func dataSourceArmClientConfigRead(d *schema.ResourceData, meta interface{}) err
d.Set("object_id", "")

// TODO remove this when we confirm that MSI no longer returns nil with getAuthenticatedObjectID
objectId := ""
if client.getAuthenticatedObjectID != nil {
if v, err := client.getAuthenticatedObjectID(ctx); err != nil {
v, err := client.getAuthenticatedObjectID(ctx)
if err != nil {
return fmt.Errorf("Error getting authenticated object ID: %v", err)
} else {
d.Set("object_id", v)
}
objectId = v
}
d.Set("object_id", objectId)

return nil
}

0 comments on commit f51339d

Please sign in to comment.