IAM permissions in Google Cloud are granted on resources (such as a project) via IAM policy bindings, and a service account from one project can be granted a role on another project's resources. Granting the service account the predefined Compute Storage Admin role (roles/compute.storageAdmin) on the proj-vm project gives it the permissions needed to create and manage Compute Engine storage resources, including disk snapshots, for the VMs in that project. Downloading and embedding a private key in VM metadata or SSH keys is not a supported or secure way to grant a service account access, and setting API access scopes on a VM only controls what the VM's own attached service account can do from inside the instance — it does not grant an external service account access to resources in another project.
Community Discussion