variable "vpc_cidr" {
  description = "CIDR for VPC"
  default     = "10.0.0.0/16"
}

variable "vpc_private_subnets" {
  type = list(object({
    availability_zone                 = string
    cidr_block                        = string
    name                              = optional(string)
    transit_gateway_attachment_subnet = optional(bool)
  }))
  description = "List of private subnets (primary CIDR and additional CIDR blocks). Subnet CIDR is automatically matched to the appropriate CIDR block."
  default     = []
}

variable "vpc_public_subnets" {
  type = list(object({
    availability_zone = string
    cidr_block        = string
    name              = optional(string)
  }))
  description = "List of public subnets (primary CIDR and additional CIDR blocks). Subnet CIDR is automatically matched to the appropriate CIDR block."
  default     = []
}


variable "additional_cidr_blocks" {
  type = list(object({
    cidr_block = string
  }))
  description = "List of additional CIDR blocks to associate with the VPC. Subnets are defined in vpc_private_subnets and vpc_public_subnets using the cidr_block_index field."
  default     = []
}

variable "account_group" {
  description = "Account Group"
}

variable "env" {
  description = "Environment name"
  default     = "infra_test"
}

variable "custom_vpc_name" {
  type        = string
  description = "Custom VPC name; only set if name override is required"
  default     = null
}

variable "custom_elasticache_subnet_group_name" {
  type        = string
  description = "Custom Elasticache subnet group name; only set if name override is required"
  default     = null
}

variable "custom_private_subnet_prefix_list_name" {
  type        = string
  description = "Custom private subnet managed prefix list name; only set if name override is required"
  default     = null
}

variable "custom_public_subnet_prefix_list_name" {
  type        = string
  description = "Custom public subnet managed prefix list name; only set if name override is required"
  default     = null
}


variable "vpc_flow_logs" {
  description = "A map of VPC flow log names to their configuration"
  type = map(object({
    iam_role_arn         = optional(string)
    log_destination      = string
    log_destination_type = string
    traffic_type         = string
  }))
  default = {}
}

variable "resource_share_principals" {
  type        = set(string)
  description = "List of principals to share resources with using RAM"
  default = [
    "arn:aws:organizations::970903126758:ou/o-bqioddgr91/ou-ax9e-vu43qt3i", # The Orchard OU
    "arn:aws:organizations::970903126758:ou/o-bqioddgr91/ou-ax9e-ouayejxi", # Data Strategy aka GDB OU
  ]
}

# DNS firewall variables
variable "dns_firewall_rule_group_id" {
  type        = string
  description = "DNS Firewall Rule Group ID"
  default     = ""
}

variable "dns_firewall_rule_group_priority" {
  type        = number
  description = "DNS Firewall Rule Group Priority"
  default     = 101
}
