variable "aws_region" {
  type        = string
  default     = "us-east-1"
  description = "The AWS region to create the repository in"
}

variable "environment" {
  description = "The name of the environment"
  default     = "prod"
}

variable "application_family" {
  description = "Name of application family"
  default     = "devops"
}



variable "team_name" {
  description = "Name of the team that owns this infrastructure"
  default     = "devops"
}

variable "vpc_id" {
  default = "vpc-019370c87583a0502"
}

variable "subnet_ids" {
  default = [
    "subnet-0ebc0635371a7ad3d"
  ]
}

variable "route_table_id" {
  default = "rtb-0c12488a8e665efe2"
}

variable "vpc_routing_destination_prefix_lists" {
  type        = list(string)
  description = "list of prefix lists names that should be routable from the private subnets"
  default     = []
}

variable "vpc_routing_destination_cidr_blocks" {
  type        = list(string)
  description = "list of CIDR blocks that should be routable from the selected subnets"
  default = [
    # Delphi qa, staging and prod private subnets
    "10.31.13.0/24",
    "10.31.14.0/24",
    "10.31.15.0/24",
    "10.32.13.0/24",
    "10.32.14.0/24",
    "10.32.15.0/24",
    "10.33.13.0/24",
    "10.33.14.0/24",
    "10.33.15.0/24",
  ]
}

locals {
  /* pl_internal_routes = [
    for tuple in setproduct(toset([var.route_table_id]), toset(data.aws_ec2_managed_prefix_lists.required_routes.ids)) : {
      route_table_id = tuple[0]
      prefix_list_id = tuple[1]
    }
  ] */
  cidr_internal_routes = [
    for tuple in setproduct(toset([var.route_table_id]), toset(var.vpc_routing_destination_cidr_blocks)) : {
      route_table_id = tuple[0]
      cidr           = tuple[1]
    }
  ]
}
