github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/e2e/csi/input/use-efs-volume-read.nomad (about)

     1  # a job that mounts the EFS volume and sleeps, so that we can
     2  # read its mounted file system remotely
     3  job "use-efs-volume" {
     4    datacenters = ["dc1"]
     5  
     6    constraint {
     7      attribute = "${attr.kernel.name}"
     8      value     = "linux"
     9    }
    10  
    11    group "group" {
    12      volume "test" {
    13        type   = "csi"
    14        source = "efs-vol0"
    15      }
    16  
    17      task "task" {
    18        driver = "docker"
    19  
    20        config {
    21          image   = "busybox:1"
    22          command = "/bin/sh"
    23          args    = ["-c", "sleep 3600"]
    24        }
    25  
    26        volume_mount {
    27          volume      = "test"
    28          destination = "${NOMAD_TASK_DIR}/test"
    29          read_only   = true
    30        }
    31  
    32        resources {
    33          cpu    = 500
    34          memory = 128
    35        }
    36      }
    37    }
    38  }