hashicorp / packer-plugin-googlecompute

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

feat: adds image_project_id parameter for pushing images to a different GCP project #170

Closed opdude closed 1 year ago

opdude commented 1 year ago

This PR resurrects and rebases this PR which creates an image_project_id configuration option (which defaults to project_id) and allows defining a different project that an image should be created in.

Closes https://github.com/hashicorp/packer-plugin-googlecompute/issues/30

hashicorp-cla commented 1 year ago

CLA assistant check
All committers have signed the CLA.

opdude commented 1 year ago

Hi @opdude,

Thanks for picking this one up! The code looks good to me, I just left a singe nit on an error message, but outside from that we're good I think.

Since this requires two projects to test the feature, I don't think we can easily add an acceptance test for this feature (I'll need to check what I can do on that front), have you confirmed it worked as you expect it to?

I'm pre-approving in advance since there's not a lot to change here, will circle back after you've addressed what I commented on.

Thanks again!

Thanks. Yeah, I've been running it successfully both with and without using the override to the destination GCP project.

lbajolet-hashicorp commented 1 year ago

Hi @opdude,

Thanks for the quick reroll! I'll run tests and if they succeed, we can consider this done, I'll merge the PR when that happens.

Thanks again for picking this one up!

ArmaanT commented 12 months ago

Thanks for landing this @opdude! I'm glad to see these make it into main.

bbitarelle commented 9 months ago

Hi,

Thank you for this PR ! Just to clarify, we can now create images in another project, but not in 2 projects at the same time ?

Thanks !

opdude commented 4 months ago

Hi,

Thank you for this PR ! Just to clarify, we can now create images in another project, but not in 2 projects at the same time ?

Thanks !

Yes it stil only builds into a singular project but allows the building and destination project to be different.