diff --git a/providers/os/id/ids/ids.go b/providers/os/id/ids/ids.go index 3970942ba5..94f14597c1 100644 --- a/providers/os/id/ids/ids.go +++ b/providers/os/id/ids/ids.go @@ -10,10 +10,5 @@ const ( IdDetector_SshHostkey = "ssh-host-key" IdDetector_AwsEcs = "aws-ecs" - // FIXME: DEPRECATED, remove in v9.0 vv - // this is now cloud-detect - IdDetector_AwsEc2 = "aws-ec2" - // ^^ - // IdDetector_PlatformID = "transport-platform-id" // TODO: how does this work? ) diff --git a/providers/os/provider/detector.go b/providers/os/provider/detector.go index 7465953be5..6b46907efe 100644 --- a/providers/os/provider/detector.go +++ b/providers/os/provider/detector.go @@ -64,7 +64,7 @@ func (s *Service) detect(asset *inventory.Asset, conn shared.Connection) error { } } - if hasDetector(detectors, ids.IdDetector_CloudDetect, ids.IdDetector_AwsEc2) { + if hasDetector(detectors, ids.IdDetector_CloudDetect) { if id, name, related := aws.Detect(conn, asset.Platform); id != "" { asset.PlatformIds = append(asset.PlatformIds, id) asset.Platform.Name = name diff --git a/providers/os/provider/platform.go b/providers/os/provider/platform.go index 893ac5f337..86344b2114 100644 --- a/providers/os/provider/platform.go +++ b/providers/os/provider/platform.go @@ -147,23 +147,6 @@ func GatherPlatformInfo(conn shared.Connection, pf *inventory.Platform, idDetect }, hostErr } return &PlatformInfo{}, nil - case idDetector == ids.IdDetector_AwsEc2: - metadata, err := awsec2.Resolve(conn, pf) - if err != nil { - return nil, err - } - ident, err := metadata.Identify() - if err != nil { - return nil, err - } - if ident.InstanceID != "" { - return &PlatformInfo{ - IDs: []string{ident.InstanceID}, - Name: ident.InstanceName, - RelatedPlatformIDs: []string{ident.AccountID}, - }, nil - } - return &PlatformInfo{}, nil case idDetector == ids.IdDetector_AwsEcs: metadata, err := awsecs.Resolve(conn, pf) if err != nil {