Skip to content

Commit

Permalink
πŸƒπŸ»β€β™‚οΈ faster aws connect and discovery (#3222)
Browse files Browse the repository at this point in the history
  • Loading branch information
imilchev authored Feb 15, 2024
1 parent 6ee9670 commit 5de6687
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions providers/aws/resources/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ func Discover(runtime *plugin.Runtime, filters connection.DiscoveryFilters) (*in
Assets: []*inventory.Asset{},
}}

if (conn.Conf == nil || len(conn.Conf.Discover.Targets) == 0) && conn.Asset() != nil {
in.Spec.Assets = append(in.Spec.Assets, conn.Asset())
return in, nil
}

res, err := NewResource(runtime, "aws.account", map[string]*llx.RawData{"id": llx.StringData("aws.account/" + conn.AccountId())})
if err != nil {
return nil, err
Expand Down

0 comments on commit 5de6687

Please sign in to comment.