Skip to content

Commit

Permalink
Rename cloudetc to jckuester after move of repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jckuester committed Jun 8, 2020
1 parent 489baec commit 17f4638
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 69 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<p align="center">
<img alt="AWSweeper" src="https://github.com/cloudetc/awsweeper/blob/master/img/logo.png" height="150" />
<img alt="AWSweeper" src="https://github.com/jckuester/awsweeper/blob/master/img/logo.png" height="150" />
<h3 align="center">AWSweeper</h3>
<p align="center">A tool for cleaning your AWS account</p>
</p>

---
[![Release](https://img.shields.io/github/release/cloudetc/awsweeper.svg?style=for-the-badge)](https://github.com/cloudetc/awsweeper/releases/latest)
[![Release](https://img.shields.io/github/release/jckuester/awsweeper.svg?style=for-the-badge)](https://github.com/jckuester/awsweeper/releases/latest)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge)](/LICENSE.md)
[![Travis](https://img.shields.io/travis/cloudetc/awsweeper/master.svg?style=for-the-badge)](https://travis-ci.org/cloudetc/awsweeper)
[![Travis](https://img.shields.io/travis/jckuester/awsweeper/master.svg?style=for-the-badge)](https://travis-ci.org/jckuester/awsweeper)

AWSweeper is able to clean out [over 200 resource types](#supported-resources) in your AWS account. Resources to be deleted
can be filtered by their type, ID, tags, or creation date using [regular expressions](https://golang.org/pkg/regexp/syntax/)
Expand Down Expand Up @@ -39,13 +39,13 @@ Happy erasing!
## Installation

It's recommended to install a specific version of AWSweeper available on the
[releases page](https://github.com/cloudetc/awsweeper/releases).
[releases page](https://github.com/jckuester/awsweeper/releases).

Here is the recommended way to install AWSweeper v0.9.0:

```bash
# install it into ./bin/
curl -sSfL https://raw.githubusercontent.com/cloudetc/awsweeper/master/install.sh | sh -s v0.9.0
curl -sSfL https://raw.githubusercontent.com/jckuester/awsweeper/master/install.sh | sh -s v0.9.0
```

## Usage
Expand Down Expand Up @@ -455,7 +455,7 @@ which have to be used in the YAML file to filter resources by their type.
## Acceptance tests

***IMPORTANT:*** Acceptance tests create real resources that might cost you money. Also, note that if you contribute a PR,
the [Travis build](https://travis-ci.org/github/cloudetc/awsweeper) will always fail since AWS credentials are not
the [Travis build](https://travis-ci.org/github/jckuester/awsweeper) will always fail since AWS credentials are not
injected into the PR build coming from forks for security reasons. You can either run tests locally against your personal
AWS account or ask me to run them for you instead.

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/cloudetc/awsweeper
module github.com/jckuester/awsweeper

go 1.13

Expand All @@ -8,7 +8,6 @@ require (
github.com/fatih/color v1.9.0
github.com/golang/mock v1.4.0
github.com/gruntwork-io/terratest v0.24.2
github.com/hashicorp/terraform v0.12.24
github.com/jckuester/awsls v0.0.0-20200524112109-93c2a4665746
github.com/jckuester/terradozer v0.0.0-20200523195146-e66de6fa55f3
github.com/onsi/gomega v1.9.0
Expand Down
12 changes: 0 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aws/aws-sdk-go v1.29.1/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg=
github.com/aws/aws-sdk-go v1.30.5 h1:i+sSesaMrSxiUt3NJddOApe2mXK+VNBgfcmRTvNFrXM=
github.com/aws/aws-sdk-go v1.30.5/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go-v2 v0.20.0 h1:/yefUjgMrda9PNFwWctBU63nL10CJMdBwkAmaQ4w4Hs=
github.com/aws/aws-sdk-go-v2 v0.20.0/go.mod h1:2LhT7UgHOXK3UXONKI5OMgIyoQL6zTAw/jwIeX6yqzw=
github.com/aws/aws-sdk-go-v2 v0.22.0 h1:mlixfS5HVzn7Sf3KVhjAIM2H3bB7uoTbLCtKHvteUfE=
github.com/aws/aws-sdk-go-v2 v0.22.0/go.mod h1:2LhT7UgHOXK3UXONKI5OMgIyoQL6zTAw/jwIeX6yqzw=
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
Expand Down Expand Up @@ -347,18 +345,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jckuester/awsls v0.0.0-20200516153042-96ea638daeb5 h1:V8YuMycWi094/mWHmVIqbcFVH7L5o8LrgJgAi56yIA8=
github.com/jckuester/awsls v0.0.0-20200516153042-96ea638daeb5/go.mod h1:6dqF/j6Ar6b10DmHSV0CRYgKP2jwN8VUsHoFT3szFfA=
github.com/jckuester/awsls v0.0.0-20200523105025-fe25c60a9fba h1:fbk5OV5nnwtkElugQcUTur/B0M4NceHTp4Mr0qAbJvA=
github.com/jckuester/awsls v0.0.0-20200523105025-fe25c60a9fba/go.mod h1:6dqF/j6Ar6b10DmHSV0CRYgKP2jwN8VUsHoFT3szFfA=
github.com/jckuester/awsls v0.0.0-20200523195606-04f54b8ca1c6 h1:Rbcyj5lTyRRE4QgkJVncOgLbn6ehT6Yp5SdjCprr6FA=
github.com/jckuester/awsls v0.0.0-20200523195606-04f54b8ca1c6/go.mod h1:hbj1nD8zXLBoZffzkV7WXUmMGarGPKkFeke90U9eehs=
github.com/jckuester/awsls v0.0.0-20200524112109-93c2a4665746 h1:CCO3Lc/ofOzEwH5WIZpndhoixKwNQRNVPKczVT4IS9w=
github.com/jckuester/awsls v0.0.0-20200524112109-93c2a4665746/go.mod h1:hbj1nD8zXLBoZffzkV7WXUmMGarGPKkFeke90U9eehs=
github.com/jckuester/terradozer v0.0.0-20200505071321-36ef87ab4394 h1:7LmuH4Cm81Qsi0trqbnOmZ75xemFDhmzin0OoNL7aM4=
github.com/jckuester/terradozer v0.0.0-20200505071321-36ef87ab4394/go.mod h1:KYrRcPbIiXgcRp7hG9fOBdAyvDnUx2aA9cjTqvKa4cI=
github.com/jckuester/terradozer v0.0.0-20200522202131-ed33ac929141 h1:BowqT+JEJsqjPRWcTH7EOEEJuJlhKoh80MKZouM3pkE=
github.com/jckuester/terradozer v0.0.0-20200522202131-ed33ac929141/go.mod h1:fc32wbKuGQHf17dmggX1O51swhUUEr344xb173I6mSA=
github.com/jckuester/terradozer v0.0.0-20200523195146-e66de6fa55f3 h1:uba9ja+voKyereVEuM7YI6kDQO0W1890W+Y5MBWutI8=
github.com/jckuester/terradozer v0.0.0-20200523195146-e66de6fa55f3/go.mod h1:KYrRcPbIiXgcRp7hG9fOBdAyvDnUx2aA9cjTqvKa4cI=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
Expand Down
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/sh
set -e
# Code generated by godownloader on 2020-03-06T15:58:36Z. DO NOT EDIT.
# Code generated by godownloader on 2020-06-08T07:08:51Z. DO NOT EDIT.
#

usage() {
this=$1
cat <<EOF
$this: download go binaries for cloudetc/awsweeper
$this: download go binaries for jckuester/awsweeper
Usage: $this [-b] bindir [-d] [tag]
-b sets bindir or installation directory, Defaults to ./bin
-d turns on debug logging
[tag] is a tag from
https://github.com/cloudetc/awsweeper/releases
https://github.com/jckuester/awsweeper/releases
If tag is missing, then the latest will be used.
Generated by godownloader
Expand Down Expand Up @@ -343,7 +343,7 @@ End of functions from https://github.com/client9/shlib
EOF

PROJECT_NAME="awsweeper"
OWNER=cloudetc
OWNER=jckuester
REPO="awsweeper"
BINARY=awsweeper
FORMAT=tar.gz
Expand Down
2 changes: 1 addition & 1 deletion internal/confirm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/cloudetc/awsweeper/internal"
"github.com/jckuester/awsweeper/internal"
"github.com/stretchr/testify/assert"
)

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

"github.com/cloudetc/awsweeper/internal"
"github.com/jckuester/awsweeper/internal"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"github.com/apex/log/handlers/cli"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/cloudetc/awsweeper/internal"
"github.com/cloudetc/awsweeper/pkg/resource"
"github.com/fatih/color"
awsls "github.com/jckuester/awsls/aws"
"github.com/jckuester/awsweeper/internal"
"github.com/jckuester/awsweeper/pkg/resource"
"github.com/jckuester/terradozer/pkg/provider"
terradozerRes "github.com/jckuester/terradozer/pkg/resource"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/aws/aws-sdk-go/aws"

"github.com/cloudetc/awsweeper/pkg/resource"
"github.com/jckuester/awsweeper/pkg/resource"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/aws/aws-sdk-go/service/ec2"

"github.com/aws/aws-sdk-go/service/autoscaling"
"github.com/cloudetc/awsweeper/pkg/resource"
"github.com/jckuester/awsweeper/pkg/resource"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/select_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/cloudetc/awsweeper/pkg/resource"
awsls "github.com/jckuester/awsls/aws"
"github.com/jckuester/awsweeper/pkg/resource"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/resource/supported_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/autoscaling"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/cloudetc/awsweeper/pkg/resource"
"github.com/cloudetc/awsweeper/pkg/resource/mocks"
"github.com/golang/mock/gomock"
"github.com/jckuester/awsweeper/pkg/resource"
"github.com/jckuester/awsweeper/pkg/resource/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
7 changes: 2 additions & 5 deletions test/cloudtrail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ import (
"testing"

"github.com/aws/aws-sdk-go/service/cloudtrail"

"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

res "github.com/cloudetc/awsweeper/pkg/resource"
)

func TestAcc_CloudTrail_DeleteByID(t *testing.T) {
Expand All @@ -32,7 +29,7 @@ func TestAcc_CloudTrail_DeleteByID(t *testing.T) {
id := terraform.Output(t, terraformOptions, "id")
assertCloudTrailExists(t, env, id)

writeConfigID(t, terraformDir, res.CloudTrail, id)
writeConfigID(t, terraformDir, "aws_cloudtrail", id)
defer os.Remove(terraformDir + "/config.yml")

logBuffer, err := runBinary(t, terraformDir, "YES\n")
Expand Down Expand Up @@ -61,7 +58,7 @@ func TestAcc_CloudTrail_DeleteByTag(t *testing.T) {
id := terraform.Output(t, terraformOptions, "id")
assertCloudTrailExists(t, env, id)

writeConfigTag(t, terraformDir, res.CloudTrail)
writeConfigTag(t, terraformDir, "aws_cloudtrail")
defer os.Remove(terraformDir + "/config.yml")

logBuffer, err := runBinary(t, terraformDir, "YES\n")
Expand Down
10 changes: 4 additions & 6 deletions test/ebs_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import (
"os"
"testing"

"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/ec2"
res "github.com/cloudetc/awsweeper/pkg/resource"
)

func TestAcc_EbsSnapshot_DeleteByID(t *testing.T) {
Expand All @@ -32,7 +30,7 @@ func TestAcc_EbsSnapshot_DeleteByID(t *testing.T) {
id := terraform.Output(t, terraformOptions, "id")
assertEbsSnapshotExists(t, env, id)

writeConfigID(t, terraformDir, res.EbsSnapshot, id)
writeConfigID(t, terraformDir, "aws_ebs_snapshot", id)
defer os.Remove(terraformDir + "/config.yml")

logBuffer, err := runBinary(t, terraformDir, "YES\n", "-debug")
Expand Down Expand Up @@ -61,7 +59,7 @@ func TestAcc_EbsSnapshot_DeleteByTag(t *testing.T) {
id := terraform.Output(t, terraformOptions, "id")
assertEbsSnapshotExists(t, env, id)

writeConfigTag(t, terraformDir, res.EbsSnapshot)
writeConfigTag(t, terraformDir, "aws_ebs_snapshot")
defer os.Remove(terraformDir + "/config.yml")

logBuffer, err := runBinary(t, terraformDir, "YES\n")
Expand Down
27 changes: 2 additions & 25 deletions test/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,19 @@ import (
"os/exec"
"strings"
"testing"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
res "github.com/cloudetc/awsweeper/pkg/resource"
"github.com/gruntwork-io/terratest/modules/random"
"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/hashicorp/terraform/helper/resource"
res "github.com/jckuester/awsweeper/pkg/resource"
"github.com/onsi/gomega/gexec"
"github.com/stretchr/testify/require"
)

const (
packagePath = "github.com/cloudetc/awsweeper"
packagePath = "github.com/jckuester/awsweeper"
testTfStateBucket = "awsweeper-testacc-tfstate-492043"

NoSuchEntity = "NoSuchEntity"
NoSuchHostedZone = "NoSuchHostedZone"
)

// EnvVars contains environment variables for tests.
Expand Down Expand Up @@ -131,20 +125,3 @@ func getTerraformOptions(terraformDir string, env EnvVars) *terraform.Options {
},
}
}

func retryOnAwsCode(code string, f func() (interface{}, error)) (interface{}, error) {
var resp interface{}
err := resource.Retry(1*time.Minute, func() *resource.RetryError {
var err error
resp, err = f()
if err != nil {
awsErr, ok := err.(awserr.Error)
if ok && awsErr.Code() == code {
return resource.RetryableError(err)
}
return resource.NonRetryableError(err)
}
return nil
})
return resp, err
}

0 comments on commit 17f4638

Please sign in to comment.