Error creating a CSI volume in GCP (need 1 zone)

Hello, I’m trying to configure Nomad 1.1.2 to create a disk as CSI storage in GCP but I can’t configure the topology zone.

I’m reviewing the documentation and can’t find anything about this.

nomad volume create test.hcl

Error creating volume: Unexpected response code: 500 (rpc error: 1 error occurred:
        * controller create volume: CSI.ControllerCreateVolume: volume "test-csi" snapshot source &{"" ""} is not compatible with these parameters: rpc error: code = InvalidArgument desc = CreateVolume failed to pick zones for disk: failed to pick zones from topology: need 1 zones from topology, only got 0 unique zones

I tried to add these parameters in the volume file.

accessibility_requirements = "europe-west1-b"
accessibility = "europe-west1-b"
zone = "europe-west1-b"
accessible_topology = "europe-west1-b"
topology = "europe-west1-b"
topologykeyzone = "europe-west1-b"
topology.gke.io/zone = "europe-west1-b"

Volume file (test.hcl):

type      = "csi"
plugin_id = "gce-pd"
id        = "test-csi"
name      = "test-csi"

capacity_min = "10GiB"
capacity_max = "20GiB"

capability {
        access_mode = "single-node-writer"
        attachment_mode = "file-system"
}

parameters {

       [...]

}

Thanks!

I’m using this image version gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v1.2.2-gke.2

Controller and node job:

job "gce-pd-csi-plugin" {

	type = "system"

	group "controller" {

		task "plugin" {

			driver = "docker"

			env {

				GOOGLE_APPLICATION_CREDENTIALS	= "/secrets/creds.json"

			}

			config {

				image = "gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v1.2.2-gke.2"

				args = [

					"--endpoint=unix:///csi/csi.sock",
					"--v=6",
					"--logtostderr",
					"--run-node-service=false"

				]

			}

			csi_plugin {

				id        = "gce-pd"
				type      = "controller"
				mount_dir = "/csi"

			}

			resources {

				memory = 256

			}
		}

	}

	group "node" {

		task "plugin" {

			driver = "docker"

			env {

				GOOGLE_APPLICATION_CREDENTIALS = "/secrets/creds.json"

			}

			config {

				image = "gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v1.2.2-gke.2"

				args = [
					"-endpoint=unix:///csi/csi.sock",
					"-v=6",
					"-logtostderr",
					"-run-controller-service=false"
				]

				privileged = true

			}

			csi_plugin {

				id        = "gce-pd"
				type      = "node"
				mount_dir = "/csi"

			}

			resources {

				memory = 256

			}
		}
	}

}