google_cloud_asset_resources_search_all

Retrieve all the resources within a given accessible CRM scope (project/folder/organization). See the REST API for more details.

Example Usage - searching for all projects in an org

data google_cloud_asset_resources_search_all projects {
  provider = google-beta
  scope = "organizations/0123456789"
  asset_types = [
    "cloudresourcemanager.googleapis.com/Project"
  ]
}

Example Usage - searching for all projects with CloudBuild API enabled

data google_cloud_asset_resources_search_all cloud_build_projects {
  provider = google-beta
  scope = "organizations/0123456789"
  asset_types = [
    "serviceusage.googleapis.com/Service"
  ]
  query = "displayName:cloudbuild.googleapis.com AND state:ENABLED"
}

Example Usage - searching for all Service Accounts in a project

data google_cloud_asset_resources_search_all project_service_accounts {
  provider = google-beta
  scope = "projects/my-project-id"
  asset_types = [
    "iam.googleapis.com/ServiceAccount"
  ]
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

The results block supports: