github.com/hernad/nomad@v1.6.112/e2e/csi/input/use-efs-volume-read.nomad (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 # a job that mounts the EFS volume and sleeps, so that we can 5 # read its mounted file system remotely 6 job "use-efs-volume" { 7 datacenters = ["dc1"] 8 9 constraint { 10 attribute = "${attr.kernel.name}" 11 value = "linux" 12 } 13 14 group "group" { 15 16 volume "test" { 17 type = "csi" 18 source = "efs-vol0" 19 attachment_mode = "file-system" 20 access_mode = "single-node-writer" 21 } 22 23 task "task" { 24 driver = "docker" 25 26 config { 27 image = "busybox:1" 28 command = "/bin/sh" 29 args = ["-c", "sleep 3600"] 30 } 31 32 volume_mount { 33 volume = "test" 34 destination = "${NOMAD_TASK_DIR}/test" 35 read_only = true 36 } 37 38 resources { 39 cpu = 500 40 memory = 128 41 } 42 } 43 } 44 }