Skip to content

Commit

Permalink
🐛 fix platform name detection for cloud instances (#2104)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Oct 5, 2023
1 parent 762f1b4 commit d741028
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions providers/os/provider/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ func (s *Service) detect(asset *inventory.Asset, conn shared.Connection) error {
log.Debug().Msg("run cloud platform detector")
if id, name, related := aws.Detect(conn, asset.Platform); id != "" {
asset.PlatformIds = append(asset.PlatformIds, id)
asset.Platform.Name = name
asset.Name = name
asset.RelatedAssets = append(asset.RelatedAssets, relatedIds2assets(related)...)
}

if id, name, related := azure.Detect(conn, asset.Platform); id != "" {
asset.PlatformIds = append(asset.PlatformIds, id)
asset.Platform.Name = name
asset.Name = name
asset.RelatedAssets = append(asset.RelatedAssets, relatedIds2assets(related)...)
}

if id, name, related := gcp.Detect(conn, asset.Platform); id != "" {
asset.PlatformIds = append(asset.PlatformIds, id)
asset.Platform.Name = name
asset.Name = name
asset.RelatedAssets = append(asset.RelatedAssets, relatedIds2assets(related)...)
}
}
Expand Down

0 comments on commit d741028

Please sign in to comment.