terraform-google-modules/terraform-google-container-vm

Documentation for volume : question

KasperJanssens opened this issue · 3 comments

Hello,
Is there a description of what can be filled out in the volumes section somewhere? I tried the example but it seems to give issues around not being able to determine whether the mount point is readonly or not and does not start. So I suppose I am doing something wrong with the config but I cannot seem to find the documentation for the volume section, something similar to the container section. I noticed #30 already tried achieving this but it is still somewhat unclear to me what the options are.

Edit: maybe I have to specify a bit better, I am trying to get two disks mounted underneath a docker image with two volumes, one on each disk. I do not see what the link is between the volume and the disk e.g. here https://github.com/terraform-google-modules/terraform-google-container-vm/blob/master/examples/instance_with_attached_disk/main.tf

Yes, I had made a typo and then I got the error message that there was no read or write rights specced. Not sure why, maybe it tries to create an adhoc disk then or so? In any case, as soon as I started typing better it worked. I thought the error message was because of a lacking variable somewhere, and as there was not a lot of doc about what variables can be passed to gcePersistentDisk it had something to do with that. So, my bad. Although maybe more info about what variables can be used inside gcePersistentDisk might be useful.

I experienced the same issue. My problem was that the device_name in the disk block in my instance template had not been specified. It seems it must be specified and must be the same as pdName in the volumes array.