
variable "aws_region" {
  description = "AWS region (default eu-west-1)"
  type        = string
  default     = "eu-west-1"
}

variable "aws_access_key" {
  description = "AWS access key (default empty, to take from ~/.aws)"
  type        = string
  default     = ""
}

variable "aws_secret_key" {
  description = "AWS secret key (default empty, to take from ~/.aws)"
  type        = string
  default     = ""
}

variable "name" {
  description = "Name (kebab-case-format recommended) that will be used to prefix resource names."
  type        = string
  default     = "alex-demo-2"
}

variable "tags" {
  description = "Map of tags to be applied to all supported resources"
  type        = map(string)
  default     = {
    keep = "true"
    owner = "alex-demo"
  }
}

variable "vpc" {
  description = "VPC where web tier should be installed"
  type        = string
#  default     = "vpc-6dcb5609"
#  default     = "vpc-0f315ef0914415cac"
}

variable "subnets" {
  description = "Main subnets where web-tier should be created. Need at least two in different AZs."
  type        = list(string)
  # default     = ["subnet-4858e510", "subnet-911c72e7"]   # default vpc, eu-west-1a, eu-west-1b
}


variable "ami" {
  description = "AMI to use (Ubuntu required, eu-west-1 centos9"
  type        = string
  default     = "ami-09e310d4361a3b13a"    # centos9 - from https://wiki.centos.org/Cloud/AWS#Official_and_current_CentOS_Public_Images
  # default     = "ami-0e0669c0b39d3a79f"  # centos8
  # default     = "ami-04f5641b0d178a27a"  # centos7

  # default = "ami-05788af9005ef9a93" # 7 in west or north - from centos.org, previously used by alasdair
}

variable "ami_user" {
  description = "User to log in to the EC2 instance, usually either centos (historically) or ec2-user (for centos 9)"
  type        = string
  default     = "ec2-user"
}

variable "instance_type" {
  type    = string
  default = "t3.small"
}

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

variable "efs_dns" {
  default = ""
}

# optional (default blank is fine)

variable "alb_access_logs_s3_bucket_name" {
  type    = string
  default = ""
}

variable "alb_acm_certificate_arn" {
  type    = string
  default = ""
}

