variable "aws_profile" {
  type        = string
  description = "The name of the AWS profile as set in the shared credentials file."
  default     = "gdb-infra-dev"
}

variable "aws_region_id" {
  type        = string
  description = "The id of the region in AWS"
  default     = "us-east-1"
}

variable "platform" {
  type = map(string)

  default = {
    name        = "Infra"
    prefix      = "dev"
    environment = "Development"
  }
}

variable "tags" {
  type = map(string)

  default = {
    name                = "Delphi"
    prefix              = "CMN"
    environment         = "Common"
    project             = "Infrastructure"
    short_project_name  = "INFRA"
    short_platform_name = "DLP"
  }
}

variable "vpc" {
  type        = map(string)
  description = "vpc attributes"

  default = {
    cidr_second_octet = "50"
  }
}

variable "public_subnets" {
  type    = list(number)
  default = [10, 11, 12]
}

variable "private_subnets" {
  type    = list(number)
  default = [13, 14, 15]
}

variable "private_db_subnets" {
  type    = list(number)
  default = [16, 17, 18]
}

variable "key_pair_name" {
  type    = string
  default = "dev-infra-default"
}

/*variable "cert_arn" {
  type    = string
  description = "SSL certificate ARN"
}

variable "delphi_zone_cert_arn" {
  type    = string
  description = "SSL certificate ARN"
}*/

variable "projectgroup_whitelist" {
  type        = list(object({ cidr = string, description = string }))
  description = "List of CIDRs which will be whitelisted in addition to standard whitelist module list"
  default     = []
}

variable "ec2_backuper" {
  description = "Object of describing EC2 Instances backup"
  type = object({
    runtime        = string,
    timeout        = string,
    s3_bucket      = string,
    s3_path        = string,
    s3_version_id  = string,
    lambda_name    = string,
    lambda_handler = string,
    description    = string,
    schedule       = string,
    environment = object({
      RETENTION_LIMIT = string
    })
  })
  default = {
    runtime        = "python3.7"
    timeout        = 60
    s3_bucket      = ""
    s3_path        = ""
    s3_version_id  = ""
    lambda_name    = "ec2backuper"
    lambda_handler = "create_ami_with_retention.lambda_handler"
    description    = "Creates AMIs of infra ec2 instances and manages images retention."
    schedule       = "rate(2 days)"
    environment = {
      RETENTION_LIMIT = ""
    }
  }
}

variable "jenkins_whitelist" {
  type        = list(object({ cidr = string, description = string }))
  description = "List of CIDRs which will be whitelisted in addition to standard whitelist module list"
  default     = []
}

variable "github_ip_addr" {
  type        = list(object({ cidr = string, description = string }))
  description = "List of Gihub ip addresses, could be checked here https://api.github.com/meta"
}

variable "jenkins_url" {
  default = "jenkins.apollo.stream"
}

variable "nexus_url" {
  default = "artifacts.apollo.stream"
}

variable "nexus_url_internal" {
  default = "artifacts-internal.delphiplatform.io"
}


variable "grafana_url_internal" {
  default = "grafana.delphiplatform.io"
  //"grafana-internal.delphiplatform.io"
}


variable "influxdb_url_internal" {
  default = "influxdb-internal.delphiplatform.io"
}

/*
variable "octopus_url" {
  default = "octopus.delphi.zone"
}

variable "octopus_internal_url" {
  default = "octopus-internal.delphi.zone"
}

variable "ec2_backuper" {
  type = object({
    runtime        = string
    timeout        = number
    s3_bucket      = string
    s3_path        = string
    s3_version_id  = string
    lambda_name    = string
    lambda_handler = string
    description    = string
    schedule       = string
    environment    = map(string)
  })
}

variable octopus_tentacles {
  type        = list(object({ cidr = string, description = string }))
  description = "List of tentacles external ip addresses"
  default     = []
}*/

variable "auth0_state_allowed_users" {
  type        = list(string)
  description = "List of the users who can decrypt Terraform state for Auth0"
  default     = []
}

variable "auth0_state_allowed_roles" {
  type        = list(string)
  description = "List of the roles who can decrypt Terraform state for Auth0"
  default     = []
}

variable "auth0_backup_allowed_users" {
  type        = list(string)
  description = "List of the users who can decrypt backups from Auth0"
  default     = []
}

variable "auth0_backup_allowed_roles" {
  type        = list(string)
  description = "List of the users who can decrypt backups from Auth0"
  default     = []
}

variable "external_https_access" {
  type        = list(object({ cidr = string, description = string }))
  description = "List of CIDRs which will be whitelisted in addition to standard whitelist module list"
  default     = []
}

variable "internal_https_access" {
  type        = list(object({ cidr = string, description = string }))
  description = "List of internal CIDRs which will be allowed by HTTPS."
  default     = []
}

variable "artistapp_team" {
  type        = list(object({ cidr = string, description = string }))
  description = "List of CIDRs which will be whitelisted in addition to standard whitelist module list"
  default     = []
}

variable "iam_users" {
  type        = map(object({ Name = string, Email = string, Groups = list(string) }))
  description = "List of users"
  default     = {}
}

variable "sentry_access_from_public_ip" {
  type        = list(object({ cidr = string, description = string }))
  description = "List of CIDRs with HTTPS access to Sentry"
  default     = []
}
