-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathvariables.tf
346 lines (288 loc) · 14 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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
variable "cluster_name" {
type = string
description = "Name of the cluster. After the creation of the resource, it is not possible to update the attribute value."
}
variable "aws_billing_account_id" {
type = string
default = null
description = "The AWS billing account identifier where all resources are billed. If no information is provided, the data will be retrieved from the currently connected account."
}
variable "openshift_version" {
type = string
description = "Desired version of OpenShift for the cluster, for example '4.1.0'. If version is greater than the currently running version, an upgrade will be scheduled."
}
variable "oidc_config_id" {
type = string
default = null
description = "The unique identifier associated with users authenticated through OpenID Connect (OIDC) within the ROSA cluster. If create_oidc is false this attribute is required."
}
variable "aws_subnet_ids" {
type = list(string)
description = "The Subnet IDs to use when installing the cluster."
nullable = false
}
variable "kms_key_arn" {
type = string
default = null
description = "The key ARN is the Amazon Resource Name (ARN) of a CMK. It is a unique, fully qualified identifier for the CMK. A key ARN includes the AWS account, Region, and the key ID."
}
variable "etcd_kms_key_arn" {
type = string
default = null
description = "The key ARN is the Amazon Resource Name (ARN) of a CMK. It is a unique, fully qualified identifier for the CMK. A key ARN includes the AWS account, Region, and the key ID."
}
variable "private" {
type = bool
default = false
nullable = false
description = "Restrict master API endpoint and application routes to direct, private connectivity. (default: false)"
}
variable "machine_cidr" {
type = string
default = null
description = "Block of IP addresses used by OpenShift while installing the cluster, for example \"10.0.0.0/16\"."
}
variable "service_cidr" {
type = string
default = null
description = "Block of IP addresses for services, for example \"172.30.0.0/16\"."
}
variable "pod_cidr" {
type = string
default = null
description = "Block of IP addresses from which Pod IP addresses are allocated, for example \"10.128.0.0/14\"."
}
variable "host_prefix" {
type = number
default = null
description = "Subnet prefix length to assign to each individual node. For example, if host prefix is set to \"23\", then each node is assigned a /23 subnet out of the given CIDR."
}
variable "create_admin_user" {
type = bool
default = null
description = "To create cluster admin user with default username `cluster-admin` and generated password. It will be ignored if `admin_credentials_username` or `admin_credentials_password` is set. (default: false)"
}
variable "admin_credentials_username" {
type = string
default = null
description = "Admin username that is created with the cluster. auto generated username - \"cluster-admin\""
}
variable "admin_credentials_password" {
type = string
default = null
description = "Admin password that is created with the cluster. The password must contain at least 14 characters (ASCII-standard) without whitespaces including uppercase letters, lowercase letters, and numbers or symbols."
sensitive = true
}
variable "ec2_metadata_http_tokens" {
type = string
default = "optional"
description = "Should cluster nodes use both v1 and v2 endpoints or just v2 endpoint of EC2 Instance Metadata Service (IMDS). Available since OpenShift 4.11.0."
}
##############################################################
# Proxy variables
##############################################################
variable "http_proxy" {
type = string
default = null
description = "A proxy URL to use for creating HTTP connections outside the cluster. The URL scheme must be http."
}
variable "https_proxy" {
type = string
default = null
description = "A proxy URL to use for creating HTTPS connections outside the cluster."
}
variable "no_proxy" {
type = string
default = null
description = "A comma-separated list of destination domain names, domains, IP addresses or other network CIDRs to exclude proxying."
}
variable "additional_trust_bundle" {
type = string
default = null
description = "A string containing a PEM-encoded X.509 certificate bundle that will be added to the nodes' trusted certificate store."
}
##############################################################
# Optional properties and tags
##############################################################
variable "properties" {
description = "User defined properties."
type = map(string)
default = null
}
variable "tags" {
description = "Apply user defined tags to all cluster resources created in AWS. After the creation of the cluster is completed, it is not possible to update this attribute."
type = map(string)
default = null
}
##############################################################
# Optional ROSA Cluster Installation flags
##############################################################
variable "wait_for_create_complete" {
type = bool
default = true
description = "Wait until the cluster is either in a ready state or in an error state. The waiter has a timeout of 20 minutes. (default: true)"
}
variable "wait_for_std_compute_nodes_complete" {
type = bool
default = true
description = "Wait until the initial set of machine pools to be available. The waiter has a timeout of 60 minutes. (default: true)"
}
variable "etcd_encryption" {
type = bool
default = null
description = "Add etcd encryption. By default etcd data is encrypted at rest. This option configures etcd encryption on top of existing storage encryption."
}
variable "disable_waiting_in_destroy" {
type = bool
default = null
description = "Disable addressing cluster state in the destroy resource. Default value is false, and so a `destroy` will wait for the cluster to be deleted."
}
variable "destroy_timeout" {
type = number
default = null
description = "Maximum duration in minutes to allow for destroying resources. (Default: 60 minutes)"
}
variable "upgrade_acknowledgements_for" {
type = string
default = null
description = "Indicates acknowledgement of agreements required to upgrade the cluster version between minor versions (e.g. a value of \"4.12\" indicates acknowledgement of any agreements required to upgrade to OpenShift 4.12.z from 4.11 or before)."
}
##############################################################
# Default Machine Pool Variables
# These attributes specifically apply to the default Machine Pool and become irrelevant once the resource is created.
# Any modifications to the default Machine Pool should be made through the Terraform imported Machine Pool resource.
##############################################################
variable "replicas" {
type = number
default = null
description = "Number of worker nodes to provision. This attribute is applicable solely when autoscaling is disabled. Single zone clusters need at least 2 nodes, multizone clusters need at least 3 nodes. Hosted clusters require that the number of worker nodes be a multiple of the number of private subnets. (default: 2)"
}
variable "compute_machine_type" {
type = string
default = null
description = "Identifies the Instance type used by the default worker machine pool e.g. `m5.xlarge`. Use the `rhcs_machine_types` data source to find the possible values."
}
variable "aws_availability_zones" {
type = list(string)
default = []
description = "The AWS availability zones where instances of the default worker machine pool are deployed. Leave empty for the installer to pick availability zones"
}
variable "aws_additional_compute_security_group_ids" {
type = list(string)
default = null
description = "The additional security group IDs to be added to the default worker machine pool."
}
##############################################################
# Autoscaler resource variables
##############################################################
variable "cluster_autoscaler_enabled" {
type = bool
default = false
description = "Enable Autoscaler for this cluster. This resource is currently unavailable and using will result in error 'Autoscaler configuration is not available'"
}
variable "autoscaler_max_pod_grace_period" {
type = number
default = null
description = "Gives pods graceful termination time before scaling down."
}
variable "autoscaler_pod_priority_threshold" {
type = number
default = null
description = "To allow users to schedule 'best-effort' pods, which shouldn't trigger Cluster Autoscaler actions, but only run when there are spare resources available."
}
variable "autoscaler_max_node_provision_time" {
type = string
default = null
description = "Maximum time cluster-autoscaler waits for node to be provisioned."
}
variable "autoscaler_max_nodes_total" {
type = number
default = null
description = "Maximum number of nodes in all node groups. Cluster autoscaler will not grow the cluster beyond this number."
}
##############################################################
# default_ingress resource variables
##############################################################
variable "default_ingress_listening_method" {
type = string
default = ""
description = "Listening Method for ingress. Options are [\"internal\", \"external\"]. Default is \"external\". When empty is set based on private variable."
}
##############################################################
# General variables
# Relevant to "account roles", "operator roles" and "OIDC"
##############################################################
variable "path" {
type = string
default = "/"
description = "The arn path for the account/operator roles as well as their policies. Must begin and end with '/'."
}
variable "permissions_boundary" {
type = string
default = ""
description = "The ARN of the policy that is used to set the permissions boundary for the IAM roles in STS clusters."
}
##############################################################
# Account Roles
##############################################################
variable "create_account_roles" {
type = bool
default = false
description = "Create the aws account roles for rosa"
}
variable "account_role_prefix" {
type = string
default = null
description = "User-defined prefix for all generated AWS resources (default \"account-role-<random>\")"
}
##############################################################
# OIDC provider and config
##############################################################
variable "create_oidc" {
description = "Create the oidc resources. This value should not be updated, please create a new resource instead or utilize the submodule to create a new oidc config"
type = bool
default = false
}
variable "managed_oidc" {
description = "OIDC type managed or unmanaged oidc. Only active when create_oidc also enabled. This value should not be updated, please create a new resource instead"
type = bool
default = true
}
##############################################################
# Operator policies and roles
##############################################################
variable "create_operator_roles" {
description = "Create the aws account roles for rosa"
type = bool
default = false
}
variable "operator_role_prefix" {
type = string
default = null
description = "User-defined prefix for generated AWS operator policies. Use \"account-role-prefix\" in case no value provided."
}
variable "oidc_endpoint_url" {
type = string
default = null
description = "Registered OIDC configuration issuer URL, added as the trusted relationship to the operator roles. Valid only when create_oidc is false."
}
variable "machine_pools" {
type = map(any)
default = {}
description = "Provides a generic approach to add multiple machine pools after the creation of the cluster. This variable allows users to specify configurations for multiple machine pools in a flexible and customizable manner, facilitating the management of resources post-cluster deployment. For additional details regarding the variables utilized, refer to the [machine-pool sub-module](./modules/machine-pool). For non-primitive variables (such as maps, lists, and objects), supply the JSON-encoded string."
}
variable "identity_providers" {
type = map(any)
default = {}
description = "Provides a generic approach to add multiple identity providers after the creation of the cluster. This variable allows users to specify configurations for multiple identity providers in a flexible and customizable manner, facilitating the management of resources post-cluster deployment. For additional details regarding the variables utilized, refer to the [idp sub-module](./modules/idp). For non-primitive variables (such as maps, lists, and objects), supply the JSON-encoded string."
}
variable "kubelet_configs" {
type = map(any)
default = {}
description = "Provides a generic approach to add multiple kubelet configs after the creation of the cluster. This variable allows users to specify configurations for multiple kubelet configs in a flexible and customizable manner, facilitating the management of resources post-cluster deployment. For additional details regarding the variables utilized, refer to the [idp sub-module](./modules/kubelet-configs). For non-primitive variables (such as maps, lists, and objects), supply the JSON-encoded string."
}
variable "ignore_machine_pools_deletion_error" {
type = bool
default = false
description = "Ignore machine pool deletion error. Assists when cluster resource is managed within the same file for the destroy use case"
}