github.com/ratanraj/packer@v1.3.2/website/source/docs/builders/hetzner-cloud.html.md (about)

     1  ---
     2  description: |
     3      The Hetzner Cloud Packer builder is able to create new images for use with the
     4      Hetzner Cloud. The builder takes a source image, runs any provisioning
     5      necessary on the image after launching it, then snapshots it into a reusable
     6      image. This reusable image can then be used as the foundation of new servers
     7      that are launched within the Hetzner Cloud.
     8  layout: docs
     9  page_title: 'Hetzner Cloud - Builders'
    10  sidebar_current: 'docs-builders-hetzner-cloud'
    11  ---
    12  
    13  # Hetzner Cloud Builder
    14  
    15  Type: `hcloud`
    16  
    17  The `hcloud` Packer builder is able to create new images for use with
    18  [Hetzner Cloud](https://www.hetzner.cloud). The builder takes a source image,
    19  runs any provisioning necessary on the image after launching it, then snapshots
    20  it into a reusable image. This reusable image can then be used as the foundation
    21  of new servers that are launched within the Hetzner Cloud.
    22  
    23  The builder does *not* manage images. Once it creates an image, it is up to you
    24  to use it or delete it.
    25  
    26  ## Configuration Reference
    27  
    28  There are many configuration options available for the builder. They are
    29  segmented below into two categories: required and optional parameters. Within
    30  each category, the available configuration keys are alphabetized.
    31  
    32  In addition to the options listed here, a
    33  [communicator](/docs/templates/communicator.html) can be configured for this
    34  builder.
    35  
    36  ### Required:
    37  
    38  -   `token` (string) - The client TOKEN to use to access your account. It
    39      can also be specified via environment variable `HCLOUD_TOKEN`,
    40      if set.
    41  
    42  -   `image` (string) - ID or name of image to launch server from.
    43  
    44  -   `location` (string) - The name of the location to launch the server in.
    45  
    46  -   `server_type` (string) - ID or name of the server type this server should be created with.
    47  
    48  ### Optional:
    49  
    50  -   `endpoint` (string) - Non standard api endpoint URL. Set this if you are
    51      using a Hetzner Cloud API compatible service. It can also be specified via
    52      environment variable `HCLOUD_ENDPOINT`.
    53  
    54  -   `server_name` (string) - The name assigned to the server. The Hetzner Cloud
    55      sets the hostname of the machine to this value.
    56  
    57  -   `snapshot_name` (string) - The name of the resulting snapshot that will
    58      appear in your account. Defaults to "packer-{{timestamp}}" (see
    59      [configuration templates](/docs/templates/engine.html) for more info).
    60  
    61  -   `poll_interval` (string) - Configures the interval in which actions are polled by the client. Default `500ms`. Increase this interval if you run into rate limiting errors.
    62  
    63  -   `user_data` (string) - User data to launch with the server.
    64  
    65  -   `user_data_file` (string) - Path to a file that will be used for the user
    66      data when launching the server.
    67  
    68  ## Basic Example
    69  
    70  Here is a basic example. It is completely valid as soon as you enter your own
    71  access tokens:
    72  
    73  ``` json
    74  {
    75    "type": "hcloud",
    76    "token": "YOUR API KEY",
    77    "image": "ubuntu-18.04",
    78    "location": "nbg1",
    79    "server_type": "cx11",
    80    "ssh_username": "root"
    81  }
    82  ```