nutanix / terraform-provider-nutanix

Terraform Nutanix Provider
https://www.terraform.io/docs/providers/nutanix/
Mozilla Public License 2.0
100 stars 112 forks source link

Add Datasource for storage_container #298

Open FlochonR opened 3 years ago

FlochonR commented 3 years ago

Hello !

I'm beginning to work with this provider that is very practice and I will use the resource nutanix_virtual_machine. In the example, I found this part

    storage_config {
      storage_container_reference {
        kind = "storage_container"
        uuid = "2bbe67bc-fd14-4637-8de1-6379257f4219"
      }
    }

This request is to add a datasource to get directly in terraform like this for example

data "nutanix_storage_container" "storage_container" {
    storage_container_name = var.storage_container_name
}

resource "nutanix_virtual_machine" "vm" {
  name                 = "myVm"
  cluster_uuid         = data.nutanix_cluster.cluster.id

  disk_list {
    disk_size_bytes = 10 * 1024 * 1024 * 1024

    storage_config {
      storage_container_reference {
        kind = "storage_container"
        uuid = data.nutanix_storage_container.storage_container.id
      }
    }
  }
}

Thanks in advance for your help !

Bogdan-Busoi-EMR commented 2 years ago

We desperately need this!

mccabejr commented 2 years ago

This continues to be a need.

tejpillay commented 2 months ago

any update for this? we desperately need this