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

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

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

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

  default = {
    Terraform     = "True"
    Business_unit = "AMP-Digital-Archive"
    Environment   = "Prod"
    Owner         = "Nathaniel Lovett"
    Project_code  = "SME-AMP"
    Project_name  = "AMP"
  }
}

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::554998489284:role/ampp-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:554998489284:key/7cec5714-6f58-4878-bd6a-a54ed5be6641"
}

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::554998489284:role/ampp-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.xlarge"
}

variable "launch_template_key_name" {
  type    = string
  default = "amp-prod-12july2018"
}

##################################
#        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 = "AMP-Digital-Archive"
    Owner         = "Nathaniel Lovett"
    Project-Code  = "SME-AMP"
    Project-Name  = "AMP"
    OPS           = "STND"
    DATA          = "NORMAL"
    ME-Joined     = "NO"
  }
}
variable "environment" {
  description = "Environment name"
  default     = "prod"
}

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

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