github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/other-specifications/volume/topology_request.mdx (about) 1 --- 2 layout: docs 3 page_title: topology_request Block - Volume Specification 4 description: The "topology_request" block allows specifying locations where the provisioned volume must be accessible from. 5 --- 6 7 # `topology_request` Block 8 9 <Placement 10 groups={[ 11 ['volume', 'topology_request'], 12 ]} 13 /> 14 15 Specify locations (region, zone, rack, etc.) where the provisioned volume must 16 be accessible from or from where an existing volume is accessible from. 17 18 ```hcl 19 id = "ebs_prod_db1" 20 namespace = "default" 21 name = "database" 22 type = "csi" 23 plugin_id = "ebs-prod" 24 capacity_max = "200G" 25 capacity_min = "100G" 26 27 topology_request { 28 required { 29 topology { segments { rack = "R2" } } 30 topology { segments { rack = "R1", zone = "us-east-1a"} } 31 } 32 preferred { 33 topology { segments { rack = "R1", zone = "us-east-1a"} } 34 } 35 } 36 ``` 37 38 Consult the documentation for your storage provider and CSI plugin as to 39 whether it supports defining topology and what values it expects for topology 40 segments. Specifying topology segments that aren't supported by the storage 41 provider may return an error or may be silently removed by the plugin. 42 43 ## `topology_request` Parameters 44 45 - `required` <code>([Topology][topology]: nil)</code> - On **volume creation**, 46 the `required` topologies indicate that the volume must be created in a 47 location accessible from at least one of the listed topologies. On **volume 48 registration** the `required` topologies indicate that the volume was created 49 in a location accessible from all the listed topologies. 50 51 - `preferred` <code>([Topology][topology]: nil)</code> - Indicate that you 52 would prefer the storage provider to create the volume in one of the provided 53 topologies. Only allowed on **volume creation**. 54 55 ### `topology` Parameters 56 57 - `segments` `(map[string]string)` - A map of location types to their values. 58 The specific fields required are defined by the CSI plugin. 59 60 ## `topology_request` Examples 61 62 The following examples only show the `topology_request` blocks. Remember that 63 the `topology_request` block is only valid in the placements listed above. 64 65 ### Volume creation with `preferred` and `required` topologies 66 67 This configuration indicates you require the volume to be created within racks 68 `R1` or `R2`, but that you prefer the volume to be created within `R1`. 69 70 ```hcl 71 topology_request { 72 required { 73 topology { segments { rack = "R1", zone = "us-east-1a" } } 74 topology { segments { rack = "R2", zone = "us-east-1a" } } 75 } 76 preferred { 77 topology { segments { rack = "R1", zone = "us-east-1a"} } 78 } 79 } 80 ``` 81 82 [topology]: #topology-parameters