vmware-guest fail to deploying vm to vcenter

hi All,
Getting error below. Does it mandatory to mention the resource pool?. I am able to deploy vms without any issue if i enter the ESXI host name. If i enter the cluster name I am getting following below error.

{
“_ansible_parsed”: false,
“exception”: “Traceback (most recent call last):\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1512, in \n main()\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1503, in main\n result = pyv.deploy_vm()\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1233, in deploy_vm\n resource_pool = self.get_resource_pool()\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1177, in get_resource_pool\n resource_pool = self.select_resource_pool_by_name(self.params[‘resource_pool’])\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1099, in select_resource_pool_by_name\n resource_pool = self.cache.find_obj(self.content, [vim.ResourcePool], resource_pool_name)\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 438, in find_obj\n objects = self.get_all_objs(content, types, confine_to_datacenter=True)\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 452, in get_all_objs\n if parent_dc.name != self.dc_name:\nAttributeError: ‘NoneType’ object has no attribute ‘name’\n”,
“_ansible_no_log”: false,
“module_stderr”: “Traceback (most recent call last):\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1512, in \n main()\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1503, in main\n result = pyv.deploy_vm()\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1233, in deploy_vm\n resource_pool = self.get_resource_pool()\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1177, in get_resource_pool\n resource_pool = self.select_resource_pool_by_name(self.params[‘resource_pool’])\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 1099, in select_resource_pool_by_name\n resource_pool = self.cache.find_obj(self.content, [vim.ResourcePool], resource_pool_name)\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 438, in find_obj\n objects = self.get_all_objs(content, types, confine_to_datacenter=True)\n File "/tmp/ansible_o4h3ec/ansible_module_vmware_guest.py", line 452, in get_all_objs\n if parent_dc.name != self.dc_name:\nAttributeError: ‘NoneType’ object has no attribute ‘name’\n”,
“changed”: false,
“module_stdout”: “”,
“rc”: 0,
“msg”: “MODULE FAILURE”
}