Skip to content

Commit

Permalink
Fix EC2 keypair nil pointer issue (gruntwork-io#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 authored Aug 11, 2023
1 parent 3ed748b commit 0b8d463
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,10 @@ func GetAllResources(targetRegions []string, excludeAfter time.Time, resourceTyp
// End EC2 VPCS

// Start EC2 KeyPairs
KeyPairs := EC2KeyPairs{}
KeyPairs := EC2KeyPairs{
Client: ec2.New(cloudNukeSession),
Region: region,
}
if IsNukeable(KeyPairs.ResourceName(), resourceTypes) {
start := time.Now()
keyPairIds, err := KeyPairs.getAll(configObj)
Expand Down

0 comments on commit 0b8d463

Please sign in to comment.