Skip to content

Commit cb1b819

Browse files
authored
feat: added support to specify the worker node operating system using new input variable operating_system (#436)
1 parent 35ab51c commit cb1b819

File tree

6 files changed

+17
-0
lines changed

6 files changed

+17
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Optionally, you need the following permissions to attach Access Management tags
259259
| <a name="input_number_of_lbs"></a> [number\_of\_lbs](#input\_number\_of\_lbs) | The number of LBs to associated the additional\_lb\_security\_group\_names security group with. | `number` | `1` | no |
260260
| <a name="input_ocp_entitlement"></a> [ocp\_entitlement](#input\_ocp\_entitlement) | Value that is applied to the entitlements for OCP cluster provisioning | `string` | `"cloud_pak"` | no |
261261
| <a name="input_ocp_version"></a> [ocp\_version](#input\_ocp\_version) | The version of the OpenShift cluster that should be provisioned (format 4.x). If no value is specified, the current default version is used. You can also specify `default`. This input is used only during initial cluster provisioning and is ignored for updates. To prevent possible destructive changes, update the cluster version outside of Terraform. | `string` | `null` | no |
262+
| <a name="input_operating_system"></a> [operating\_system](#input\_operating\_system) | The operating system of the workers in the default worker pool. If no value is specified, the current default version OS will be used. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available . | `string` | `null` | no |
262263
| <a name="input_region"></a> [region](#input\_region) | The IBM Cloud region where the cluster will be provisioned. | `string` | n/a | yes |
263264
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | The Id of an existing IBM Cloud resource group where the cluster will be grouped. | `string` | n/a | yes |
264265
| <a name="input_tags"></a> [tags](#input\_tags) | Metadata labels describing this cluster deployment, i.e. test | `list(string)` | `[]` | no |

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ resource "ibm_container_vpc_cluster" "cluster" {
9898
resource_group_id = var.resource_group_id
9999
wait_till = var.cluster_ready_when
100100
force_delete_storage = var.force_delete_storage
101+
operating_system = var.operating_system
101102
disable_public_service_endpoint = var.disable_public_endpoint
102103
worker_labels = local.default_pool.labels
103104
disable_outbound_traffic_protection = var.disable_outbound_traffic_protection
@@ -164,6 +165,7 @@ resource "ibm_container_vpc_cluster" "autoscaling_cluster" {
164165
resource_group_id = var.resource_group_id
165166
wait_till = var.cluster_ready_when
166167
force_delete_storage = var.force_delete_storage
168+
operating_system = var.operating_system
167169
disable_public_service_endpoint = var.disable_public_endpoint
168170
worker_labels = local.default_pool.labels
169171
disable_outbound_traffic_protection = var.disable_outbound_traffic_protection

modules/fscloud/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ No resources.
4949
| <a name="input_number_of_lbs"></a> [number\_of\_lbs](#input\_number\_of\_lbs) | The number of LBs to associated the additional\_lb\_security\_group\_names security group with. | `number` | `1` | no |
5050
| <a name="input_ocp_entitlement"></a> [ocp\_entitlement](#input\_ocp\_entitlement) | Value that is applied to the entitlements for OCP cluster provisioning | `string` | `"cloud_pak"` | no |
5151
| <a name="input_ocp_version"></a> [ocp\_version](#input\_ocp\_version) | The version of the OpenShift cluster that should be provisioned (format 4.x). This is only used during initial cluster provisioning, but ignored for future updates. Supports passing the string 'default' (current IKS default recommended version). If no value is passed, it will default to 'default'. | `string` | `null` | no |
52+
| <a name="input_operating_system"></a> [operating\_system](#input\_operating\_system) | The operating system of the workers in the default worker pool. If no value is specified, the current default version OS will be used. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available . | `string` | `null` | no |
5253
| <a name="input_region"></a> [region](#input\_region) | The IBM Cloud region where the cluster will be provisioned. | `string` | n/a | yes |
5354
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | The Id of an existing IBM Cloud resource group where the cluster will be grouped. | `string` | n/a | yes |
5455
| <a name="input_tags"></a> [tags](#input\_tags) | Metadata labels describing this cluster deployment | `list(string)` | `[]` | no |

modules/fscloud/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ module "fscloud" {
3030
additional_lb_security_group_ids = var.additional_lb_security_group_ids
3131
number_of_lbs = var.number_of_lbs
3232
additional_vpe_security_group_ids = var.additional_vpe_security_group_ids
33+
operating_system = var.operating_system
3334
}

modules/fscloud/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,10 @@ variable "additional_vpe_security_group_ids" {
199199
default = {}
200200
}
201201

202+
variable "operating_system" {
203+
type = string
204+
description = "The operating system of the workers in the default worker pool. If no value is specified, the current default version OS will be used. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available ."
205+
default = null
206+
}
207+
202208
##############################################################################

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ variable "disable_outbound_traffic_protection" {
249249
default = false
250250
}
251251

252+
variable "operating_system" {
253+
type = string
254+
description = "The operating system of the workers in the default worker pool. If no value is specified, the current default version OS will be used. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available ."
255+
default = null
256+
}
257+
252258
# VPC Variables
253259
variable "vpc_id" {
254260
type = string

0 commit comments

Comments
 (0)