##################################
#         S3 Variables           #
##################################

variable "assume_role" {
  description = "The role used for infra changes"
  type        = string
  default     = "arn:aws:iam::662302927201:role/AnsibleAWSServiceAccess-SWBRD-D"
}

variable "block_public_acls" {
  description = "To block S3 public acls"
  type        = bool
  default     = true
}

variable "ignore_public_acls" {
  description = "To ignore any public acls"
  type        = bool
  default     = true
}

variable "restrict_public_buckets" {
  description = "To Restrict public buckets"
  type        = bool
  default     = true
}

variable "block_public_policy" {
  description = "To block public bucket policy"
  type        = bool
  default     = true
}

variable "force_destroy" {
  description = "To delete the bucket by force"
  type        = bool
  default     = true
}

variable "attach_policy" {
  description = "To add additional bucket policy"
  type        = bool
  default     = true
}

variable "attach_deny_insecure_transport_policy" {
  description = "To add TLS insecure policy"
  type        = bool
  default     = true
}

variable "attach_require_latest_tls_policy" {
  description = "To add latest TLS insecure policy"
  type        = bool
  default     = false
}

variable "s3_acl" {
  description = "S3 acl type"
  type        = string
  default     = "private"
}

variable "server_side_encryption_configuration" {
  description = "SSE config"
  default = {
    rule = {
      bucket_key_enabled = false
      apply_server_side_encryption_by_default = {
        kms_master_key_id = ""
        sse_algorithm     = "AES256"
      }
    }
  }
}

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

  default = {
    Terraform     = "True"
    Business-Unit = "Digital-Supply-Chain"
    Environment   = "dev"
    Owner         = "Robert Dewilder"
    Project-Code  = "Switchboard"
    Project-Name  = "Switchboard"
  }
}

##################################
#     API Gateway Variables      #
##################################

variable "lambda_function_name" {
  description = "Name of the Lambda function to integrate with API Gateway"
  type        = string
  default     = "dspVisualizer"
}

variable "account_id" {
  description = "AWS Account ID"
  type        = string
  default     = "662302927201"
}

variable "region" {
  description = "AWS Region"
  type        = string
  default     = "eu-central-1"
}


##################################
#     Lambda Variables           #
##################################

variable "lambda_handler" {
  description = "Lambda function handler"
  type        = string
  default     = "index.handler"
}

variable "lambda_runtime" {
  description = "Lambda function runtime"
  type        = string
  default     = "nodejs18.x"
}

variable "lambda_timeout" {
  description = "Lambda function timeout in seconds"
  type        = number
  default     = 30
}

variable "lambda_memory_size" {
  description = "Lambda function memory size in MB"
  type        = number
  default     = 128
}

variable "lambda_log_retention_days" {
  description = "CloudWatch Logs retention in days"
  type        = number
  default     = 30
}

variable "lambda_environment_variables" {
  description = "Environment variables for Lambda function"
  type        = map(string)
  default = {
    ENVIRONMENT = "dev"
    PROJECT     = "DSP_VISUALIZER"
  }
}