Create a cloud action - Google Cloud Platform

Prev Next

Create a Google Cloud Platform (GCP) cloud action to automatically discover assets from your Google Cloud Platform environment. This lets Lansweeper collect inventory data across your GCP projects and workloads (such as Compute Engine instances, Cloud SQL databases, and storage resources), so your cloud assets stay visible and up to date in a unified inventory.

Prerequisites

Create a GCP cloud action

  1. In your Lansweeper Site, go to Discovery > Actions.
  2. Select Create action.
  3. Select Cloud as the action type.
  4. In the pop-up, select Cloud provider - Google Cloud Platform (GCP) as the cloud source.
  5. Select Create.
  6. Enter a name and description for the action.
  7. Enter your Workload Identity Pool ID, Workload Identity Provider, Project Number, and Service Account Email.
  8. Select List projects.
  9. Choose the GCP projects you want to add to the discovery action.
  10. Under Asset types, select which types of assets to scan.
  11. Optionally, select Add a label to include or exclude specific labels.
  12. Select Create trigger.
  13. Select Instant to run at a scheduled time on select days. Enter the name, time, and days you prefer.
  14. Finally, select Save and finish.

What to expect after the action runs

After the trigger runs for the first time, Lansweeper discovers the resources in the GCP projects you selected and adds them to your asset inventory. Each discovered resource, such as a Compute Engine instance, Cloud SQL database, or storage bucket, becomes an asset with its own asset page showing details, relationships, and tags.

Discovery runs on the schedule you set in the trigger, so the data refreshes with each successful run.

Troubleshoot the GCP cloud action

Where to see scan problems

If a discovered asset is missing data, open the asset and check the Scan issues tab. Permission or scanning problems for that asset appear there.

If the action doesn't return the results you expect, check the following:

  • Connection or authentication fails. Confirm your Workload Identity Pool ID, Workload Identity Provider, Project Number, and Service Account Email are correct. Use the pool and provider IDs, not their names. Check that the Workload Identity Pool, provider, and site ID attribute condition are configured as described in Prepare Google Cloud Platform for Cloud Discovery.
  • No projects or assets are discovered. Confirm the service account has the Viewer, Folder Viewer, and Organization Viewer roles. To scan multiple projects, grant the Viewer role to the service account in each project.