Terraform is only cloud agnostic because it's in HCL. The Terraform provider for GCP, AWS, GCP, etc are all different enough that if you wanted to deploy a VM to AWS and then move it to another cloud you would have to re-write a lot of the HCL.