Upload template in vmware

Terrform has ovf_deploy resource.It deploy my ova/ovfa as a VM on vCenter machine.
I need to upload my template as a template.It means when I upload my ova, vCenter knows it as template not file.
I found vsphere_file resource, but it only upload my file in datastore.
How can I upload my template as template?