vsphere/resource_vsphere_ha_vm_override.go
func resourceVSphereHAVMOverrideObjects(
	d *schema.ResourceData,
	meta interface{},
) (*object.ClusterComputeResource, *object.VirtualMachine, error) {
	if d.Id() != "" {
		return resourceVSphereHAVMOverrideObjectsFromID(d, meta)
	}
	return resourceVSphereHAVMOverrideObjectsFromAttributes(d, meta)
}
func resourceVSphereHAVMOverrideObjects(
	d *schema.ResourceData,
	meta interface{},
) (*object.ClusterComputeResource, *object.VirtualMachine, error) {
	if d.Id() != "" {
		return resourceVSphereHAVMOverrideObjectsFromID(d, meta)
	}
	return resourceVSphereHAVMOverrideObjectsFromAttributes(d, meta)
}
// resourceVSphereHAVMOverrideObjects handles the fetching of the cluster and
// virtual machine depending on what attributes are available:
// * If the resource ID is available, the data is derived from the ID.
// * If not, it's derived from the compute_cluster_id and virtual_machine_id
// attributes.