Skip to content

Commit

Permalink
Add to GCP examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jpadams authored Mar 13, 2019
1 parent 4291dbb commit 5ffd45b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ curl -k -v -u admin:pass --raw --data \
'{"credentials": [{"id":"<AWS_ACCESS_KEY>","secret":"<AWS_ACCESS_PASSWORD>"}]}' https://localhost:9083/discover?format=json
```

## Scan and list all GCP assets
```sh
SERVICE_ACCOUNT=$(cat <service_account_secret> | base64 | tr -d '\n')
curl -k -v -u admin:pass --raw --data '{"credentials": [{"secret":"'${SERVICE_ACCOUNT}'", "provider":"gcp"}]}' https://localhost:9083/discover
```
Output
```sh
Type Region ID
GKE us-central1-a cluster-1
GKE us-central1-a cluster-2
GCR gcr.io registry-1
GCR gcr.io registry-2
Functions us-central1 function-1
```

## Scan all GCP assets and show full metadata for each of them
```sh
SERVICE_ACCOUNT=$(cat <service_account_secret> | base64 | tr -d '\n')
Expand Down

0 comments on commit 5ffd45b

Please sign in to comment.