Skip to content

Commit a13f750

Browse files
Jordan-Williams2Jordan-Williams2
authored andcommitted
fix: remove old params and fix hooks
1 parent 985a22b commit a13f750

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

cluster.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,15 @@ resource "ibm_container_vpc_cluster" "cluster" {
8383
lookup(each.value, "kube_version", null) == "default" || lookup(each.value, "kube_version", null) == null
8484
? local.default_kube_version[each.value.kube_type] : each.value.kube_version
8585
)
86-
tags = var.tags
87-
wait_till = var.wait_till
88-
entitlement = each.value.entitlement
89-
secondary_storage = each.value.secondary_storage
90-
cos_instance_crn = each.value.cos_instance_crn
91-
pod_subnet = each.value.pod_subnet
92-
service_subnet = each.value.service_subnet
93-
disable_outbound_traffic_protection = each.value.disable_outbound_traffic_protection
86+
tags = var.tags
87+
wait_till = var.wait_till
88+
entitlement = each.value.entitlement
89+
secondary_storage = each.value.secondary_storage
90+
cos_instance_crn = each.value.cos_instance_crn
91+
pod_subnet = each.value.pod_subnet
92+
service_subnet = each.value.service_subnet
93+
# if kube_version is older than 4.15, default this value to null, otherwise provider will fail
94+
disable_outbound_traffic_protection = startswith((lookup(each.value, "kube_version", null) == "default" || lookup(each.value, "kube_version", null) == null ? local.default_kube_version[each.value.kube_type] : each.value.kube_version), "4.14") ? null : each.value.disable_outbound_traffic_protection
9495
force_delete_storage = each.value.cluster_force_delete_storage
9596
operating_system = each.value.operating_system
9697
crk = each.value.boot_volume_crk_name == null ? null : regex("key:(.*)", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]
@@ -295,7 +296,6 @@ module "cluster" {
295296
existing_cos_id = each.value.cos_instance_crn
296297
disable_public_endpoint = coalesce(each.value.disable_public_endpoint, true) # disable if not set or null
297298
verify_worker_network_readiness = each.value.verify_cluster_network_readiness
298-
cluster_config_endpoint_type = each.value.use_ibm_cloud_private_api_endpoints ? "private" : "default"
299299
addons = { for addon_name, addon_version in each.value.addons : addon_name => { version = addon_version } if addon_version != null }
300300
enable_ocp_console = each.value.enable_ocp_console
301301
manage_all_addons = each.value.manage_all_addons

ibm_catalog.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@
11431143
"key": "kube_version",
11441144
"type": "string",
11451145
"required": true,
1146-
"default_value": "4.18_openshift",
1146+
"default_value": "4.19_openshift",
11471147
"options": [
11481148
{
11491149
"displayname": "4.15_openshift",
@@ -1451,7 +1451,7 @@
14511451
"key": "kube_version",
14521452
"type": "string",
14531453
"required": true,
1454-
"default_value": "4.18_openshift",
1454+
"default_value": "4.19_openshift",
14551455
"options": [
14561456
{
14571457
"displayname": "4.15_openshift",

patterns/roks/module/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ variable "operating_system" {
274274
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 ."
275275
default = "RHCOS"
276276
validation {
277-
error_message = "RHEL 8 (REDHAT_8_64), RHEL 9 (RHEL_9_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards."
277+
error_message = "RHEL 8 (REDHAT_8_64), RHEL 9 (RHEL_9_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS."
278278
condition = var.operating_system == "REDHAT_8_64" || var.operating_system == "RHEL_9_64" || var.operating_system == "RHCOS"
279279
}
280280
}

patterns/roks/variables.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@ variable "kube_version" {
205205
var.kube_version == "4.17_openshift",
206206
var.kube_version == "4.16_openshift",
207207
var.kube_version == "4.15_openshift",
208+
var.kube_version == "4.14_openshift",
208209
])
209-
error_message = "The kube_version value can currently only be '4.19_openshift', '4.18_openshift', '4.17_openshift', '4.16_openshift', or '4.15_openshift'"
210+
error_message = "The kube_version value can currently only be '4.19_openshift', '4.18_openshift', '4.17_openshift', '4.16_openshift', '4.15_openshift', or '4.14_openshift'"
210211
}
211212
}
212213

@@ -293,7 +294,7 @@ variable "operating_system" {
293294
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 ."
294295
default = "RHCOS"
295296
validation {
296-
error_message = "RHEL 8 (REDHAT_8_64), RHEL 9 (RHEL_9_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards."
297+
error_message = "RHEL 8 (REDHAT_8_64), RHEL 9 (RHEL_9_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS."
297298
condition = var.operating_system == "REDHAT_8_64" || var.operating_system == "RHEL_9_64" || var.operating_system == "RHCOS"
298299
}
299300
}

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ variable "clusters" {
10151015

10161016
# operating_system validation
10171017
validation {
1018-
error_message = "RHEL 8 (REDHAT_8_64), RHEL 9 (RHEL_9_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards."
1018+
error_message = "RHEL 8 (REDHAT_8_64), RHEL 9 (RHEL_9_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS."
10191019
condition = length([for cluster in var.clusters : true if cluster.operating_system == null || cluster.operating_system == "REDHAT_8_64" || cluster.operating_system == "RHEL_9_64" || cluster.operating_system == "RHCOS"]) == length(var.clusters)
10201020
}
10211021

0 commit comments

Comments
 (0)