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.1k stars 3.33k forks source link

googlecompute-export - doesn't support sharedVPCs #6953

Closed ghost closed 5 years ago

ghost commented 6 years ago

- Packer version from packer version Packer v1.3.2

- Host platform Google Cloud

- Debug log output To much company/private data to scrub from entire output - pertinent info pasted https://gist.github.com/obviousboy/cb5e104846ac6091c94d5ed0b9d38dd5

Code https://gist.github.com/obviousboy/3ba38f725797db40924ec037d3445880

Issue Builder - GoogleCompute is able to create a host in a Service VPC project on a shared VPC subnet and complete its tasks.

PostProcessors - GoogleCompute-Export is unable to to utilize a Shared VPC network and only attempts to find the default network (which has been removed). This causes the task to fail.

2018/11/02 11:05:43 ui error: ==> googlecompute (googlecompute-export): Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0].network': 'glob al/networks/default'. The referenced network resource cannot be found., invalid ==> googlecompute (googlecompute-export): Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0].network': 'global/networks/default'. The refe renced network resource cannot be found., invalid

rickard-von-essen commented 6 years ago

We should probably expose a bit more config, maybe network, subnetwork,machine_type, anddisk_type. And while we are at it we should probably change to image familydebian-8`.