terraform { backend "pg" {} } provider "vsphere" { version = "1.24.1" vsphere_server = var.vcenter_server user = var.vsphere_username password = var.vsphere_password allow_unverified_ssl = true } data "vsphere_datacenter" "dc" { name = var.vsphere_datacenter } data "vsphere_resource_pool" "pool" { name = "/${var.vsphere_datacenter}/host/${var.vsphere_hostip}/Resources" datacenter_id = data.vsphere_datacenter.dc.id } data "vsphere_datastore" "vmdatastore" { name = var.vsphere_vmdatastore datacenter_id = data.vsphere_datacenter.dc.id } data "vsphere_datastore" "cldatastore" { name = var.vsphere_cldatastore datacenter_id = data.vsphere_datacenter.dc.id } data "vsphere_network" "network" { name = var.vsphere_network datacenter_id = data.vsphere_datacenter.dc.id }