Skip to content

Commit

Permalink
🧹 fix aws connection
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey committed Feb 17, 2024
1 parent 9e04a16 commit dc1fabe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions providers/aws/resources/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ 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
2 changes: 1 addition & 1 deletion providers/aws/resources/discovery_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func accountAsset(conn *connection.AwsConnection, awsAccount *mqlAwsAccount) *in
PlatformIds: []string{id},
Name: name,
Platform: connection.GetPlatformForObject(""),
Connections: []*inventory.Config{conn.Conf},
Connections: []*inventory.Config{conn.Conf.Clone(inventory.WithoutDiscovery(), inventory.WithParentConnectionId(conn.Conf.Id))},
Options: conn.ConnectionOptions(),
}
}
Expand Down

0 comments on commit dc1fabe

Please sign in to comment.