Skip to content
Snippets Groups Projects
variables.tf 5.88 KiB
Newer Older
Rob Kooper's avatar
Rob Kooper committed
# ----------------------------------------------------------------------
# CLUSTER INFO
# ----------------------------------------------------------------------
variable "cluster_name" {
  type        = string
  description = "Desired name of new cluster"
}

variable "cluster_description" {
  type        = string
  description = "Description of new cluster"
  default     = ""
}

variable "cluster_direct_access" {
  type        = bool
  description = "Allow for direct access"
  default     = true
}

variable "cluster_machines" {
  type        = set(map(any))
  description = "machine definition"
  default     = []
Rob Kooper's avatar
Rob Kooper committed
}

Rob Kooper's avatar
Rob Kooper committed
# ----------------------------------------------------------------------
# APPLICATIONS
# ----------------------------------------------------------------------

variable "monitoring_enabled" {
  type        = bool
  description = "Enable monitoring in rancher"
  default     = true
}

variable "longhorn_enabled" {
  type        = bool
  description = "Enable longhorn storage"
  default     = true
}

variable "longhorn_replicas" {
  type        = string
  description = "Number of replicas"
  default     = 3
}

Rob Kooper's avatar
Rob Kooper committed
# ----------------------------------------------------------------------
# RANCHER
# ----------------------------------------------------------------------

variable "rancher_url" {
  type        = string
  description = "URL where rancher runs"
  default     = "https://gonzo-rancher.ncsa.illinois.edu"
}

variable "rancher_token" {
  type        = string
  sensitive   = true
  description = "Access token for rancher, clusters are created as this user"
}

Rob Kooper's avatar
Rob Kooper committed
# curl -s https://releases.rancher.com/kontainer-driver-metadata/release-v2.6/data.json | jq -r '.K8sVersionRKESystemImages | keys'
Rob Kooper's avatar
Rob Kooper committed
variable "rke1_version" {
  type        = string
  description = "Version of rke1 to install."
Rob Kooper's avatar
Rob Kooper committed
  default     = "v1.21.14-rancher1-1"
Rob Kooper's avatar
Rob Kooper committed
}

# ----------------------------------------------------------------------
# USERS
# ----------------------------------------------------------------------

variable "admin_users" {
  type        = set(string)
  description = "List of LDAP users with admin access to cluster."
  default     = []
}

variable "admin_groups" {
  type        = set(string)
  description = "List of LDAP groups with admin access to cluster."
  default     = []
}

variable "member_users" {
  type        = set(string)
  description = "List of LDAP users with access to cluster."
  default     = []
}

variable "member_groups" {
  type        = set(string)
  description = "List of LDAP groups with access to cluster."
  default     = []
}

# ----------------------------------------------------------------------
# OPENSTACK
# ----------------------------------------------------------------------

variable "openstack_url" {
  type        = string
  description = "OpenStack URL"
Rob Kooper's avatar
Rob Kooper committed
  default     = "https://radiant.ncsa.illinois.edu"
Rob Kooper's avatar
Rob Kooper committed
}

variable "openstack_credential_id" {
  type        = string
  sensitive   = true
  description = "Openstack credentials"
}

variable "openstack_credential_secret" {
  type        = string
  sensitive   = true
  description = "Openstack credentials"
}

variable "openstack_external_net" {
  type        = string
  description = "OpenStack external network"
  default     = "ext-net"
}

Rob Kooper's avatar
Rob Kooper committed
# DEPRECATED, new key will always be created
variable "openstack_ssh_key" {
  type        = string
  description = "existing SSH key to use, leave blank for a new one"
  default     = ""
}

# DEPRECATED
variable "openstack_zone" {
  type        = string
  description = "default zone to use for openstack nodes"
  default     = "nova"
}

Rob Kooper's avatar
Rob Kooper committed
variable "openstack_security_kubernetes" {
Rob Kooper's avatar
Rob Kooper committed
  type        = map(any)
  description = "IP address to allow connections to kube api port, default is rancher nodes"
  default = {
Rob Kooper's avatar
Rob Kooper committed
    "rancher-1" : "141.142.218.167/32"
    "rancher-2" : "141.142.217.171/32"
    "rancher-3" : "141.142.217.184/32"
Rob Kooper's avatar
Rob Kooper committed
  }
}

variable "openstack_os_image" {
  type        = map(any)
  description = "Map from short OS name to image"
  default = {
    "centos" = "CentOS-7-GenericCloud-Latest"
    "ubuntu" = "Ubuntu Jammy (22.04) latest"
  }
}

# ----------------------------------------------------------------------
# OPENSTACK NODES
# ----------------------------------------------------------------------

# DEPRECATED
variable "old_hostnames" {
  type        = bool
  description = "should old hostname be used (base 0)"
  default     = false
}

# DEPRECATED
variable "os" {
  type        = string
  description = "Base image to use for the OS"
  default     = "CentOS-7-GenericCloud-Latest"
}

# DEPRECATED
variable "controlplane_count" {
  type        = string
  description = "Desired quantity of control-plane nodes"
  default     = 1
}

# DEPRECATED
variable "controlplane_flavor" {
  type        = string
  description = "Desired flavor of control-plane nodes"
  default     = "m1.medium"
}

# DEPRECATED
variable "controlplane_disksize" {
  type        = string
  description = "Desired disksize of control-plane nodes"
  default     = 40
}

# DEPRECATED
variable "worker_count" {
  type        = string
  description = "Desired quantity of worker nodes"
  default     = 1
}

# DEPRECATED
variable "worker_flavor" {
  type        = string
  description = "Desired flavor of worker nodes"
  default     = "m1.large"
}

# DEPRECATED
variable "worker_disksize" {
Rob Kooper's avatar
Rob Kooper committed
  type        = string
Rob Kooper's avatar
Rob Kooper committed
  description = "Desired disksize of worker nodes"
  default     = 40
Rob Kooper's avatar
Rob Kooper committed
# ----------------------------------------------------------------------
# NETWORKING
# ----------------------------------------------------------------------

variable "network_cidr" {
  type        = string
  description = "CIDR to be used for internal network"
  default     = "192.168.0.0/21"
}

variable "dns_servers" {
  type        = set(string)
  description = "DNS Servers"
  default     = ["141.142.2.2", "141.142.230.144"]
}

variable "floating_ip" {
  type        = string
  description = "Number of floating IP addresses available for loadbalancers"
  default     = 2
}