https://github.com/dapperlabs/gips
Small utility to make an organization's GCP NAT and CloudSQL IPs searchable.
https://github.com/dapperlabs/gips
Last synced: 5 months ago
JSON representation
Small utility to make an organization's GCP NAT and CloudSQL IPs searchable.
- Host: GitHub
- URL: https://github.com/dapperlabs/gips
- Owner: dapperlabs
- Created: 2023-08-22T05:33:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T12:21:48.000Z (about 2 years ago)
- Last Synced: 2024-04-19T13:39:19.537Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 10.1 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## gips
`gips` = "Google IPs"
Finding an external IP inside of Google Cloud is frustrating - they're listed in a bunch of different places and you end up having to do a lot of work to find a particular one.
This little application finds all of the external IPs and throws them into an in-memory map.
NOTE: If you had a ton of projects and memory is becoming an issue - adding an additional adaptor would be pretty simple - `core.ProjectService` is the interface you'll need to conform to.
It's queryable with `curl` and outputs JSON:
```bash
/bin $ curl http://gips:8080/api/v1/project/project-name-goes-here
{
"name": "project-name-goes-here",
"regions": [
{
"region": "us-west1",
"ips": [
"34.2.123.129",
"35.3.124.141",
"34.4.125.109",
"34.5.126.81",
"34.6.127.84",
"34.7.128.34"
]
}
]
}
/bin $ curl http://gips:8080/api/v1/search/34.2.123.129
{"name":"project-name-goes-here","regions":[{"region":"us-west1","ips":["34.2.123.129","35.3.124.141","34.4.125.109","34.5.126.81","34.6.127.84","34.7.128.34"]}]}
```
## TODO
- [x] NAT IPs
- [x] golang package to query this - `search`
- [x] cli interface for search endpoint and to test `search` package
- [x] CloudSQL IPs
- [ ] Figure out proper amount of permissions this needs to run - add Terraform to allow those permissions
- [ ] Do we tag the IPs so we can find them quickly? OR is just knowing the project enough for this?
- [ ] Helm chart?