feat(gcp): add --organization-id flag (#5524)

This commit is contained in:
Sergio Garcia
2024-10-29 12:11:53 -05:00
committed by GitHub
parent 8848cadc0a
commit f01910e4f2
8 changed files with 232 additions and 33 deletions
+22
View File
@@ -0,0 +1,22 @@
# GCP Organization
By default, Prowler scans all Google Cloud projects accessible to the authenticated user.
To limit the scan to projects within a specific Google Cloud organization, use the `--organization-id` option with the GCP organization ID:
```console
prowler gcp --organization-id organization-id
```
???+ warning
Make sure that the used credentials have the role Cloud Asset Viewer (`roles/cloudasset.viewer`) or Cloud Asset Owner (`roles/cloudasset.owner`) on the organization level.
???+ note
With this option, Prowler retrieves all projects within the specified organization, including those organized in folders and nested subfolders. This ensures that every project under the organizations hierarchy is scanned, providing full visibility across the entire organization.
???+ note
To find the organization ID, use the following command:
```console
gcloud organizations list
```