Adding a Google GCP build
Google Compute is actually the simplest of the three large cloud plugins. It offers just a single unified builder that boots a VM for each build. The advantage is simplicity. The disadvantage is that there is not currently a chroot builder option in GCP to accelerate builds. Also, the Google Compute plugin makes heavy usage of the gcloud
CLI, which must be installed on the Packer host for some use cases. Note that Google has fairly strict regular expressions on resource names, so underscores and dots are not allowed in most cases. However, GCP is happy to provide the expected regular expression when a naming issue occurs:
'(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)'
When adding GCP, there is a fresh set of environment variables that are handy to import as variables. These can be defaulted whether or not they are actually present as environment variables. An unset environment variable will result in a valid NULL
variable in Packer, which may or may...