Skip to content

Commit

Permalink
🧹 ensure we use the correct id detectors for instance connect & ssm
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey committed Oct 10, 2023
1 parent 9da2623 commit 8fb9655
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions providers/aws/resources/discovery_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8fb9655

Please sign in to comment.