How to pass ECS ENV variables from tfvars file

Hi,

I am trying to create task definition using terraform and it is working fine. Now my requirement is that we have to pass ENV variables for container from tfvars file which i am not able to figure out.
My main.tf file

resource "aws_ecs_task_definition" "airflow-tf" {
  family = "airflow-tf"
  container_definitions = jsonencode([
    {
      "name"             = "airflow"
      "image"            = "test"
      cpu                = 1
      "memory"           = 2048
      "essential"        = true
      "environment"      = var.my_env_variables
    }
])

my vars.tf file

variable "my_env_variables" {
  default = [
    {
      "name" : "test",
      "value" : "test"
    }
]
}

I don’t want to whitelist key and value in the variables.tf file. Any other way i can look into?