Newer
Older
# ----------------------------------------------------------------------
# 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 = []
# ----------------------------------------------------------------------
# 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
}
# ----------------------------------------------------------------------
# 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"
}
# curl -s https://releases.rancher.com/kontainer-driver-metadata/release-v2.6/data.json | jq -r '.K8sVersionRKESystemImages | keys'
variable "rke1_version" {
type = string
description = "Version of rke1 to install."
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
}
# ----------------------------------------------------------------------
# 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"
variable "openstack_region_name" {
type = string
description = "OpenStack region name"
default = "RegionOne"
}
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"
}
# 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 = ""
}
variable "openstack_zone" {
type = string
description = "default zone to use for openstack nodes"
default = "nova"
}
type = map(any)
description = "IP address to allow connections to kube api port, default is rancher nodes"
default = {
"rancher-1" : "141.142.218.167/32"
"rancher-2" : "141.142.217.171/32"
"rancher-3" : "141.142.217.184/32"
variable "openstack_security_ssh" {
type = map(any)
description = "IP address to allow connections to ssh, default is open to the world"
default = {
"world" : "0.0.0.0/0"
}
}
variable "openstack_security_custom" {
type = map(any)
description = "ports to open for custom services to the world, assumed these are blocked in other ways"
default = {
}
}
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 - will always start at 1 with cluster.json
variable "old_hostnames" {
type = bool
description = "should old hostname be used (base 0)"
default = false
}
variable "os" {
type = string
description = "Base image to use for the OS"
default = "CentOS-7-GenericCloud-Latest"
}
variable "controlplane_count" {
type = string
description = "Desired quantity of control-plane nodes"
default = 1
}
variable "controlplane_flavor" {
type = string
description = "Desired flavor of control-plane nodes"
default = "m1.medium"
}
variable "controlplane_disksize" {
type = string
description = "Desired disksize of control-plane nodes"
default = 40
}
variable "worker_count" {
type = string
description = "Desired quantity of worker nodes"
default = 1
}
variable "worker_flavor" {
type = string
description = "Desired flavor of worker nodes"
default = "m1.large"
}
description = "Desired disksize of worker nodes"
default = 40
# ----------------------------------------------------------------------
# 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
}
# ----------------------------------------------------------------------
# NODE CREATION OPTIONS
# ----------------------------------------------------------------------
variable "ncsa_security" {
type = bool
description = "Install NCSA security options, for example rsyslog"
default = false
}
variable "taiga_enabled" {
type = bool
description = "Enable Taiga mount"
default = true
}
variable "install_docker" {
type = bool
description = "Install Docker when provisioning node"
default = true
}