hashicorp / packer-plugin-googlecompute

Packer plugin for Google Compute Builder
https://www.packer.io/docs/builders/googlecompute
Mozilla Public License 2.0
24 stars 54 forks source link

Allow pushing images to separate GCP projects #30

Closed ArmaanT closed 1 year ago

ArmaanT commented 3 years ago

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

Right now images that are generated by modified virtual machines are created in the same project that the original VM was created in. It could be useful to be given the option to create an image in a different project. This option would allow for the creation of multiple different images environments as well as potentially restrict Packer's permissions in more secure projects.

Use Case(s)

A good use case for this would be any situation where you would want to limit the permissions given to Packer in a specific environment. For example, it may be desirable to give Packer permissions to only modify images in a shared project while granting it instance admin on a different project to actually create and configure virtual machines.

Another potential use case is having separate QA and production projects for images. Then Packer could be configured to push images to the correct projects.

Potential configuration

A new image_project_id option that defaults to project_id