A .tfvars file provides the values of input variables for a given environment, for example dev.tfvars and prod.tfvars. It is passed with -var-file. Files containing secrets must not be committed. A terraform.tfvars or *.auto.tfvars file is loaded automatically.
Example
terraform apply -var-file=prod.tfvars