-
Notifications
You must be signed in to change notification settings - Fork 12
/
variables.tf
276 lines (244 loc) · 7.61 KB
/
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# See https://azure.microsoft.com/en-us/global-infrastructure/regions/ for details of locatiopn
variable "location" {
description = "Region to deploy to"
default = "West Europe"
}
variable "zones" {
description = "How many zones to deploy to within the region. If this is less than 3 availability will be limited"
default = "3"
}
variable "instance_name" {
description = "Name of the deployment. Will be added to virtual machine names"
default = "icp"
}
# Default tags to apply to resources
variable "default_tags" {
description = "Map of default tags to be assign to any resource that supports it"
type = "map"
default = {
Owner = "icpuser"
Environment = "icp-test"
}
}
variable "resource_group" {
description = "Azure resource group name"
default = "icp_rg"
}
variable "resource_group_suffix" {
description = "Suffix to append to resource group name. 'random' generates a random ID."
default = "random"
}
variable "container_subnet_id" {
description = "ID of container subnet if using existing VNET. Only when var.virtual_network_name is empty "
default = ""
}
variable "vm_subnet_id" {
description = "ID of vm subnet if using existing VNET. Only when var.virtual_network_name is empty "
default = ""
}
variable "controlplane_subnet_id" {
description = "ID of controlplane subnet if using existing VNET. Only when var.virtual_network_name is empty and want control plane separate from workers"
default = ""
}
variable "virtual_network_name" {
description = "The name for the Azure virtual network. Leave blank and populate *_subnet_id to use existing Azure Virtual Network"
default = "icp_vnet"
}
variable "virtual_network_cidr" {
description = "cidr for the Azure virtual network"
default = "10.0.0.0/16"
}
variable "route_table_name" {
description = "The name for the route table."
default = "icp_route"
}
variable "subnet_name" {
description = "The subnet name"
default = "icp_subnet"
}
variable "subnet_prefix" {
description = "The address prefix to use for the VM subnet."
default = "10.0.0.0/24"
}
variable "controlplane_subnet_name" {
description = "The name of the controlplane subnet. Leave blank single subnet for cluster"
default = ""
}
variable "controlplane_subnet_prefix" {
description = "The address prefix to use if creating separate controlplane subnet."
default = ""
}
variable "storage_account_tier" {
description = "Defines the Tier of storage account to be created. Valid options are Standard and Premium."
default = "Standard"
}
variable "storage_replication_type" {
description = "Defines the Replication Type to use for this storage account. Valid options include LRS, GRS etc."
default = "LRS"
}
variable "ssh_public_key" {
description = "SSH Public Key"
default = ""
}
variable "disable_password_authentication" {
description = "Whether to enable or disable ssh password authentication for the created Azure VMs. Default: true"
default = "true"
}
variable "os_image" {
description = "Select from Ubuntu (ubuntu) or RHEL (rhel) for the Operating System"
default = "ubuntu"
}
variable "os_image_map" {
description = "os image map"
type = "map"
default = {
rhel_publisher = "RedHat"
rhel_offer = "RHEL"
rhel_sku = "7-RAW-CI"
rhel_version = "latest"
ubuntu_publisher = "Canonical"
ubuntu_offer = "UbuntuServer"
ubuntu_sku = "16.04-LTS"
ubuntu_version = "latest"
}
}
variable "admin_username" {
description = "linux vm administrator user name"
default = "vmadmin"
}
##### ICP Configurations ######
variable "network_cidr" {
description = "ICP Network CIDR for PODs"
default = "10.0.128.0/17"
}
variable "cluster_ip_range" {
description = "ICP Service Cluster IP Range"
default = "10.1.0.0/24"
}
variable "icpadmin_password" {
description = "ICP admin password"
default = ""
}
variable "icp_inception_image" {
description = "ICP Inception image to use"
default = "ibmcom/icp-inception-amd64:3.1.2-ee"
}
variable "cluster_name" {
description = "Deployment name for resources prefix"
default = "myicp"
}
# TODO: Create option to have etcd on separate VM
# TODO: Find SSD option
variable "boot" {
type = "map"
default = {
nodes = "1"
name = "bootnode"
vm_size = "Standard_A2_v2"
os_disk_type = "Standard_LRS"
os_disk_size = "100"
docker_disk_size = "100"
docker_disk_type = "StandardSSD_LRS"
enable_accelerated_networking = "false"
}
}
variable "master" {
type = "map"
default = {
nodes = "3"
name = "master"
#vm_size = "Standard_A8_v2"
# vm_size = "Standard_F16s_v2"
vm_size = "Standard_D16s_v3"
os_disk_type = "Standard_LRS"
os_disk_size = "100"
docker_disk_size = "100"
docker_disk_type = "StandardSSD_LRS"
etcd_data_size = "10"
etcd_data_type = "StandardSSD_LRS"
etcd_wal_size = "10"
etcd_wal_type = "StandardSSD_LRS"
enable_accelerated_networking = "true"
}
}
variable "proxy" {
type = "map"
default = {
nodes = "2"
name = "proxy"
vm_size = "Standard_A2_v2"
os_disk_type = "Standard_LRS"
docker_disk_size = "100"
docker_disk_type = "Standard_LRS"
enable_accelerated_networking = "false"
}
}
variable "management" {
type = "map"
default = {
nodes = "0"
name = "mgmt"
#vm_size = "Standard_A4_v2"
vm_size = "Standard_A8_v2"
os_disk_type = "Standard_LRS"
docker_disk_size = "100"
docker_disk_type = "Standard_LRS"
enable_accelerated_networking = "false"
}
}
variable "worker" {
type = "map"
default = {
nodes = "4"
name = "worker"
vm_size = "Standard_A4_v2"
os_disk_type = "Standard_LRS"
docker_disk_size = "100"
docker_disk_type = "Standard_LRS"
enable_accelerated_networking = "false"
}
}
variable "master_lb_ports" {
description = "Ports on the master load balancer to listen to"
type = "list"
default = ["8443", "8001", "8500", "8600", "4300", "9443"]
}
variable "proxy_lb_ports" {
description = "Ports on the master load balancer to listen to"
type = "list"
default = ["80", "443"]
}
## IAM options for kubelet and controller manager
variable "aadClientId" {
description = "aadClientId to be provided to kubernetes controller manager"
}
variable "aadClientSecret" {
description = "aadClientSecret to be provided to kubernetes controller manager"
}
variable "private_registry" {
description = "Private docker registry where the ICP installation image is located"
default = ""
}
variable "registry_username" {
description = "Username for the private docker restistry the ICP image will be grabbed from"
default = ""
}
variable "registry_password" {
description = "Password for the private docker restistry the ICP image will be grabbed from"
default = ""
}
variable "image_location" {
description = "Location of ICP image tarball. Assumes stored as azure blob"
default = ""
}
variable "image_location_key" {
description = "Access key to download the ICP image tarball"
default = ""
}
# The following services can be disabled for 3.1
# custom-metrics-adapter, image-security-enforcement, istio, metering, monitoring, service-catalog, storage-minio, storage-glusterfs, and vulnerability-advisor
variable "disabled_management_services" {
description = "List of management services to disable"
type = "list"
default = ["istio", "vulnerability-advisor", "storage-glusterfs", "storage-minio"]
}