Merge two maps of objects with the same name

Hi there, I’m new to terraform.
I would like to somehow merge(?) two maps of objects (from 2 different files) with the same name into one map so that terraform could read maps from both files at the same time.
I have the following in my variables.tf:

variable "virtual_machines" {
  type = map(object({
    ipv4_address  = string
    cores         = number
    memory        = number
  }))
}

Then I have two files, first is instances-1.auto.tfvars

virtual_machines = {
  srv-audit-11 = {
    ipv4_address  = "172.24.29.2"
    cores         = 4
    memory        = 8192
  }
}

And another one: instances-2.auto.tfvars

virtual_machines = {
  srv-clickhouse-01 = {
    ipv4_address  = "172.24.28.3"
    cores         = 4
    memory        = 8192
  }
}

Only the first file is read when I run terraform plan, the other one seems to be ignored. Any ideas what could be wrong?
Thanks!

You can’t define the same variable twice.

You’d have to define variables of different names in different files - at which point you could merge them with Terraform’s merge() function.

However, this will limit you to having a fixed number of variables that must be predefined - there isn’t a way to load data for one variable from an arbitrary number of .tfvars files, and combine them.