https://github.com/np-guard/cloud-resource-collector
Collects cloud resources in a given account. Supports multiple cloud providers.
https://github.com/np-guard/cloud-resource-collector
firewall-configuration network-configuration routing-tables vpc vpc-resources
Last synced: 3 months ago
JSON representation
Collects cloud resources in a given account. Supports multiple cloud providers.
- Host: GitHub
- URL: https://github.com/np-guard/cloud-resource-collector
- Owner: np-guard
- License: apache-2.0
- Created: 2023-03-28T11:29:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T00:24:15.000Z (3 months ago)
- Last Synced: 2025-04-14T10:13:37.928Z (3 months ago)
- Topics: firewall-configuration, network-configuration, routing-tables, vpc, vpc-resources
- Language: Go
- Homepage: https://pkg.go.dev/github.com/np-guard/cloud-resource-collector
- Size: 445 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloud-resource-collector
Collects cloud resources in a given account. Supports multiple cloud providers.## Prerequisites
### Setup the AWS Collector
The AWS Collector requires you to provide credential information. You can do this either by setting up
a shared credential file or by setting environment variables.To setup the credential file, simply create a text file with the following content (replacing the keys with your AWS keys)
```ini
[default]
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY
```
If you are using Windows save the file under `C:\Users\\.aws\credentials`.
If you are using Linux, MacOS, or Unix save the file under `~/.aws/credentials`Alternatively, you can set the following environment variables:
```shell
export AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY
```Note: Pagination is not yet implemented, the collector will return only the first page of resources.
### Setup the IBM Collector
The IBM collector requires an IBM API key to be supplied through the following environment variable:
```shell
export IBMCLOUD_API_KEY=
```## Usage
### Collecting resources
```
./bin/collector collect --provider [flags]Flags:
-h, --help help for collect
--out string file path to store results
-r, --region stringArray cloud region from which to collect resources
--resource-group string resource group id or name from which to collect resources
```* Value of `--provider` must be either `ibm` or `aws`
* The `--region` argument can appear multiple times. If running with no `--region` arguments, resources from all (public) regions are collected.
* If running with no `--resource-group` argument, resources from all resource groups are collected.### Listing available regions
```
./bin/collector get-regions --provider
```## Build the project
Requires Go version 1.23 or later.
```shell
git clone [email protected]:np-guard/cloud-resource-collector.git
cd cloud-resource-collector
make build
```