variable "aws_region" {
  default     = "us-east-1"
  description = "AWS region"
}

variable "environment" {
  description = "Available values:  dev, qa, prod."
  default     = "dev"
}

variable "service_name" {
  description = "Name of service"
  default     = "sagemaker_notebook"
}

variable "sagemaker_execution_role_arn" {
  description = "Sage maker execution role"
  default     = "arn:aws:iam::103233932089:role/service-role/AmazonSageMaker-ExecutionRole-20180430T180933"
}

variable "application_family" {
  default = "data-platform"
}

variable "kms_arn" {
  default = "arn:aws:kms:us-east-1:103233932089:key/fecf01a0-d3db-42c0-b869-c96f33a53d96"
}

variable "task_type" {
  default = "web_service"
}

# HTTPS listener settings
variable "https_listener_enabled" {
  description = "Whether or not HTTPS listener will be created"
  default     = true
}

variable "https_listener_port" {
  description = "Port for HTTPS listener."
  default     = "443"
}

variable "kms_alias" {
  default = "alias/dev/ml-infra/sagemaker"
}

variable "vpc_id" {
  default = "vpc-34dbfd51"
}

variable "subnet_id" {
  description = "Private Subnet ID with Internet Gateway"
  default     = "subnet-0285b8fc992cfc35a"
}

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

  default = [
    "10.30.0.0/22",
    "10.40.0.0/22",
    "192.168.32.0/24",
    "192.168.33.0/24",
    "192.168.40.0/22",
  ]
}

variable "https_listener_public_allow_cidr_blocks" {
  description = "CIDR blocks from which to allow HTTPS for public services"
  type        = list(string)
  default     = []
}

locals {
  https_listener_allow_cidr_blocks = {
    dev = concat(
      var.dev_https_listener_allow_cidr_blocks,
      var.https_listener_public_allow_cidr_blocks,
    )
  }
}