variable "name_prefix" {
  type        = string
  description = "The prefix name of the objects"
}

variable "vpc_name" {
  type        = string
  description = "The name of vpc after the prefix. vpc by default"
  default     = "vpc"
}

variable "common_tags" {
  type        = map(string)
  description = "Common tags to add for the objects"
  default = {
    Environment = "Development"
    Scope       = "App"
  }
}

variable "cidr_second_octet" {
  type        = string
  description = "The second octet of CIDR block for the VPC."
}

variable "dns" {
  type = map(string)

  description = <<EOF
		Define DNS options
		enable_support - A boolean flag to enable/disable DNS support in the VPC. Indicates whether the DNS resolution is supported for the VPC.
		enable_hostname - A boolean flag to enable/disable DNS hostnames in the VPC. Indicates whether the instances launched in the VPC get public DNS hostnames.

EOF


  default = {
    enable_support   = true
    enable_hostnames = true
  }
}

variable "inbound_acl_rules" {
  type = list(
    object(
      {
        rule_no    = number
        action     = string
        from_port  = number
        to_port    = number
        protocol   = string
        cidr_block = string
      }
    )
  )
  description = "List of inbound ACL rules"
  default     = []
}

variable "outbound_acl_rules" {
  type = list(
    object(
      {
        rule_no    = number
        action     = string
        from_port  = number
        to_port    = number
        protocol   = string
        cidr_block = string
      }
    )
  )
  description = "List of outbound ACL rules"
  default     = []
}

variable "flow_logs" {
  type        = map(map(string))
  description = "VPC Flow logs configuration"
  default     = null
}
