How to use .tfvars for my Terraform plan workflow

Hi All,

I am working on a Terraform project and I need to create Terraform plan against the shared Dev environment to determine the change implications of the PR. The plan should be attached to the pull request as a comment. This comment should be updated or replaced with a new plan when the PR is updated with new commits. I have a .tfvars file in my working directory, how do I get my workflow to run the plan using the .tfvars file in my directory? I get an error Error: No value for required variable. Appreciate any fix.

name: ‘Terraform’

on:
push:
branches:
- master
pull_request:

jobs:
terraform:
name: ‘Terraform’
runs-on: ubuntu-latest

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
  uses: actions/checkout@master

- name: Configure AWS credentials
  uses: aws-actions/configure-aws-credentials@v1
  with:
    aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    aws-region: eu-west-2

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: 'Terraform Init'
  run: terraform init

# Terraform validate
- name: 'Terraform Validate'
  id: validate
  run: terraform validate

# Generates an execution plan for Terraform
- name: 'Terraform Plan'
  run: terraform plan
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    var_file: |
      common.tfvars

- uses: actions/github-script@0.9.0
  if: github.event_name == 'pull_request'
  env:
    STDOUT: "```${{ steps.plan.outputs.stdout }}```"
    VARIABLE_PATH: $ {{ env.VARIABLE_PATH }}
    script: |
      github.issues.createComment({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        body: process.env.STDOUT
      })
- name: Terraform Apply
  if: github.ref == 'refs/heads/master' && github.event_name == 'push'
  run: terraform apply -auto-approve