##################### COMMON VARIABLES #######################
variable "account_name" {
  description = "Name of the AWS account"
  type        = string
  default     = "sme-labelcopy-schedule-prod"
}

variable "region" {
  description = "Name of the region"
  type        = string
  default     = "us-east-1"
}

variable "assume_role" {
  description = "The role used for infra changes"
  type        = string
  default     = "arn:aws:iam::476717493283:role/ccshr-eks-role"
}

variable "tags" {
  description = "A map of tags to add to all resources"
  type        = map(string)

  default = {
    Terraform     = "True"
    Business_unit = "GRPS"
    Environment   = "PROD"
    Owner         = "Richard Mayer"
    Project_code  = "2000-0497G"
    Project_name  = "GRPS"
  }
}

variable "https_port" {
  description = "HTTPS Port"
  type        = number
  default     = 443
}

##################### SECURITY GROUPS VARIABLES #######################

variable "sg_use_name_prefix" {
  description = "To use SG prefix"
  type        = bool
  default     = false
}

##################### EKS CLUSTER VARIABLES #######################

variable "addons" {
  type = list(object({
    name    = string
    version = string
  }))
  default = [
    {
      name    = "kube-proxy"
      version = "v1.32.0-eksbuild.2"
    },
    {
      name    = "vpc-cni"
      version = "v1.19.3-eksbuild.1"
    },
    {
      name    = "coredns"
      version = "v1.11.4-eksbuild.2"
    }
  ]
}

variable "enabled_cluster_log_types" {
  type    = list(string)
  default = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
}

variable "eks_version" {
  type    = string
  default = "1.32"
}

variable "eks_cluster_role_arn" {
  type    = string
  default = "arn:aws:iam::918817604416:role/lcsp-EKS-Service-Role"
}

variable "encryption_config_resources" {
  type    = list(string)
  default = ["secrets"]
}

variable "encryption_config_provider_key_arn" {
  type    = string
  default = "arn:aws:kms:us-east-1:918817604416:key/282d7bcc-b363-4ab2-bb22-cb34d194f722"
}

variable "vpc_config_endpoint_private_access" {
  type    = bool
  default = true
}

variable "vpc_config_endpoint_public_access" {
  type    = bool
  default = false
}

##################### EKS NODE GROUP VARIABLES ##################

variable "node_group_role_arn" {
  type    = string
  default = "arn:aws:iam::918817604416:role/lcsp-EKS-worker-node-Role"
}

##################### ASG LAUNCH TEMPLATE VARIABLES ################

variable "launch_template_image_id" {
  type    = string
  default = "ami-05a5cf40a35406b6c"
}

variable "launch_template_instance_type" {
  type    = string
  default = "m5.4xlarge"
}

variable "launch_template_key_name" {
  type    = string
  default = "lcsp-use1-25nov2022"
}



##################################
#         EC2_Tags      #
##################################

variable "common_tags" {
  description = "Common Tags for EC2 and can be used for other resources as well"
  type        = map(string)
  default = {
    Terraform     = "True"
    Environment   = "Prod"
    Business-Unit = "GRPS"
    Owner         = "Richard Mayer"
    Project-Code  = "2000-0497G"
    Project-Name  = "GRPS"
    OPS           = "STND"
    DATA          = "NORMAL"
  }
}

variable "lambda_functions" {
  description = "Lambda functions to monitor with CW alarms"
  type        = list(string)
  default = [
    "cloudops-iam-risk-credentia-LookupCloudTrailEvents-aNSwWZhJQ7sv",
    "cloudops-iam-risk-credentials--DeleteAccessKeyPair-qawzj5Op30sq",
    "cloudops-iam-risk-credentials-expos-NotifySecurity-NqUGuvjREKSl",
    "DeepSecuritySetup-358d91440-CreateDSMRoleLambda-GQWNXQPHH3GB",
    "LogsToElasticsearch_lcs-prod-es-use1",
    "MonitorRDSSubnetIPs"
  ]
}

variable "lambda_functions_cloudops_only" {
  description = "Lambda functions to monitor with CW alarms (cloudops.support only, no gras.techsupport)"
  type        = list(string)
  default = [
    "cloudwatch-gsirthec-sme-label-copy-schedule-prod-use1-cluster-01"
  ]
}

variable "environment" {
  description = "Environment name"
  default     = "prod"
}

variable "account_group" {
  description = "The name of the account group that the account belongs to"
  default     = "grps-p1"
}

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
  ]
}
