In this example here: Terraform Registry
What is the difference between this:
data "vsphere_network" "network" {
name = "VM Network"
datacenter_id = data.vsphere_datacenter.datacenter.id
}
and
"vsphere_virtual_machine" "vm" {
clone {
...
network_interface {
ipv4_address = "172.16.11.10"
ipv4_netmask = 24
}
I guess what I’m really asking is why are both specified when it seems the network name can be specified in clone.network_interface? Are they both required? If so, why?