Dynamic Tagging by Using GCP Metadata

Create dynamic tag rules to tag your GCP virtual machine instances based on GCP metadata collected by the Qualys Cloud Agent and Qualys Virtual Scanner Appliance. You must provide a search query with GCP instance information for each tag rule.

tag_creation

  1. Go to AssetView > Assets > Tags > New Tag.
  2. Choose the Cloud Asset Search tag rule.
  3. Select the cloud provider.
  4. Enter your query. Start typing in the Query field and it shows you the GCP attributes that you can search.

Sample Queries

Refer to the following sample queries:

  • Find GCP VM Instances located in US East 1 zone:

    gcp.compute.zone:us-east1-b

  • Find GCP instances that match exact value:

    gcp.compute.hostname:`instance-5.c.qvsa-dev.internal`

  • Find GCP VM instances within a specific GCP Project Id:

    "gcp.compute.projectId:gcp-qualys-demo"

  • Find GCP VM instances of specific machine type:

    "gcp.compute.machineType:n1-standard-1"

  • Find GCP VM instances based on IP address (comma-separated list or range):

    gcp.compute.privateIpAddress:10.128.15.234

    gcp.compute.publicIpAddress:335.232.131.2

  • Find GCP instances based on a GCP project number:

    gcp.compute.projectNumber:525006500856

To know what metadata Qualys Cloud Agent and Qualys Virtual Scanner Appliance collects, refer GCP Metadata.