Skip to content

Commit

Permalink
fixes for regions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdfuller committed Sep 11, 2020
1 parent 807462c commit 120799b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions helpers/aws/regions_china.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
cloudtrail: regions,
cloudwatchlogs: regions,
cloudformation: regions,
comprehend: [],
configservice: regions,
dms: regions,
dynamodb: regions,
Expand Down
1 change: 1 addition & 0 deletions helpers/aws/regions_gov.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
cloudtrail: regions,
cloudwatchlogs: regions,
cloudformation: regions,
comprehend: ['us-gov-west-1'],
configservice: regions,
dms: regions,
dynamodb: regions,
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/autoscaling/asgActiveNotifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var helpers = require('../../../helpers/aws');

module.exports = {
title: 'Auto Scaling Notifications Active',
category: 'Auto Scaling',
category: 'AutoScaling',
description: 'Ensures auto scaling groups have notifications active.',
more_info: 'Notifications can be sent to an SNS endpoint when scaling actions occur, which should be set to ensure all scaling activity is recorded.',
link: 'https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html',
Expand Down
20 changes: 10 additions & 10 deletions plugins/aws/autoscaling/asgMissingELB.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ var async = require('async');
var helpers = require('../../../helpers/aws');

module.exports = {
title: 'AutoScaling Group Missing ELB',
title: 'Auto Scaling Group Missing ELB',
category: 'AutoScaling',
description: 'Ensures all AutoScaling groups are referencing active load balancers.',
more_info: 'Each AutoScaling group with a load balancer configured should reference an active ELB.',
description: 'Ensures all Auto Scaling groups are referencing active load balancers.',
more_info: 'Each Auto Scaling group with a load balancer configured should reference an active ELB.',
link: 'https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html',
recommended_action: 'Ensure that the AutoScaling group load balancer has not been deleted. If so, remove it from the ASG.',
recommended_action: 'Ensure that the Auto Scaling group load balancer has not been deleted. If so, remove it from the ASG.',
apis: ['AutoScaling:describeAutoScalingGroups', 'ELB:describeLoadBalancers', 'ELBv2:describeLoadBalancers'],

run: function(cache, settings, callback) {
Expand All @@ -29,7 +29,7 @@ module.exports = {
if (!autoScalingGroups || !elasticLoadBalancers || !elasticLoadBalancersV2) return rcb();

if (autoScalingGroups.err || !autoScalingGroups.data) {
helpers.addResult(results, 3, 'Unable to query for AutoScaling groups: ' + helpers.addError(autoScalingGroups), region);
helpers.addResult(results, 3, 'Unable to query for Auto Scaling groups: ' + helpers.addError(autoScalingGroups), region);
return rcb();
}

Expand All @@ -44,7 +44,7 @@ module.exports = {
}

if (!autoScalingGroups.data.length) {
helpers.addResult(results, 0, 'No AutoScaling group found', region);
helpers.addResult(results, 0, 'No Auto Scaling group found', region);
return rcb();
}

Expand Down Expand Up @@ -77,22 +77,22 @@ module.exports = {

if (inactiveElbs.length){
helpers.addResult(results, 2,
'AutoScaling group utilizes these inactive load balancers: '+ inactiveElbs.join(', '),
'Auto Scaling group utilizes these inactive load balancers: '+ inactiveElbs.join(', '),
region, resource);
} else {
helpers.addResult(results, 0,
'AutoScaling group: ' + asg.AutoScalingGroupName + ' utilizes active load balancers',
'Auto Scaling group: ' + asg.AutoScalingGroupName + ' utilizes active load balancers',
region, resource);
}
}
else {
helpers.addResult(results, 2,
'AutoScaling group does not have any Load Balancer associated', region, resource);
'Auto Scaling group does not have any Load Balancer associated', region, resource);
}
}
else {
helpers.addResult(results, 0,
'AutoScaling group does not utilize a load balancer', region, resource);
'Auto Scaling group does not utilize a load balancer', region, resource);
}

});
Expand Down

0 comments on commit 120799b

Please sign in to comment.