google / cloud-forensics-utils

Python library to carry out DFIR analysis on the Cloud
Apache License 2.0
459 stars 88 forks source link

Instance names are treated as project-wide unique identifiers #439

Closed jonathan-greig closed 2 years ago

jonathan-greig commented 2 years ago

Issue Description

Instance names are only unique within a zone, not project wide.

For example libcloudforensics.providers.gcp.internal.compute.ListInstances generates a dictionary of all instances in a project keyed on instance name. If there are more than one instance in the project with the same name only one will be included in the returned dict.

Possible Fixes:

  1. Use instance IDs instead of instance names - a less human-friendly value but helper functions could be added to still access instances by name etc.
  2. Use zone:instance_name to refer to instances.