Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimise diffs
Browse files Browse the repository at this point in the history
simon-anz authored and lyricnz committed Jan 25, 2024
1 parent c336790 commit 7e4076a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ec2.ts
Original file line number Diff line number Diff line change
@@ -189,6 +189,8 @@ class Ec2Driver extends DriverInterface {
logger.debug('EC2 module collecting account: %j', this.accountConfig.name);

const ec2 = await getAwsClientForAccount(EC2Client, this.accountConfig);
const autoscaling = await getAwsClientForAccount(AutoScalingClient, this.accountConfig);

const allEc2Iinstances = (await paginateAwsCall(paginateDescribeInstances, ec2, 'Reservations')).flatMap(
(xr) => xr.Instances,
);
@@ -200,7 +202,6 @@ class Ec2Driver extends DriverInterface {
return true;
});

const autoscaling = await getAwsClientForAccount(AutoScalingClient, this.accountConfig);
const autoscalingGroups = await paginateAwsCall(paginateDescribeAutoScalingGroups, autoscaling, 'AutoScalingGroups');

for (const xi of ec2Instances) {

0 comments on commit 7e4076a

Please sign in to comment.