forked from rh-mobb/terraform-aro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
212 lines (180 loc) · 5.05 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
variable "cluster_name" {
type = string
default = "my-aro-cluster"
description = "ARO cluster name"
}
variable "tags" {
type = map(string)
default = {
environment = "development"
owner = "[email protected]"
}
}
variable "location" {
type = string
default = "eastus"
description = "Azure region"
}
variable "resource_group_name" {
type = string
default = null
description = "ARO resource group name"
}
variable "aro_virtual_network_cidr_block" {
type = string
default = "10.0.0.0/20"
description = "cidr range for aro virtual network"
}
variable "aro_control_subnet_cidr_block" {
type = string
default = "10.0.0.0/23"
description = "cidr range for aro control plane subnet"
}
variable "aro_machine_subnet_cidr_block" {
type = string
default = "10.0.2.0/23"
description = "cidr range for aro machine subnet"
}
variable "aro_jumphost_subnet_cidr_block" {
type = string
default = "10.0.4.0/23"
description = "cidr range for bastion / jumphost"
}
variable "aro_firewall_subnet_cidr_block" {
type = string
default = "10.0.6.0/23"
description = "cidr range for Azure Firewall virtual network"
}
variable "aro_private_endpoint_cidr_block" {
type = string
default = "10.0.8.0/23"
description = "cidr range for Azure Firewall virtual network"
}
variable "aro_pod_cidr_block" {
type = string
default = "10.128.0.0/14"
description = "cidr range for pods within the cluster network"
}
variable "aro_service_cidr_block" {
type = string
default = "172.30.0.0/16"
description = "cidr range for services within the cluster network"
}
variable "restrict_egress_traffic" {
type = bool
default = false
description = <<EOF
Enable the Restrict Egress Traffic for Private ARO clusters.
Default "false"
EOF
}
variable "api_server_profile" {
type = string
description = <<EOF
Api Server Profile Visibility - Public or Private
Default "Public"
EOF
default = "Public"
validation {
condition = contains(["Public", "Private"], var.api_server_profile)
error_message = "Invalid 'api_server_profile'. Only 'Public' or 'Private' are allowed."
}
}
variable "ingress_profile" {
type = string
description = <<EOF
Ingress Controller Profile Visibility - Public or Private
Default "Public"
EOF
default = "Public"
validation {
condition = contains(["Public", "Private"], var.ingress_profile)
error_message = "Invalid 'ingress_profile'. Only 'Public' or 'Private' are allowed."
}
}
variable "pull_secret_path" {
type = string
default = null
description = <<EOF
Pull Secret for the ARO cluster
Default null
EOF
}
variable "aro_version" {
type = string
description = <<EOF
ARO version
Default "4.13.23"
EOF
default = "4.13.23"
}
variable "acr_private" {
type = bool
default = false
description = <<EOF
Deploy ACR for Private ARO clusters.
Default "false"
EOF
}
variable "outbound_type" {
type = string
description = <<EOF
Outbound Type - Loadbalancer or UserDefinedRouting
Default "Loadbalancer"
EOF
default = "Loadbalancer"
validation {
condition = contains(["Loadbalancer", "UserDefinedRouting"], var.outbound_type)
error_message = "Invalid 'outbound_type'. Only 'Loadbalancer' or 'UserDefinedRouting' are allowed."
}
}
variable "subscription_id" {
type = string
description = "Azure Subscription ID (needed with the new Auth method)"
}
# NOTE: this is a required input as per the new ARO provider
# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/redhat_openshift_cluster
variable "domain" {
type = string
description = "Domain for the cluster."
validation {
condition = var.domain != "" && var.domain != null
error_message = "Invalid 'domain'. Must be not be empty."
}
}
variable "main_vm_size" {
type = string
description = "VM size for the main, control plane VMs."
default = "Standard_D8s_v3"
validation {
condition = var.main_vm_size != "" && var.main_vm_size != null
error_message = "Invalid 'main_vm_size'. Must be not be empty."
}
}
variable "worker_vm_size" {
type = string
description = "VM size for the worker VMs."
default = "Standard_D4s_v3"
validation {
condition = var.worker_vm_size != "" && var.worker_vm_size != null
error_message = "Invalid 'worker_vm_size'. Must be not be empty."
}
}
variable "worker_disk_size_gb" {
type = number
default = 128
description = "Disk size for the worker nodes."
validation {
condition = var.worker_disk_size_gb >= 128
error_message = "Invalid 'worker_disk_size_gb'. Minimum of 128GB."
}
}
variable "worker_node_count" {
type = number
default = 3
description = "Number of worker nodes."
validation {
condition = var.worker_node_count >= 3
error_message = "Invalid 'worker_node_count'. Minimum of 3."
}
}