Skip to content

Commit

Permalink
feat: added support to specify the worker node operating system using…
Browse files Browse the repository at this point in the history
… new input variable `operating_system` (#436)
  • Loading branch information
Khuzaima05 authored Jun 6, 2024
1 parent 35ab51c commit cb1b819
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ Optionally, you need the following permissions to attach Access Management tags
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_region"></a> [region](#input\_region) | The IBM Cloud region where the cluster will be provisioned. | `string` | n/a | yes |
| <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 |
| <a name="input_tags"></a> [tags](#input\_tags) | Metadata labels describing this cluster deployment, i.e. test | `list(string)` | `[]` | no |
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ resource "ibm_container_vpc_cluster" "cluster" {
resource_group_id = var.resource_group_id
wait_till = var.cluster_ready_when
force_delete_storage = var.force_delete_storage
operating_system = var.operating_system
disable_public_service_endpoint = var.disable_public_endpoint
worker_labels = local.default_pool.labels
disable_outbound_traffic_protection = var.disable_outbound_traffic_protection
Expand Down Expand Up @@ -164,6 +165,7 @@ resource "ibm_container_vpc_cluster" "autoscaling_cluster" {
resource_group_id = var.resource_group_id
wait_till = var.cluster_ready_when
force_delete_storage = var.force_delete_storage
operating_system = var.operating_system
disable_public_service_endpoint = var.disable_public_endpoint
worker_labels = local.default_pool.labels
disable_outbound_traffic_protection = var.disable_outbound_traffic_protection
Expand Down
1 change: 1 addition & 0 deletions modules/fscloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ No resources.
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_region"></a> [region](#input\_region) | The IBM Cloud region where the cluster will be provisioned. | `string` | n/a | yes |
| <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 |
| <a name="input_tags"></a> [tags](#input\_tags) | Metadata labels describing this cluster deployment | `list(string)` | `[]` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/fscloud/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ module "fscloud" {
additional_lb_security_group_ids = var.additional_lb_security_group_ids
number_of_lbs = var.number_of_lbs
additional_vpe_security_group_ids = var.additional_vpe_security_group_ids
operating_system = var.operating_system
}
6 changes: 6 additions & 0 deletions modules/fscloud/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,10 @@ variable "additional_vpe_security_group_ids" {
default = {}
}

variable "operating_system" {
type = string
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 ."
default = null
}

##############################################################################
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ variable "disable_outbound_traffic_protection" {
default = false
}

variable "operating_system" {
type = string
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 ."
default = null
}

# VPC Variables
variable "vpc_id" {
type = string
Expand Down

0 comments on commit cb1b819

Please sign in to comment.