How to pass ECS ENV variables from tfvars file


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 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 file

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

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