Unable to use -var-file flag with Terraform Cloud Workspace

I am unable to use -var-file flag with Terraform Cloud Workspace. It works as expected when I rename the var file to terraform.tfvars and run terraform plan without the -var-file flag.

Terraform throwing errors like:
Operation failed: failed validating Terraform variables: 1 error occurred:

  • Invalid HCL in variable “prefix”: At 1:10: Unknown token: 1:10 IDENT Hello-World

This use case is documented in multiple places in Terraform documentation:

Appreciate the help!!