From 46f252126f7c6fdefffe850620ad67405f8bcf44 Mon Sep 17 00:00:00 2001 From: "aashiq.jacob@ibm.com" Date: Wed, 23 Oct 2024 20:43:53 +0530 Subject: [PATCH 1/5] fix: missing os in override json --- examples/override-example/override.json | 1 + patterns/roks/override.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/override-example/override.json b/examples/override-example/override.json index 6b13e59b9..ba918e3bf 100644 --- a/examples/override-example/override.json +++ b/examples/override-example/override.json @@ -18,6 +18,7 @@ "name": "workload-cluster", "secondary_storage": "300gb.5iops-tier", "resource_group": "slz-workload-rg", + "operating_system": "REDHAT_8_64", "use_ibm_cloud_private_api_endpoints": false, "verify_cluster_network_readiness": false, "kms_config": { diff --git a/patterns/roks/override.json b/patterns/roks/override.json index 2df034350..7818d5f58 100644 --- a/patterns/roks/override.json +++ b/patterns/roks/override.json @@ -16,7 +16,7 @@ "resource_group": "slz-management-rg", "disable_outbound_traffic_protection": false, "cluster_force_delete_storage": false, - "operating_system": null, + "operating_system": "REDHAT_8_64", "kms_wait_for_apply": true, "kms_config": { "crk_name": "slz-roks-key", @@ -53,6 +53,7 @@ "machine_type": "bx2.16x64", "name": "workload-cluster", "resource_group": "slz-workload-rg", + "operating_system": "REDHAT_8_64", "disable_outbound_traffic_protection": false, "cluster_force_delete_storage": false, "kms_wait_for_apply": true, @@ -222,7 +223,7 @@ ], "security_groups": [], "service_endpoints": "public-and-private", - "existing_vpc_cbr_zone_id" : null, + "existing_vpc_cbr_zone_id": null, "ssh_keys": [], "transit_gateway_connections": [ "management", From fcc66401b21b26c263575aefe5b46dc8fa7bdb4c Mon Sep 17 00:00:00 2001 From: "aashiq.jacob@ibm.com" Date: Wed, 23 Oct 2024 21:01:08 +0530 Subject: [PATCH 2/5] remove default value --- README.md | 2 +- patterns/mixed/config.tf | 1 + patterns/roks/module/variables.tf | 3 +-- patterns/roks/variables.tf | 3 +-- tests/pr_test.go | 1 + variables.tf | 26 +++++++++++++------------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8ac1018b1..b008af933 100644 --- a/README.md +++ b/README.md @@ -911,7 +911,7 @@ module "cluster_pattern" { |------|-------------|------|---------|:--------:| | [appid](#input\_appid) | The App ID instance to be used for the teleport vsi deployments |
object({
name = optional(string)
resource_group = optional(string)
use_data = optional(bool)
keys = optional(list(string))
use_appid = bool
})
|
{
"use_appid": false
}
| no | | [atracker](#input\_atracker) | atracker variables |
object({
resource_group = string
receive_global_events = bool
collector_bucket_name = string
add_route = bool
})
| n/a | yes | -| [clusters](#input\_clusters) | A list describing clusters workloads to create |
list(
object({
name = string # Name of Cluster
vpc_name = string # Name of VPC
subnet_names = list(string) # List of vpc subnets for cluster
workers_per_subnet = number # Worker nodes per subnet.
machine_type = string # Worker node flavor
kube_type = string # iks or openshift
kube_version = optional(string) # Can be a version from `ibmcloud ks versions` or `default`
entitlement = optional(string) # entitlement option for openshift
secondary_storage = optional(string) # Secondary storage type
pod_subnet = optional(string) # Portable subnet for pods
service_subnet = optional(string) # Portable subnet for services
resource_group = string # Resource Group used for cluster
cos_name = optional(string) # Name of COS instance Required only for OpenShift clusters
access_tags = optional(list(string), [])
boot_volume_crk_name = optional(string) # Boot volume encryption key name
disable_public_endpoint = optional(bool, true) # disable cluster public, leaving only private endpoint
disable_outbound_traffic_protection = optional(bool, false) # public outbound access from the cluster workers
cluster_force_delete_storage = optional(bool, false) # force the removal of persistent storage associated with the cluster during cluster deletion
operating_system = optional(string, null) #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 .
kms_wait_for_apply = optional(bool, true) # make terraform wait until KMS is applied to master and it is ready and deployed
verify_cluster_network_readiness = optional(bool, true) # Flag to run a script will run kubectl commands to verify that all worker nodes can communicate successfully with the master. If the runtime does not have access to the kube cluster to run kubectl commands, this should be set to false.
use_ibm_cloud_private_api_endpoints = optional(bool, true) # Flag to force all cluster related api calls to use the IBM Cloud private endpoints.
import_default_worker_pool_on_create = optional(bool) # (Advanced users) Whether to handle the default worker pool as a stand-alone ibm_container_vpc_worker_pool resource on cluster creation. Only set to false if you understand the implications of managing the default worker pool as part of the cluster resource. Set to true to import the default worker pool as a separate resource. Set to false to manage the default worker pool as part of the cluster resource.
allow_default_worker_pool_replacement = optional(bool) # (Advanced users) Set to true to allow the module to recreate a default worker pool. Only use in the case where you are getting an error indicating that the default worker pool cannot be replaced on apply. Once the default worker pool is handled as a stand-alone ibm_container_vpc_worker_pool, if you wish to make any change to the default worker pool which requires the re-creation of the default pool set this variable to true
labels = optional(map(string)) # A list of labels that you want to add to the default worker pool.
addons = optional(object({ # Map of OCP cluster add-on versions to install
debug-tool = optional(string)
image-key-synchronizer = optional(string)
openshift-data-foundation = optional(string)
vpc-file-csi-driver = optional(string)
static-route = optional(string)
cluster-autoscaler = optional(string)
vpc-block-csi-driver = optional(string)
ibm-storage-operator = optional(string)
}), {})
manage_all_addons = optional(bool, false) # Instructs Terraform to manage all cluster addons, even if addons were installed outside of the module. If set to 'true' this module will destroy any addons that were installed by other sources.
kms_config = optional(
object({
crk_name = string # Name of key
private_endpoint = optional(bool) # Private endpoint
})
)
worker_pools = optional(
list(
object({
name = string # Worker pool name
vpc_name = string # VPC name
workers_per_subnet = number # Worker nodes per subnet
flavor = string # Worker node flavor
subnet_names = list(string) # List of vpc subnets for worker pool
entitlement = optional(string) # entitlement option for openshift
secondary_storage = optional(string) # Secondary storage type
boot_volume_crk_name = optional(string) # Boot volume encryption key name
operating_system = string # The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available .
labels = optional(map(string)) # A list of labels that you want to add to all the worker nodes in the worker pool.
})
)
)
})
)
| n/a | yes | +| [clusters](#input\_clusters) | A list describing clusters workloads to create |
list(
object({
name = string # Name of Cluster
vpc_name = string # Name of VPC
subnet_names = list(string) # List of vpc subnets for cluster
workers_per_subnet = number # Worker nodes per subnet.
machine_type = string # Worker node flavor
kube_type = string # iks or openshift
kube_version = optional(string) # Can be a version from `ibmcloud ks versions` or `default`
entitlement = optional(string) # entitlement option for openshift
secondary_storage = optional(string) # Secondary storage type
pod_subnet = optional(string) # Portable subnet for pods
service_subnet = optional(string) # Portable subnet for services
resource_group = string # Resource Group used for cluster
cos_name = optional(string) # Name of COS instance Required only for OpenShift clusters
access_tags = optional(list(string), [])
boot_volume_crk_name = optional(string) # Boot volume encryption key name
disable_public_endpoint = optional(bool, true) # disable cluster public, leaving only private endpoint
disable_outbound_traffic_protection = optional(bool, false) # public outbound access from the cluster workers
cluster_force_delete_storage = optional(bool, false) # force the removal of persistent storage associated with the cluster during cluster deletion
operating_system = string # The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available .
kms_wait_for_apply = optional(bool, true) # make terraform wait until KMS is applied to master and it is ready and deployed
verify_cluster_network_readiness = optional(bool, true) # Flag to run a script will run kubectl commands to verify that all worker nodes can communicate successfully with the master. If the runtime does not have access to the kube cluster to run kubectl commands, this should be set to false.
use_ibm_cloud_private_api_endpoints = optional(bool, true) # Flag to force all cluster related api calls to use the IBM Cloud private endpoints.
import_default_worker_pool_on_create = optional(bool) # (Advanced users) Whether to handle the default worker pool as a stand-alone ibm_container_vpc_worker_pool resource on cluster creation. Only set to false if you understand the implications of managing the default worker pool as part of the cluster resource. Set to true to import the default worker pool as a separate resource. Set to false to manage the default worker pool as part of the cluster resource.
allow_default_worker_pool_replacement = optional(bool) # (Advanced users) Set to true to allow the module to recreate a default worker pool. Only use in the case where you are getting an error indicating that the default worker pool cannot be replaced on apply. Once the default worker pool is handled as a stand-alone ibm_container_vpc_worker_pool, if you wish to make any change to the default worker pool which requires the re-creation of the default pool set this variable to true
labels = optional(map(string)) # A list of labels that you want to add to the default worker pool.
addons = optional(object({ # Map of OCP cluster add-on versions to install
debug-tool = optional(string)
image-key-synchronizer = optional(string)
openshift-data-foundation = optional(string)
vpc-file-csi-driver = optional(string)
static-route = optional(string)
cluster-autoscaler = optional(string)
vpc-block-csi-driver = optional(string)
ibm-storage-operator = optional(string)
}), {})
manage_all_addons = optional(bool, false) # Instructs Terraform to manage all cluster addons, even if addons were installed outside of the module. If set to 'true' this module will destroy any addons that were installed by other sources.
kms_config = optional(
object({
crk_name = string # Name of key
private_endpoint = optional(bool) # Private endpoint
})
)
worker_pools = optional(
list(
object({
name = string # Worker pool name
vpc_name = string # VPC name
workers_per_subnet = number # Worker nodes per subnet
flavor = string # Worker node flavor
subnet_names = list(string) # List of vpc subnets for worker pool
entitlement = optional(string) # entitlement option for openshift
secondary_storage = optional(string) # Secondary storage type
boot_volume_crk_name = optional(string) # Boot volume encryption key name
operating_system = string # The operating system of the workers in the worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available .
labels = optional(map(string)) # A list of labels that you want to add to all the worker nodes in the worker pool.
})
)
)
})
)
| n/a | yes | | [cos](#input\_cos) | Object describing the cloud object storage instance, buckets, and keys. Set `use_data` to false to create instance |
list(
object({
name = string
use_data = optional(bool)
resource_group = string
plan = optional(string)
random_suffix = optional(bool) # Use a random suffix for COS instance
access_tags = optional(list(string), [])
skip_kms_s2s_auth_policy = optional(bool, false) # skip auth policy between this instance and kms instance, useful if existing resources are used
skip_flowlogs_s2s_auth_policy = optional(bool, false) # skip auth policy between flow logs service and this instance, set to true if this policy is already in place on account
skip_atracker_s2s_auth_policy = optional(bool, false) # skip auth policyt between atracker service and this instance, set to true if this is existing recipient of atracker already
buckets = list(object({
name = string
storage_class = string
endpoint_type = string
force_delete = bool
single_site_location = optional(string)
region_location = optional(string)
cross_region_location = optional(string)
kms_key = optional(string)
access_tags = optional(list(string), [])
allowed_ip = optional(list(string), [])
hard_quota = optional(number)
archive_rule = optional(object({
days = number
enable = bool
rule_id = optional(string)
type = string
}))
expire_rule = optional(object({
days = optional(number)
date = optional(string)
enable = bool
expired_object_delete_marker = optional(string)
prefix = optional(string)
rule_id = optional(string)
}))
activity_tracking = optional(object({
activity_tracker_crn = string
read_data_events = bool
write_data_events = bool
management_events = bool
}))
metrics_monitoring = optional(object({
metrics_monitoring_crn = string
request_metrics_enabled = optional(bool)
usage_metrics_enabled = optional(bool)
}))
}))
keys = optional(
list(object({
name = string
role = string
enable_HMAC = bool
}))
)

})
)
| n/a | yes | | [enable\_transit\_gateway](#input\_enable\_transit\_gateway) | Create transit gateway | `bool` | `true` | no | | [existing\_vpc\_cbr\_zone\_id](#input\_existing\_vpc\_cbr\_zone\_id) | ID of the existing CBR (Context-based restrictions) network zone, with context set to the VPC. This zone is used in a CBR rule, which allows traffic to flow only from the landing zone VPCs to specific cloud services. | `string` | `null` | no | diff --git a/patterns/mixed/config.tf b/patterns/mixed/config.tf index 69489cca2..805bf5366 100644 --- a/patterns/mixed/config.tf +++ b/patterns/mixed/config.tf @@ -120,6 +120,7 @@ locals { entitlement = var.entitlement secondary_storage = var.secondary_storage use_private_endpoint = var.use_private_endpoint + operating_system = "REDHAT_8_64" verify_worker_network_readiness = var.verify_worker_network_readiness boot_volume_crk_name = "${var.prefix}-roks-key" import_default_worker_pool_on_create = false diff --git a/patterns/roks/module/variables.tf b/patterns/roks/module/variables.tf index 2790846ae..e00fe3282 100644 --- a/patterns/roks/module/variables.tf +++ b/patterns/roks/module/variables.tf @@ -271,8 +271,7 @@ variable "cluster_force_delete_storage" { 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 = "REDHAT_8_64" + description = "The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available ." validation { error_message = "RHEL 8 (REDHAT_8_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." condition = var.operating_system == "REDHAT_8_64" || var.operating_system == "RHCOS" diff --git a/patterns/roks/variables.tf b/patterns/roks/variables.tf index 902a6cd78..356bcad1e 100644 --- a/patterns/roks/variables.tf +++ b/patterns/roks/variables.tf @@ -289,8 +289,7 @@ variable "cluster_force_delete_storage" { 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 = "REDHAT_8_64" + description = "The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available ." validation { error_message = "RHEL 8 (REDHAT_8_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." condition = var.operating_system == "REDHAT_8_64" || var.operating_system == "RHCOS" diff --git a/tests/pr_test.go b/tests/pr_test.go index 386e3bce7..1fb72cf01 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -209,6 +209,7 @@ func setupOptionsRoksPattern(t *testing.T, prefix string) *testhelper.TestOption "enable_transit_gateway": false, "use_ibm_cloud_private_api_endpoints": false, "verify_cluster_network_readiness": false, + "operating_system": "REDHAT_8_64", } return options diff --git a/variables.tf b/variables.tf index f623ee4aa..8a61892aa 100644 --- a/variables.tf +++ b/variables.tf @@ -850,18 +850,18 @@ variable "clusters" { resource_group = string # Resource Group used for cluster cos_name = optional(string) # Name of COS instance Required only for OpenShift clusters access_tags = optional(list(string), []) - boot_volume_crk_name = optional(string) # Boot volume encryption key name - disable_public_endpoint = optional(bool, true) # disable cluster public, leaving only private endpoint - disable_outbound_traffic_protection = optional(bool, false) # public outbound access from the cluster workers - cluster_force_delete_storage = optional(bool, false) # force the removal of persistent storage associated with the cluster during cluster deletion - operating_system = optional(string, null) #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 . - kms_wait_for_apply = optional(bool, true) # make terraform wait until KMS is applied to master and it is ready and deployed - verify_cluster_network_readiness = optional(bool, true) # Flag to run a script will run kubectl commands to verify that all worker nodes can communicate successfully with the master. If the runtime does not have access to the kube cluster to run kubectl commands, this should be set to false. - use_ibm_cloud_private_api_endpoints = optional(bool, true) # Flag to force all cluster related api calls to use the IBM Cloud private endpoints. - import_default_worker_pool_on_create = optional(bool) # (Advanced users) Whether to handle the default worker pool as a stand-alone ibm_container_vpc_worker_pool resource on cluster creation. Only set to false if you understand the implications of managing the default worker pool as part of the cluster resource. Set to true to import the default worker pool as a separate resource. Set to false to manage the default worker pool as part of the cluster resource. - allow_default_worker_pool_replacement = optional(bool) # (Advanced users) Set to true to allow the module to recreate a default worker pool. Only use in the case where you are getting an error indicating that the default worker pool cannot be replaced on apply. Once the default worker pool is handled as a stand-alone ibm_container_vpc_worker_pool, if you wish to make any change to the default worker pool which requires the re-creation of the default pool set this variable to true - labels = optional(map(string)) # A list of labels that you want to add to the default worker pool. - addons = optional(object({ # Map of OCP cluster add-on versions to install + boot_volume_crk_name = optional(string) # Boot volume encryption key name + disable_public_endpoint = optional(bool, true) # disable cluster public, leaving only private endpoint + disable_outbound_traffic_protection = optional(bool, false) # public outbound access from the cluster workers + cluster_force_delete_storage = optional(bool, false) # force the removal of persistent storage associated with the cluster during cluster deletion + operating_system = string # The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available . + kms_wait_for_apply = optional(bool, true) # make terraform wait until KMS is applied to master and it is ready and deployed + verify_cluster_network_readiness = optional(bool, true) # Flag to run a script will run kubectl commands to verify that all worker nodes can communicate successfully with the master. If the runtime does not have access to the kube cluster to run kubectl commands, this should be set to false. + use_ibm_cloud_private_api_endpoints = optional(bool, true) # Flag to force all cluster related api calls to use the IBM Cloud private endpoints. + import_default_worker_pool_on_create = optional(bool) # (Advanced users) Whether to handle the default worker pool as a stand-alone ibm_container_vpc_worker_pool resource on cluster creation. Only set to false if you understand the implications of managing the default worker pool as part of the cluster resource. Set to true to import the default worker pool as a separate resource. Set to false to manage the default worker pool as part of the cluster resource. + allow_default_worker_pool_replacement = optional(bool) # (Advanced users) Set to true to allow the module to recreate a default worker pool. Only use in the case where you are getting an error indicating that the default worker pool cannot be replaced on apply. Once the default worker pool is handled as a stand-alone ibm_container_vpc_worker_pool, if you wish to make any change to the default worker pool which requires the re-creation of the default pool set this variable to true + labels = optional(map(string)) # A list of labels that you want to add to the default worker pool. + addons = optional(object({ # Map of OCP cluster add-on versions to install debug-tool = optional(string) image-key-synchronizer = optional(string) openshift-data-foundation = optional(string) @@ -889,7 +889,7 @@ variable "clusters" { entitlement = optional(string) # entitlement option for openshift secondary_storage = optional(string) # Secondary storage type boot_volume_crk_name = optional(string) # Boot volume encryption key name - operating_system = string # The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available . + operating_system = string # The operating system of the workers in the worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available . labels = optional(map(string)) # A list of labels that you want to add to all the worker nodes in the worker pool. }) ) From e1a48053bb2e287c841b6601ad9abbf09aa96317 Mon Sep 17 00:00:00 2001 From: "aashiq.jacob@ibm.com" Date: Wed, 23 Oct 2024 21:33:40 +0530 Subject: [PATCH 3/5] update --- patterns/roks/module/variables.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/patterns/roks/module/variables.tf b/patterns/roks/module/variables.tf index e00fe3282..0526ebac6 100644 --- a/patterns/roks/module/variables.tf +++ b/patterns/roks/module/variables.tf @@ -272,6 +272,7 @@ variable "cluster_force_delete_storage" { variable "operating_system" { type = string description = "The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available ." + default = "REDHAT_8_64" validation { error_message = "RHEL 8 (REDHAT_8_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." condition = var.operating_system == "REDHAT_8_64" || var.operating_system == "RHCOS" From 3a3c620adc472e8bf8ea698f60511a7671c6ad2d Mon Sep 17 00:00:00 2001 From: "aashiq.jacob@ibm.com" Date: Wed, 23 Oct 2024 22:12:48 +0530 Subject: [PATCH 4/5] update cra --- cra-config.yaml | 1 + patterns/roks/catalogValidationValues.json.template | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cra-config.yaml b/cra-config.yaml index 557eade6c..e0a4e48cb 100644 --- a/cra-config.yaml +++ b/cra-config.yaml @@ -20,3 +20,4 @@ CRA_TARGETS: CRA_ENVIRONMENT_VARIABLES: TF_VAR_prefix: "slz-roks" TF_VAR_region: "us-south" + TF_VAR_operating_system: "REDHAT_8_64" diff --git a/patterns/roks/catalogValidationValues.json.template b/patterns/roks/catalogValidationValues.json.template index e8837450e..1bc6b1a55 100644 --- a/patterns/roks/catalogValidationValues.json.template +++ b/patterns/roks/catalogValidationValues.json.template @@ -5,5 +5,6 @@ "tags": $TAGS, "prefix": $PREFIX, "enable_transit_gateway": false, - "add_atracker_route": false + "add_atracker_route": false, + "operating_system": "REDHAT_8_64" } From 7480a200245d59cca6ca8d2422b1b51644444dae Mon Sep 17 00:00:00 2001 From: "aashiq.jacob@ibm.com" Date: Thu, 24 Oct 2024 10:08:37 +0530 Subject: [PATCH 5/5] revert few changes --- cra-config.yaml | 1 - patterns/roks/catalogValidationValues.json.template | 3 +-- patterns/roks/module/variables.tf | 2 +- patterns/roks/variables.tf | 3 ++- tests/pr_test.go | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cra-config.yaml b/cra-config.yaml index e0a4e48cb..557eade6c 100644 --- a/cra-config.yaml +++ b/cra-config.yaml @@ -20,4 +20,3 @@ CRA_TARGETS: CRA_ENVIRONMENT_VARIABLES: TF_VAR_prefix: "slz-roks" TF_VAR_region: "us-south" - TF_VAR_operating_system: "REDHAT_8_64" diff --git a/patterns/roks/catalogValidationValues.json.template b/patterns/roks/catalogValidationValues.json.template index 1bc6b1a55..e8837450e 100644 --- a/patterns/roks/catalogValidationValues.json.template +++ b/patterns/roks/catalogValidationValues.json.template @@ -5,6 +5,5 @@ "tags": $TAGS, "prefix": $PREFIX, "enable_transit_gateway": false, - "add_atracker_route": false, - "operating_system": "REDHAT_8_64" + "add_atracker_route": false } diff --git a/patterns/roks/module/variables.tf b/patterns/roks/module/variables.tf index 0526ebac6..2790846ae 100644 --- a/patterns/roks/module/variables.tf +++ b/patterns/roks/module/variables.tf @@ -271,7 +271,7 @@ variable "cluster_force_delete_storage" { variable "operating_system" { type = string - description = "The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available ." + 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 = "REDHAT_8_64" validation { error_message = "RHEL 8 (REDHAT_8_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." diff --git a/patterns/roks/variables.tf b/patterns/roks/variables.tf index 356bcad1e..902a6cd78 100644 --- a/patterns/roks/variables.tf +++ b/patterns/roks/variables.tf @@ -289,7 +289,8 @@ variable "cluster_force_delete_storage" { variable "operating_system" { type = string - description = "The operating system of the workers in the default worker pool. See https://cloud.ibm.com/docs/openshift?topic=openshift-openshift_versions#openshift_versions_available ." + 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 = "REDHAT_8_64" validation { error_message = "RHEL 8 (REDHAT_8_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." condition = var.operating_system == "REDHAT_8_64" || var.operating_system == "RHCOS" diff --git a/tests/pr_test.go b/tests/pr_test.go index 1fb72cf01..386e3bce7 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -209,7 +209,6 @@ func setupOptionsRoksPattern(t *testing.T, prefix string) *testhelper.TestOption "enable_transit_gateway": false, "use_ibm_cloud_private_api_endpoints": false, "verify_cluster_network_readiness": false, - "operating_system": "REDHAT_8_64", } return options