hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.03k stars 3.32k forks source link

Google Export Post-Processor needs Region configuration for subnetwork #8022

Open nguyen-phi opened 5 years ago

nguyen-phi commented 5 years ago

https://www.packer.io/docs/post-processors/googlecompute-export.html

To use the Google Compute post processor on a VPC, the network and subnetwork must be specified. Subnetwork is configured to be able to work by passing in a url or an id. The issue here is that when passing in just the subnetwork id, there's no way to pass in the region, which is required for the subnetwork connection.

acasanovass commented 4 years ago

Hello, I had your same issue and found out that by putting the whole URL I could bypass it. This is how my entry looks like: "subnetwork": "https://www.googleapis.com/compute/v1/projects/{{user var_project_id}}/regions/{{user var_zone}}/subnetworks/{{user var_subnetwork}}"

Hope it helps