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

Create instance using template living in another project

Is it possible to use launch a compute engine instance in one project, using an instance template defined in another project?

For example, in project A, I define an instance template. In project B, I submit a Batch job that defines the fully qualified instance template name from Project A to use in the JSON configuration file. 

I have also added the custom service account from Project B as a Principal with Editor role on Project A IAM permissions. 

Solved Solved
2 3 801
1 ACCEPTED SOLUTION

It is not supported today. Mentioned in the API reference page:

https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs

 

Batch only supports global instance templates from the same project as the job. You can specify the global instance template as a full or partial URL.

 

 

View solution in original post