open-nomad/helper/pluginutils/hclutils
Mahmood Ali de954da350
docker: introduce a new hcl2-friendly mount syntax (#9635)
Introduce a new more-block friendly syntax for specifying mounts with a new `mount` block type with the target as label:

```hcl
config {
  image = "..."

  mount {
    type = "..."
    target = "target-path"
    volume_options { ... }
  }
}
```

The main benefit here is that by `mount` being a block, it can nest blocks and avoids the compatibility problems noted in https://github.com/hashicorp/nomad/pull/9634/files#diff-2161d829655a3a36ba2d916023e4eec125b9bd22873493c1c2e5e3f7ba92c691R128-R155 .

The intention is for us to promote this `mount` blocks and quietly deprecate the `mounts` type, while still honoring to preserve compatibility as much as we could.

This addresses the issue in https://github.com/hashicorp/nomad/issues/9604 .
2020-12-15 14:13:50 -05:00
..
testing.go docker: introduce a new hcl2-friendly mount syntax (#9635) 2020-12-15 14:13:50 -05:00
types.go vendor: explicit use of hashicorp/go-msgpack 2020-03-31 09:45:21 -04:00
types_test.go drivers: restore port_map old json support 2019-02-16 11:37:33 -05:00
util.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
util_test.go docker: introduce a new hcl2-friendly mount syntax (#9635) 2020-12-15 14:13:50 -05:00