From 8fb965585a47074751e118eaa0cc703d33778188 Mon Sep 17 00:00:00 2001 From: Victoria Jeffrey Date: Tue, 10 Oct 2023 17:17:52 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20ensure=20we=20use=20the=20correc?= =?UTF-8?q?t=20id=20detectors=20for=20instance=20connect=20&=20ssm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/aws/resources/discovery_conversion.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/providers/aws/resources/discovery_conversion.go b/providers/aws/resources/discovery_conversion.go index 1a9c61fca6..f1ba8cbb76 100644 --- a/providers/aws/resources/discovery_conversion.go +++ b/providers/aws/resources/discovery_conversion.go @@ -636,7 +636,7 @@ func SSMConnectAsset(args []string, opts map[string]string) *inventory.Asset { } asset := &inventory.Asset{} opts["instance"] = id - asset.IdDetector = []string{ids.IdDetector_CloudDetect} + asset.IdDetector = []string{ids.IdDetector_Hostname, ids.IdDetector_CloudDetect, ids.IdDetector_SshHostkey} asset.Connections = []*inventory.Config{{ Type: "ssh", Host: id, @@ -664,7 +664,7 @@ func InstanceConnectAsset(args []string, opts map[string]string) *inventory.Asse } } asset := &inventory.Asset{} - asset.IdDetector = []string{ids.IdDetector_CloudDetect} + asset.IdDetector = []string{ids.IdDetector_Hostname, ids.IdDetector_CloudDetect, ids.IdDetector_SshHostkey} opts["instance"] = id asset.Connections = []*inventory.Config{{ Type: "ssh", @@ -705,7 +705,7 @@ func EbsConnectAsset(args []string, opts map[string]string) *inventory.Asset { opts["type"] = targetType opts["id"] = target asset.Name = target - asset.IdDetector = []string{ids.IdDetector_Hostname} + asset.IdDetector = []string{ids.IdDetector_Hostname} // do not use cloud detect or host key here asset.Connections = []*inventory.Config{{ Type: string(awsec2ebsconn.EBSConnectionType), Host: target,