for use with [Google Compute Engine](https://cloud.google.com/products/compute-engine)
(GCE) based on existing images. Google Compute Engine doesn't allow the creation
of images from scratch.
## Setting Up API Access
There is a small setup step required in order to obtain the credentials
that Packer needs to use Google Compute Engine. This needs to be done only
once if you intend to share the credentials.
In order for Packer to talk to Google Compute Engine, it will need
a _client secrets_ JSON file and a _client private key_. Both of these are
obtained from the [Google Cloud Console](https://cloud.google.com/console).
Follow the steps below:
1. Log into the [Google Cloud Console](https://cloud.google.com/console)
2. Click on the project you want to use Packer with (or create one if you
don't have one yet).
3. Click "APIs & auth" in the left sidebar
4. Click "Registered apps" in the left sidebar
5. Click "Register App" and register a "Web Application". Choose any
name you'd like.
6. After creating the application, click "OAuth 2.0 Client ID" then
click "Download JSON". This is your _client secrets_ JSON file.
7. Next, click "Certificate" (below the OAuth 2.0 Client ID section),
and click "Generate Certificate". You should be prompted to download
a private key. Note the password for the private key! This private key
is your _client private key_.
These two files you downloaded are necessary for Packer to talk to
Google Compute Engine.
## Basic Example
Below is a fully functioning example. It doesn't do anything useful, since no provisioners are defined, but it will effectively repackage an GCE image.
Below is a fully functioning example. It doesn't do anything useful,
since no provisioners are defined, but it will effectively repackage an
existing GCE image. The client secrets file and private key file are the