# Packer with hetzner cloud builder

**URL:** <https://discuss.hashicorp.com/t/packer-with-hetzner-cloud-builder/25627>\
**Category:** Packer\
**Created:** [June 17, 2021, 6:08pm UTC](https://discuss.hashicorp.com/t/packer-with-hetzner-cloud-builder/25627 "2021-06-17T18:08:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pugalcse](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/pugalcse/32/20105_2.png) [@pugalcse](https://discuss.hashicorp.com/u/pugalcse)\
**Post date:** [June 17, 2021, 6:08pm UTC](https://discuss.hashicorp.com/t/packer-with-hetzner-cloud-builder/25627/1 "2021-06-17T18:08:41Z")

</div>

Hi,

I am building the Image on the Hetzner cloud using packer and I am using the below format which is mentioned on the packer documentation page.

```auto
{
  "builders": [
    {
      "type": "hcloud",
      "token": "c2dTt3dy0Ivrwl7418jZMA4AJbu9zOkb51Ct3J827Gmi61rx0MICvMYjFjO0gJeu",
      "image": "ubuntu-18.04",
      "location": "nbg1",
      "server_type": "cx21",
      "communicator": ssh,
      "ssh_username": "ubuntu"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": ["echo foo"]
    }
  ]
}

```

When I do packer validate throws below error and I am not able to proceed. Please help.

```auto
root@tec:~/hetzner-cloud# packer validate images/image.pkr.hcl
Error: Argument or block definition required

  on images/image.pkr.hcl line 1:
   1: {

An argument or block definition is required here.

```

I am using packer 1.7.3 on Ubuntu 18.04 machine.

---

<div class="post-metadata">

**Author:** ![pugalcse](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/pugalcse/32/20105_2.png) [@pugalcse](https://discuss.hashicorp.com/u/pugalcse)\
**Post date:** [June 17, 2021, 7:32pm UTC](https://discuss.hashicorp.com/t/packer-with-hetzner-cloud-builder/25627/2 "2021-06-17T19:32:04Z")

</div>

The problem has been solved by changing the JSON template to the HCL2 template.
