forked from gfortil/terraform-azurerm-hpcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lite-variables.tf
212 lines (184 loc) · 8.25 KB
/
lite-variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
###############################################################################
# Prompted variables (user will be asked to supply them at plan/apply time
# if a .tfvars file is not supplied); there are no default values
###############################################################################
variable "my_azure_id" {
description = "REQUIRED. The id of your azure account."
type = string
}
variable "aks_logging_monitoring_enabled" {
description = "Used to get logging and monitoring of kubernetes and hpcc cluster."
type = bool
default = false
}
variable "external_storage_desired" {
description = "If you want external storage instead of ephemeral, this should be true. For ephemeral storage this should be false"
type = bool
default = false
}
variable "enable_thor" {
description = "REQUIRED. If you want a thor cluster."
type = bool
default = true
}
variable "a_record_name" {
type = string
description = "OPTIONAL: dns zone A record name"
default = ""
}
variable "aks_admin_email" {
type = string
description = "REQUIRED. Email address of the administrator of this HPCC Systems cluster.\nExample entry: [email protected]"
validation {
condition = length(regexall("^[^@]+@[^@]+$", var.aks_admin_email)) > 0
error_message = "Value must at least look like a valid email address."
}
}
variable "aks_admin_name" {
type = string
description = "REQUIRED. Name of the administrator of this HPCC Systems cluster.\nExample entry: Jane Doe"
}
variable "admin_username" {
type = string
description = "REQUIRED. Username of the administrator of this HPCC Systems cluster.\nExample entry: jdoe"
validation {
condition = length(var.admin_username) > 1 && length(regexall(" ", var.admin_username)) == 0
error_message = "Value must at least two characters in length and contain no spaces."
}
}
variable "aks_azure_region" {
type = string
description = "REQUIRED. The Azure region abbreviation in which to create these resources.\nMust be one of [\"eastus\", \"eastus2\", \"centralus\"].\nExample entry: eastus2"
validation {
condition = contains(["eastus", "eastus2", "centralus"], var.aks_azure_region)
error_message = "Value must be one of [\"eastus\", \"eastus2\", \"centralus\"]."
}
}
variable "enable_code_security" {
description = "REQUIRED. Enable code security?\nIf true, only signed ECL code will be allowed to create embedded language functions, use PIPE(), etc.\nExample entry: false"
type = bool
default = false
}
variable "aks_enable_roxie" {
description = "REQUIRED. Enable ROXIE?\nThis will also expose port 8002 on the cluster.\nExample entry: false"
type = bool
default = false
}
variable "extra_tags" {
description = "OPTIONAL. Map of name => value tags that can will be associated with the cluster.\nFormat is '{\"name\"=\"value\" [, \"name\"=\"value\"]*}'.\nThe 'name' portion must be unique.\nTo add no tags, enter '{}'. This is OPTIONAL and defaults to an empty string map."
type = map(string)
default = {}
}
variable "aks_dns_zone_resource_group_name" {
type = string
description = "REQUIRED. Name of the resource group containing the dns zone."
}
variable "aks_dns_zone_name" {
type = string
description = "REQUIRED. dns zone name. The name of existing dns zone."
}
variable "hpcc_user_ip_cidr_list" {
description = "OPTIONAL. List of additional CIDR addresses that can access this HPCC Systems cluster.\nDefault value is '[]' which means no CIDR addresses.\nTo open to the internet, add \"0.0.0.0/0\"."
type = list(string)
default = []
}
variable "hpcc_version" {
description = "The version of HPCC Systems to install.\nOnly versions in nn.nn.nn format are supported. Default is 'latest'"
type = string
validation {
condition = (var.hpcc_version == "latest") || can(regex("^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(-rc\\d{1,3})?$", var.hpcc_version))
error_message = "Value must be 'latest' OR in nn.nn.nn format and 8.6.0 or higher."
}
default = "latest"
}
variable "aks_admin_ip_cidr_map" {
description = "OPTIONAL. Map of name => CIDR IP addresses that can administrate this AKS.\nFormat is '{\"name\"=\"cidr\" [, \"name\"=\"cidr\"]*}'.\nThe 'name' portion must be unique.\nDefault value is '{}' means no CIDR addresses.\nThe corporate network and your current IP address will be added automatically, and these addresses will have access to the HPCC cluster as a user."
type = map(string)
default = {}
}
variable "aks_max_node_count" {
type = number
description = "REQUIRED. The maximum number of VM nodes to allocate for the HPCC Systems node pool.\nMust be 2 or more."
validation {
condition = var.aks_max_node_count >= 2
error_message = "Value must be 2 or more."
}
}
variable "aks_node_size" {
type = string
description = "REQUIRED. The VM size for each node in the HPCC Systems node pool.\nRecommend \"Standard_B4ms\" or better.\nSee https://docs.microsoft.com/en-us/azure/virtual-machines/sizes-general for more information."
}
variable "storage_data_gb" {
type = number
description = "REQUIRED. The amount of storage reserved for data in gigabytes.\nMust be 10 or more.\nIf a storage account is defined (see below) then this value is ignored."
validation {
condition = var.storage_data_gb >= 10
error_message = "Value must be 10 or more."
}
default = 100
}
variable "storage_lz_gb" {
type = number
description = "REQUIRED. The amount of storage reserved for the landing zone in gigabytes.\nMust be 1 or more.\nIf a storage account is defined (see below) then this value is ignored."
validation {
condition = var.storage_lz_gb >= 1
error_message = "Value must be 1 or more."
}
default = 25
}
variable "thor_max_jobs" {
type = number
description = "REQUIRED. The maximum number of simultaneous Thor jobs allowed.\nMust be 1 or more."
validation {
condition = var.thor_max_jobs >= 1
error_message = "Value must be 1 or more."
}
default = 2
}
variable "thor_num_workers" {
type = number
description = "REQUIRED. The number of Thor workers to allocate.\nMust be 1 or more."
validation {
condition = var.thor_num_workers >= 1
error_message = "Value must be 1 or more."
}
default = 2
}
###############################################################################
# Optional variables
###############################################################################
variable "authn_htpasswd_filename" {
type = string
description = "OPTIONAL. If you would like to use htpasswd to authenticate users to the cluster, enter the filename of the htpasswd file. This file should be uploaded to the Azure 'dllsshare' file share in order for the HPCC processes to find it.\nA corollary is that persistent storage is enabled.\nAn empty string indicates that htpasswd is not to be used for authentication.\nExample entry: htpasswd.txt"
default = ""
}
variable "hpcc_namespace" {
description = "Kubernetes namespace where resources will be created."
type = object({
prefix_name = string
labels = map(string)
create_namespace = bool
})
default = {
prefix_name = "hpcc"
labels = {
name = "hpcc"
}
create_namespace = false
}
}
variable "enable_premium_storage" {
type = bool
description = "OPTIONAL. If true, premium ($$$) storage will be used for the following storage shares: Dali.\nDefaults to false."
default = false
}
variable "storage_account_name" {
type = string
description = "OPTIONAL. If you are attaching to an existing storage account, enter its name here.\nLeave blank if you do not have a storage account.\nIf you enter something here then you must also enter a resource group for the storage account.\nExample entry: my-product-sa"
default = ""
}
variable "storage_account_resource_group_name" {
type = string
description = "OPTIONAL. If you are attaching to an existing storage account, enter its resource group name here.\nLeave blank if you do not have a storage account.\nIf you enter something here then you must also enter a name for the storage account."
default = ""
}