mount multiple volumes on 1 workspace

Is it possible to do that? and how would my main.tf look likes? https://discord.com/channels/747933592273027093/1011921824650633286/1011921824650633286 I saw this guy mention that he want to mount 1 path. Now let say I can't change my dir around, is it possible to mount multiple paths?
5 Replies
kyle
kyle2y ago
Yup, it's very possible! Just create multiple mounts.
ÙwÚ
ÙwÚ2y ago
umm so instead of the default /home/coder volumes, i need to add my own volumes like this?
volumes {
container_path = "/home/coder/"
volume_name = docker_volume.home_volume.name
read_only = false
}
volumes{
container_path = "/home/pifordecoyer/code/py/"
host_path = "/home/pifordecoyer/code/py/"
read_only = false
volume_name = "coder-${data.coder_workspace.me.id}-py"
}
volumes {
container_path = "/home/coder/"
volume_name = docker_volume.home_volume.name
read_only = false
}
volumes{
container_path = "/home/pifordecoyer/code/py/"
host_path = "/home/pifordecoyer/code/py/"
read_only = false
volume_name = "coder-${data.coder_workspace.me.id}-py"
}
it feel kindda wrong tho, but idk how to add another one
kyle
kyle2y ago
Yup, exactly! You can add as many as you need.
ÙwÚ
ÙwÚ2y ago
okay thanks! consider this question solved:)
kyle
kyle2y ago
No problem!
Want results from more Discord servers?
Add your server