Conflict between the Terraform state file and the virtual machine state

I am currently working on a project about automatic deployment of VMs and services directly in VMware. The configuration and deployment of VMs I understood it’s clear. Where I have a doubt is when we deploy a VM via Terraform I saw that the Terraform status file saves the current configuration of the VM. But if we modify the VM directly via the VMware web interface, will this create a conflict with Terraform and more specifically with the Terraform file.

In order to avoid this, changes to the VM must be made via Terraform?

If you make a change outside of Terraform the next time terraform apply is run those changes will be reverted.

Anything managed by Terraform really needs not to be touched by anything else.

Thanks Stuart, you answer my question exactly.

But it would be quite possible to use Terraform only for deployment, even if it’s not in the spirit of Terraform.

I wouldn’t recommend it. If you are just wanting to create some resources you are better off using other tools, such as CLI apps.