Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Reuse of Instance ID in Google Cloud Compute Engine

Hello community,

I have a question regarding the uniqueness and possible reuse of instance_id in Google Cloud Compute Engine.

I understand that the 19-digit instance_id is a unique numerical identifier automatically assigned to a virtual machine (VM) when it is created.
However, is there any possibility that this identifier could be reused for a new instance after the old one is deleted?

Additionally, I would like to clarify whether it is recommended to use a instance_creation_timestamp alongside the instance_id, project_id and zone to uniquely identify virtual machines over time and across projects (as it is used in unique JSON Web Token (JWT)) ?
This is important to ensure the uniqueness of records in a database and to correctly track the allowlisted VMs.

I would appreciate any clarification on this.

Thank you!
Mykyta KYRYCHENKO

Solved Solved
1 2 140
1 ACCEPTED SOLUTION

Google assigns instance IDs for its internal use and API operations. These IDs change when an instance is recreated.

View solution in original post