terra-farm/terraform-provider-virtualbox

virtualbox_disk Resource

VoyTechnology opened this issue · 3 comments

The provider at the moment doesn't allow to create additional disks to be attached to the provider. This means that only the images source using the image field can be used, and there is no way to attach your own storage as an additional volume.

Proposal

resource "virtualbox_disk" "disk" {
  name      = "primary_disk"
  format    = "VDI"
  capacity  = "80G"
  flexible  = true
  encrypted = false
  
  # the following will be the computed properties
  # location = "<base_location>/primary_disk.vdi" # Maybe this will be customisable
  # uuid     = "<computed>"
}

The disk would be then attached to a virtualbox_storage_controller and the storage controller would be attached to the vm itself.

I am wondering about the consistency in the naming. If its attached to virtualbox_storage_controller, should this resource be called virtualbox_storage?

virtualbox_disk would be easier for a beginner, as it's closer to the VirtualBox UI/UX, rather than learning new terminology?

What is the status of this proposal?