variable "environment" {
  description = "prod, qa or dev"
  type        = string
  default     = "dev"
}

variable "service_name" {
  description = "service name"
  type        = string
  default     = "ows-service"
}

variable "application_family" {
  type        = string
  description = "Application family to which this service belongs"
  default     = "devops"
}

variable "team_name" {
  type        = string
  description = "Name of the team that owns this service"
  default     = "devops"
}

variable "additional_tags" {
  type        = map(string)
  description = "Optional map of additional tags to set on resources. These will be combined with programmatically set required tags."
  default     = {}
}

variable "efs_performance_mode" {
  description = "The file system performance mode. Can be either generalPurpose or maxIO"
  type        = string
  default     = "generalPurpose"
}

variable "efs_throughput_mode" {
  description = "Throughput mode for the file system. Valid values: bursting, elastic, provisioned. When using provisioned, also set efs_provisioned_throughput_in_mibps"
  type        = string
  default     = "bursting"
}

variable "efs_encrypted" {
  description = "If true, the disk will be encrypted"
  type        = bool
  default     = true
}

variable "efs_transition_to_ia" {
  description = "Indicates how long it takes to transition files to the IA storage class. Valid values: AFTER_7_DAYS, AFTER_14_DAYS, AFTER_30_DAYS, AFTER_60_DAYS, or AFTER_90_DAYS."
  type        = string
  default     = ""
}

variable "efs_provisioned_throughput_in_mibps" {
  description = "The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with throughput_mode set to provisioned"
  type        = string
  default     = "100"
}

variable "efs_port" {
  description = "The port to use for NFS"
  type        = string
  default     = "2049"
}

variable "override_route53_zone_id" {
  description = "AWS Route 53 zone id to override the default zone ID"
  type        = string
  default     = null
}

variable "route53_record_creation_enabled" {
  description = "Whether or not to create Route 53 DNS records"
  type        = bool
  default     = true
}



variable "route53_ttl" {
  description = "The TTL to use for Route53 records"
  type        = string
  default     = "60"
}

variable "efs_ingress_additional_cidr_blocks" {
  description = "CIDR blocks from which to allow NFS for dev environments"
  type        = list(string)

  default = []
}

variable "owner_uid" {
  description = "The owner UID to set on the access point"
  type        = string
  default     = "1000"
}

variable "owner_gid" {
  description = "The owner GID to set on the access point"
  type        = string
  default     = "1000"
}

variable "access_point_permissions" {
  description = "The permissions to set on the access point"
  type        = string
  default     = "700"
}

variable "custom_access_point_path" {
  description = "Custom folder path for an access point"
  type        = string
  default     = ""
}

variable "vpc_id" {
  description = "The ID of the VPC to use"
  type        = string
}

variable "subnet_ids" {
  description = "The IDs of the subnets to use"
  type        = set(string)
}

variable "backup_enabled" {
  description = "Whether or not to enable backups of the filesystem"
  type        = bool
  default     = true
}

locals {
  combined_resource_tags = merge(
    {
      Name               = "${var.environment}-${var.service_name}"
      environment        = var.environment
      service_name       = var.service_name
      application_family = var.application_family
      terraformed        = true
    },
    var.additional_tags
  )
}
