github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/volume_mount.mdx (about) 1 --- 2 layout: docs 3 page_title: volume_mount Stanza - Job Specification 4 description: |- 5 The "volume_mount" stanza allows the task to specify where a group "volume" 6 should be mounted. 7 --- 8 9 # `volume_mount` Stanza 10 11 <Placement groups={['job', 'group', 'task', 'volume_mount']} /> 12 13 The `volume_mount` stanza allows the task to specify how a group 14 [`volume`][volume] should be mounted into the task. 15 16 ```hcl 17 job "docs" { 18 group "example" { 19 volume "certs" { 20 type = "host" 21 read_only = true 22 source = "ca-certificates" 23 } 24 25 task "example" { 26 volume_mount { 27 volume = "certs" 28 destination = "/etc/ssl/certs" 29 } 30 } 31 } 32 } 33 ``` 34 35 The Nomad client will make the volumes available to tasks according to this 36 configuration, and it will fail the allocation if the client configuration 37 updates to remove a volume that it depends on. 38 39 ## `volume_mount` Parameters 40 41 - `volume` `(string: "")` - Specifies the group volume that the mount is going 42 to access. 43 44 - `destination` `(string: "")` - Specifies where the volume should be mounted 45 inside the task's allocation. 46 47 - `read_only` `(bool: false)` - When a group volume is writeable, you may 48 specify that it is `read_only` on a per mount level using the `read_only` 49 option here. 50 51 For examples of how to use [HCL2] interpolation for fine-grained control of 52 volumes, see [Volume Interpolation]. 53 54 [volume]: /docs/job-specification/volume 'Nomad volume Job Specification' 55 [volume interpolation]: /docs/job-specification/volume#volume-interpolation 56 [hcl2]: /docs/job-specification/hcl2