Skip to content

cnspec scan gcp instance scanning fails with cross instance scanning #8416

Description

@tas50

Describe the bug
You can't scan an instance in a different zone than your jumphost.

From us-west1-a:

tim@jump-host:~$ cnspec scan gcp instance superimportantserver --project-id luna-common --zone us-central1-a
→ loaded configuration from /home/tim/.config/mondoo/mondoo.yml using source default
→ using service account credentials
→ discover related assets for 1 asset(s)
→ resolved assets resolved-assets=1

 superimportantserver ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────    X score: X


x could not complete snapshot creation error="googleapi: Error 400: Invalid value for field 'resource.sourceDisk': 'https://www.googleapis.com/compute/v1/projects/luna-common/zones/us-central1-a/disks/superimportantserver'. Source zonal disk and target zonal disk must be in the same zone., invalid" disk=
Asset: superimportantserver
---------------------------

error: could not create gcp instance snapshot: googleapi: Error 400: Invalid value for field 'resource.sourceDisk': 'https://www.googleapis.com/compute/v1/projects/luna-common/zones/us-central1-a/disks/superimportantserver'. Source zonal disk and target zonal disk must be in the same zone., invalid


Scanned 1 assets

→ For detailed CLI output, use `--output full`. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions