Skip to content

Commit

Permalink
Merge pull request #198 from ekristen/housekeeping
Browse files Browse the repository at this point in the history
chore: housekeeping - addressing a few issues
  • Loading branch information
ekristen authored Jun 21, 2024
2 parents e05a250 + 0ed4478 commit 56ee21a
Show file tree
Hide file tree
Showing 488 changed files with 542 additions and 535 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ builds:
goarch: arm
- goos: darwin
goarch: arm
flags:
- -trimpath
ldflags:
- -s
- -w
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
[![release](https://img.shields.io/github/release/ekristen/aws-nuke.svg)](https://github.com/ekristen/aws-nuke/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/ekristen/aws-nuke)](https://goreportcard.com/report/github.com/ekristen/aws-nuke)
[![Maintainability](https://api.codeclimate.com/v1/badges/bf05fb12c69f1ea7f257/maintainability)](https://codeclimate.com/github/ekristen/aws-nuke/maintainability)
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/ekristen/aws-nuke/total)
![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads/ekristen/aws-nuke/latest/total)



## Overview

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ekristen/aws-nuke
module github.com/ekristen/aws-nuke/v3

go 1.21.6

Expand Down
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"

"github.com/ekristen/aws-nuke/pkg/common"
"github.com/ekristen/aws-nuke/v3/pkg/common"

_ "github.com/ekristen/aws-nuke/pkg/commands/account"
_ "github.com/ekristen/aws-nuke/pkg/commands/config"
_ "github.com/ekristen/aws-nuke/pkg/commands/list"
_ "github.com/ekristen/aws-nuke/pkg/commands/nuke"
_ "github.com/ekristen/aws-nuke/v3/pkg/commands/account"
_ "github.com/ekristen/aws-nuke/v3/pkg/commands/config"
_ "github.com/ekristen/aws-nuke/v3/pkg/commands/list"
_ "github.com/ekristen/aws-nuke/v3/pkg/commands/nuke"

_ "github.com/ekristen/aws-nuke/resources"
_ "github.com/ekristen/aws-nuke/v3/resources"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/awsutil/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/aws/aws-sdk-go/service/iam"
"github.com/aws/aws-sdk-go/service/sts"

"github.com/ekristen/aws-nuke/pkg/config"
"github.com/ekristen/aws-nuke/v3/pkg/config"
)

type Account struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/awsutil/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3control"

"github.com/ekristen/aws-nuke/pkg/config"
"github.com/ekristen/aws-nuke/v3/pkg/config"
liberrors "github.com/ekristen/libnuke/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/awsutil/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/ekristen/aws-nuke/pkg/awsutil"
"github.com/ekristen/aws-nuke/v3/pkg/awsutil"
)

func TestSecretRegex(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions pkg/commands/account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
libconfig "github.com/ekristen/libnuke/pkg/config"
"github.com/ekristen/libnuke/pkg/registry"

"github.com/ekristen/aws-nuke/pkg/awsutil"
"github.com/ekristen/aws-nuke/pkg/commands/global"
"github.com/ekristen/aws-nuke/pkg/commands/nuke"
"github.com/ekristen/aws-nuke/pkg/common"
"github.com/ekristen/aws-nuke/pkg/config"
"github.com/ekristen/aws-nuke/v3/pkg/awsutil"
"github.com/ekristen/aws-nuke/v3/pkg/commands/global"
"github.com/ekristen/aws-nuke/v3/pkg/commands/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/common"
"github.com/ekristen/aws-nuke/v3/pkg/config"
)

func execute(c *cli.Context) error {
Expand Down
10 changes: 5 additions & 5 deletions pkg/commands/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"github.com/ekristen/libnuke/pkg/registry"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/awsutil"
"github.com/ekristen/aws-nuke/pkg/commands/global"
"github.com/ekristen/aws-nuke/pkg/commands/nuke"
"github.com/ekristen/aws-nuke/pkg/common"
"github.com/ekristen/aws-nuke/pkg/config"
"github.com/ekristen/aws-nuke/v3/pkg/awsutil"
"github.com/ekristen/aws-nuke/v3/pkg/commands/global"
"github.com/ekristen/aws-nuke/v3/pkg/commands/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/common"
"github.com/ekristen/aws-nuke/v3/pkg/config"
)

func execute(c *cli.Context) error { //nolint:funlen,gocyclo
Expand Down
6 changes: 3 additions & 3 deletions pkg/commands/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"github.com/fatih/color"
"github.com/urfave/cli/v2"

"github.com/ekristen/aws-nuke/pkg/commands/global"
"github.com/ekristen/aws-nuke/pkg/common"
"github.com/ekristen/aws-nuke/v3/pkg/commands/global"
"github.com/ekristen/aws-nuke/v3/pkg/common"

_ "github.com/ekristen/aws-nuke/resources"
_ "github.com/ekristen/aws-nuke/v3/resources"
"github.com/ekristen/libnuke/pkg/registry"
)

Expand Down
11 changes: 6 additions & 5 deletions pkg/commands/nuke/nuke.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"github.com/ekristen/libnuke/pkg/scanner"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/awsutil"
"github.com/ekristen/aws-nuke/pkg/commands/global"
"github.com/ekristen/aws-nuke/pkg/common"
"github.com/ekristen/aws-nuke/pkg/config"
"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/awsutil"
"github.com/ekristen/aws-nuke/v3/pkg/commands/global"
"github.com/ekristen/aws-nuke/v3/pkg/common"
"github.com/ekristen/aws-nuke/v3/pkg/config"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

// ConfigureCreds is a helper function to configure the awsutil.Credentials object from the cli.Context
Expand Down Expand Up @@ -113,6 +113,7 @@ func execute(c *cli.Context) error { //nolint:funlen,gocyclo
n := libnuke.New(params, filters, parsedConfig.Settings)

n.SetRunSleep(5 * time.Second)
n.SetLogger(logrus.WithField("component", "libnuke"))
n.RegisterVersion(fmt.Sprintf("> %s", common.AppVersion.String()))

// Register our custom validate handler that validates the account and AWS nuke unique alias checks
Expand Down
2 changes: 1 addition & 1 deletion pkg/nuke/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
libnuke "github.com/ekristen/libnuke/pkg/nuke"
"github.com/ekristen/libnuke/pkg/utils"

"github.com/ekristen/aws-nuke/pkg/awsutil"
"github.com/ekristen/aws-nuke/v3/pkg/awsutil"
)

// Prompt struct provides a way to provide a custom prompt to the libnuke library this allows
Expand Down
2 changes: 1 addition & 1 deletion resources/accessanalyzer-analyzers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const AccessAnalyzerResource = "AccessAnalyzer"
Expand Down
2 changes: 1 addition & 1 deletion resources/accessanalyzer-archiverules.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const AccessAnalyzerArchiveRuleResource = "ArchiveRule"
Expand Down
2 changes: 1 addition & 1 deletion resources/acm-certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const ACMCertificateResource = "ACMCertificate"
Expand Down
2 changes: 1 addition & 1 deletion resources/acmpca-certificateauthorities.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const ACMPCACertificateAuthorityResource = "ACMPCACertificateAuthority"
Expand Down
2 changes: 1 addition & 1 deletion resources/acmpca-certificateauthoritystates.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const ACMPCACertificateAuthorityStateResource = "ACMPCACertificateAuthorityState"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigateway-apikeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/registry"
"github.com/ekristen/libnuke/pkg/resource"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayAPIKeyResource = "APIGatewayAPIKey"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigateway-clientcertificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/registry"
"github.com/ekristen/libnuke/pkg/resource"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayClientCertificateResource = "APIGatewayClientCertificate"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigateway-domainnames.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/registry"
"github.com/ekristen/libnuke/pkg/resource"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayDomainNameResource = "APIGatewayDomainName"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigateway-restapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayRestAPIResource = "APIGatewayRestAPI"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigateway-usageplans.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayUsagePlanResource = "APIGatewayUsagePlan"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigateway-vpclinks.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayVpcLinkResource = "APIGatewayVpcLink"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigatewayv2-apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayV2APIResource = "APIGatewayV2API"
Expand Down
2 changes: 1 addition & 1 deletion resources/apigatewayv2-vpc-links.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const APIGatewayV2VpcLinkResource = "APIGatewayV2VpcLink"
Expand Down
2 changes: 1 addition & 1 deletion resources/appconfig-applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppConfigApplication struct {
Expand Down
2 changes: 1 addition & 1 deletion resources/appconfig-configurationprofiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppConfigConfigurationProfile struct {
Expand Down
2 changes: 1 addition & 1 deletion resources/appconfig-deploymentstrategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppConfigDeploymentStrategy struct {
Expand Down
2 changes: 1 addition & 1 deletion resources/appconfig-environments.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppConfigEnvironment struct {
Expand Down
2 changes: 1 addition & 1 deletion resources/appconfig-hostedconfigurationversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppConfigHostedConfigurationVersion struct {
Expand Down
2 changes: 1 addition & 1 deletion resources/applicationautoscaling-scalable-targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const ApplicationAutoScalingScalableTargetResource = "ApplicationAutoScalingScalableTarget"
Expand Down
2 changes: 1 addition & 1 deletion resources/appmesh-gatewayroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const AppMeshGatewayRouteResource = "AppMeshGatewayRoute"
Expand Down
2 changes: 1 addition & 1 deletion resources/appmesh-mesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const AppMeshMeshResource = "AppMeshMesh"
Expand Down
2 changes: 1 addition & 1 deletion resources/appmesh-route.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const AppMeshRouteResource = "AppMeshRoute"
Expand Down
2 changes: 1 addition & 1 deletion resources/appmesh-virtualgateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const AppMeshVirtualGatewayResource = "AppMeshVirtualGateway"
Expand Down
2 changes: 1 addition & 1 deletion resources/appmesh-virtualnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

const AppMeshVirtualNodeResource = "AppMeshVirtualNode"
Expand Down
2 changes: 1 addition & 1 deletion resources/appmesh-virtualrouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppMeshVirtualRouter struct {
Expand Down
2 changes: 1 addition & 1 deletion resources/appmesh-virtualservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppMeshVirtualService struct {
Expand Down
2 changes: 1 addition & 1 deletion resources/apprunner-connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ekristen/libnuke/pkg/resource"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/aws-nuke/pkg/nuke"
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
)

type AppRunnerConnection struct {
Expand Down
Loading

0 comments on commit 56ee21a

Please sign in to comment.