github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/csi/input/use-efs-volume-write.nomad (about) 1 # a job that mounts an EFS volume and writes its job ID as a file 2 job "use-efs-volume" { 3 datacenters = ["dc1"] 4 5 constraint { 6 attribute = "${attr.kernel.name}" 7 value = "linux" 8 } 9 10 group "group" { 11 12 volume "test" { 13 type = "csi" 14 source = "efs-vol0" 15 attachment_mode = "file-system" 16 access_mode = "single-node-writer" 17 } 18 19 task "task" { 20 driver = "docker" 21 22 config { 23 image = "busybox:1" 24 command = "/bin/sh" 25 args = ["-c", "echo 'ok' > ${NOMAD_TASK_DIR}/test/${NOMAD_ALLOC_ID}; sleep 3600"] 26 } 27 28 volume_mount { 29 volume = "test" 30 destination = "${NOMAD_TASK_DIR}/test" 31 read_only = false 32 } 33 34 resources { 35 cpu = 500 36 memory = 128 37 } 38 } 39 } 40 }