How to construct this data structure and iterate to build GCP VPC subnets

I’m using this module to create my VPC on Google Cloud, with multiple subnets and secondary ranges:
I would like to put the secondary ranges value into variable ( so that I can re-use the same code on different enviroments)
I couldn’t really work out how to do that in Terraform.
I was thinking to construct my data like this :

variable "ranges" {
  default = {
    "subnet-01" = {
        "range_name"    = "subnet-01-secondary-01"
        "ip_cidr_range" = ""        
    "subnet-02" = {
        "range_name"   = "subnet-02-secondary-01"
        "ip_cidr_range" = ""        

Thank you in advanced