-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
454b51e
commit d791082
Showing
5 changed files
with
58 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package aws | ||
|
||
import ( | ||
awsgo "github.com/aws/aws-sdk-go/aws" | ||
"github.com/aws/aws-sdk-go/aws/session" | ||
"github.com/gruntwork-io/gruntwork-cli/errors" | ||
) | ||
|
||
// EKSClusters - Represents all EKS clusters found in a region | ||
type EKSClusters struct { | ||
Clusters []string | ||
} | ||
|
||
// ResourceName - The simple name of the aws resource | ||
func (clusters EKSClusters) ResourceName() string { | ||
return "ekscluster" | ||
} | ||
|
||
// ResourceIdentifiers - The Name of the collected EKS clusters | ||
func (clusters EKSClusters) ResourceIdentifiers() []string { | ||
return clusters.Clusters | ||
} | ||
|
||
func (clusters EKSClusters) MaxBatchSize() int { | ||
return 200 | ||
} | ||
|
||
// Nuke - nuke all EKS Cluster resources | ||
func (clusters EKSClusters) Nuke(awsSession *session.Session, identifiers []string) error { | ||
if err := nukeAllEksClusters(awsSession, awsgo.StringSlice(identifiers)); err != nil { | ||
return errors.WithStackTrace(err) | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters