Integrate Google Cloud using a service account key
Procedure
Creating a service account
Go to your Google Cloud service account, and select + CREATE SERVICE ACCOUNT.
Enter the Service account details, and select CREATE AND CONTINUE.
Add the roles below:
viewer
iam.securityReviewer
logging.configWriter (to enable event-driven integration)
storage.objectViewer conditional to tfstate suffix
To add the tfstate condition that enables Firefly to scan only files with a tfstate suffix, select + ADD IAM CONDITION.
Enter the Title and Condition type > Resource > Name.
Operator > Ends with
Under Value, enter tfstate > SAVE > DONE.
At the organization level, create a custom role that allows Firefly to discover the project folder tree. Attach this role to your service account.
Select your organization level.
Select Roles > + CREATE ROLE.
Enter a Title and ID.
Under Role launch stage, select General Availability.
Select + ADD PERMISSIONS and add the permissions below:
resourcemanager.folders.get
resourcemanager.folders.list
Select ADD > CREATE.
Select IAM > GRANT ACCESS.
Under New principals, enter Firefly's principal.
Under Assign roles, select the role you just created > SAVE.
At the project level, select Service Accounts and select the Firefly service account.
Select the kebab > Manage keys > ADD KEY > Create new key.
Select JSON > CREATE. Selecting CREATE downloads a service account key file.
In Firefly, paste or upload the account key file into the Service Account Key field.
Enabling APIs
To allow Firefly to scan your projects and present your assets in the Inventory, enable the APIs below:
Logging API (to enable event-driven integration)
Admin SDK API
App Engine Admin API
BigQuery API
Cloud Billing API
Cloud Functions API
Cloud Scheduler API
Cloud Dataproc API
Cloud DNS API
Cloud Resource Manager API
Compute Engine API
IAM API
Kubernetes Engine API
Service Management API
Service Usage API
Cloud Asset API
Google Cloud Memorystore for Redis API
Cloud Storage API
Groups Settings API
Cloud Spanner API
Google Cloud Filestore API
Recommender API
Discovering multiple projects in this integration
Use the same service account key to simultaneously integrate multiple Google Cloud projects.
Procedure
Select IAM & Admin > Service Accounts.
Copy the principal of the Service account you created in "Creating a service account" (associated email address).
Select a resource - the desired project you would like to integrate or the organization if you want Firefly to discover all the projects in your organization.
Select IAM > GRANT ACCESS.
In the New principals field, paste the principal you copied in step 3.
In the role field, select the following roles and SAVE:
roles/iam.securityReviewer
roles/storage.objectViewer (conditional to tfstate suffix)
roles/viewer
roles/logging.configWriter
To exclude projects under this service account, enter the rules in the Regex rules field.
For all integrated projects, verify the Enabling APIs are activated.
Google Cloud Insights
After integrating your Google Cloud account, we retrieve Google Cloud Insights directly from your projects. These insights identify potential risks in your asset configurations, enhance your security posture, and reveal significant patterns in resource usage. To utilize this feature, verify you have enabled the Recommender API.
Last updated