terraform { backend "pg" {} required_providers { vsphere = { source = "hashicorp/vsphere" version = "~> 1.24.3" } } } provider "vsphere" { 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_host}" 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 }