-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
6 changed files
with
152 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: goreleaser | ||
on: | ||
push: | ||
branches: | ||
- "!*" | ||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
build: | ||
name: goreleser | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
- name: Run goreleaser | ||
uses: goreleaser/goreleaser-action@master | ||
with: | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} |
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,10 @@ | ||
brews: | ||
- name: aws-whois | ||
github: | ||
owner: luizm | ||
name: homebrew-tap | ||
homepage: https://github.com/luizm/aws-whois | ||
description: CLI to find which aws resource are using a specific IP | ||
folder: Formula | ||
test: | | ||
system "#{bin}/aws-whois -h" |
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 |
---|---|---|
@@ -1,31 +1,57 @@ | ||
# aws-whois | ||
## Description | ||
|
||
WIP - Just for fun | ||
If you have a lot of accounts, this is a simple way to check which resource on AWS are using a specific public or private IP. | ||
|
||
`aws-whois --profile example --ip 172.20.202.101` | ||
## Install | ||
|
||
```sh | ||
$ brew install luizm/tap/aws-whois | ||
``` | ||
|
||
Or download the binary from [github releases](https://github.com/luizm/aws-whois/releases) | ||
|
||
## Usage | ||
|
||
`$ aws-whois --profile example --ip 172.20.X.X` | ||
|
||
```log | ||
{ | ||
"OwnerId": "xxxxxxxx", | ||
"Description": "Interface for NAT Gateway nat-xxxxxxxxxxxx", | ||
"InterfaceType": "nat_gateway", | ||
"AvailabilityZone": "us-east-1c" | ||
"Profile": "example", | ||
"ENI": { | ||
"OwnerId": "xxxxxx", | ||
"Description": "Interface for NAT Gateway nat-xxxxxx", | ||
"InterfaceType": "nat_gateway", | ||
"AvailabilityZone": "us-east-1c", | ||
} | ||
"EC2Associated": null | ||
} | ||
``` | ||
|
||
`aws-whois --profile example --ip 172.20.202.10` | ||
`$ aws-whois --profile example --profile example2 --ip 54.X.X.X` | ||
|
||
```log | ||
{ | ||
"OwnerId": "xxxxxxxx", | ||
"VpcId": "vpc-xxxxxxxx", | ||
"InstanceId": "i-xxxxxxxxxx", | ||
"InstanceType": "t3.micro", | ||
"Tags": [ | ||
{ | ||
"Key": "Name", | ||
"Value": "instance-example.local" | ||
"Profile": "example", | ||
"Message": "ip 54.X.X.X not found" | ||
} | ||
{ | ||
"Profile": "example2", | ||
"ENI": { | ||
"OwnerId": "xxxxxx", | ||
"Description": "Primary network interface", | ||
"InterfaceType": "interface", | ||
"AvailabilityZone": "us-east-1a", | ||
"EC2Associated": { | ||
"VpcId": "vpc-xxxxxx", | ||
"InstanceId": "i-xxxxxx", | ||
"InstanceType": "t3.micro", | ||
"Tags": [ | ||
{ | ||
"Key": "Name", | ||
"Value": "example.local" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
``` |
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