Values from `.tfvars` not getting loaded

I am new to terraform and building my first terraform script to launch instances in GCP. Values from terraform.tfvars are not being loaded and only default values from variables.tf are being loaded. Below are the commands that I am using to run to run the script. Can someone let me know the mistake I am doing?

terraform plan -var-file=terraform.tfvars
terraform apply-var-file=terraform.tfvars 

Below is the file structure

├── gcp_instance
│ ├── gcp_instance.tf
│ └── variables.tf
├── main.tf
└── terraform.tfvars

My main.tf file

module gcpinstance {
source = “./gcp_instance”
}

my gcp_instance.tf file

terraform {
  required_providers {
    google = {
      source = "hashicorp/google"
      version = "3.5.0"
    }
  }
}

provider "google" {
  region      = "${var.gcp_region}"
  project     = "${var.gcp_project}"
  zone        = "${var.gcp_zone}"
  credentials = "${var.gcp_credentials}"
}

resource "google_compute_instance" "vm_instance" {
  count        = length(var.instance_name)
  name         = var.instance_name[count.index]
  machine_type = element(var.instance_type, count.index)

  boot_disk {
    initialize_params {
      image =  element(var.instance_image, count.index)
    }
  }

  network_interface {
    network = "${var.gcp_network}"
  }
}

my variables.tf file

variable "gcp_project" {
  description = "Google Cloud Platform project"
  default     = "test"
}

variable "gcp_region" {
  description = "Google Cloud Platform's selected region"
  default     = "us-central1"
}

variable "gcp_zone" {
  description = "Google Cloud Platform's selected Zone"
  default     = "us-central1-f"
}

variable "gcp_credentials" {
  description = "Credential file to be used for this project"
  default     = "test"
}

variable "instance_tags" {
  type = list
  default = ["application1", "application2"]
}

variable "instance_type" {
  type = list
  default = ["f1-micro","f1-micro"]
}

variable "instance_name" {
  type = list(string)
  default = ["application1", "application2"]
}

variable "instance_image" {
  type = list
  default = ["debian-cloud/debian-9","debian-cloud/debian-9"]
}

variable "gcp_network" {
  description = "Network to be used"
  default     = "default"
}

variable "gcp_network_global_cidr" {
  description = "CIDR for the Instances"
  default     = "10.0.0.0/24"
}

my terraform.tfvars file

gcp_project = "test"
gcp_region  = "us-central1"
gcp_zone    = "us-central1-f"

gcp_credentials = "test.json"
instance_tags = ["application1", "application2", "application3"]
instance_type = ["f1-micro", "f1-micro", "f1-micro"]
instance_name = ["application1", "application2", "application3"]
instance_image = ["debian-cloud/debian-9", "debian-cloud/debian-9", "debian-cloud/debian-9"]

gcp_network = "default"
gcp_network_global_cidr = "10.0.0.0/24"

Hi @Eva,

When you use Terraform Cloud, the per-workspace Variables stored as part of the workspace settings replace the functionality of the terraform.tfvars file. That means you have two options, depending on your goals:

First, you could store the settings in Terraform Cloud rather than in your repository. This can be useful for situations where the variable value is very situational, such that if you were to run the configuration outside of Terraform Cloud you’d likely choose different values anyway. In that case, Terraform Cloud will generate terraform.tfvars for you and so the values will take effect automatically.

The other option, if you still want to keep the values in your codebase rather than in Terraform Cloud, is to create a file with an .auto.tfvars suffix. Terraform CLI loads those automatically in the same way that it loads terraform.tfvars automatically, but Terraform Cloud’s own variables feature doesn’t generate any files named like that and so the files you have in your configuration will take effect directly.

Thanks for the response. I am actually not using terraform cloud, sorry for the wrong tag. I am using opensource terraform