Skip to content

Commit 1a86108

Browse files
authored
feat: removed the update_all_workers option (#684)
1 parent 6bcc77c commit 1a86108

File tree

14 files changed

+149
-180
lines changed

14 files changed

+149
-180
lines changed

.docs/pattern-defaults.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ The following variables apply to the [mixed pattern](../patterns/mixed/) and the
4747
| flavor | string | Machine type for cluster. Use the IBM Cloud CLI command `ibmcloud ks flavors` to find valid machine types | | bx2.16x64 |
4848
| workers_per_zone | number | Number of workers in each zone of the cluster. Red Hat OpenShift requires at least two workers. | | 1 |
4949
| wait_till | string | To avoid long waiting times when you run your Terraform code, you can specify the stage when you want Terraform to mark the cluster resource creation as completed. Depending on what stage you choose, the cluster creation might not be fully completed and continues to run in the background. However, your Terraform code can continue to run without waiting for the cluster to be fully created. Supported args are `MasterNodeReady`, `OneWorkerNodeReady`, and `IngressReady` | | IngressReady |
50-
| update_all_workers | bool | Whether to update all workers to a new Kubernetes version | | false |
5150
| entitlement | string | Leave as null if you don't have an entitlement. Entitlement reduces additional OpenShift Container Platform license cost in Red Hat OpenShift clusters. Use Cloud Pak with OpenShift Container Platform license entitlement to create the Red Hat OpenShift cluster. Set this argument to `cloud_pak` only if you use the cluster with a Cloud Pak that has an Red Hat OpenShift entitlement. <br/><br/>This variable is set only when you create the cluster. Further modifications are not affected by this setting. | | null |
5251

5352
## Resource groups

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,6 @@ list(
700700
machine_type = string # Worker node flavor
701701
kube_type = string # iks or openshift
702702
kube_version = optional(string) # Can be a version from `ibmcloud ks versions`, `latest` or `default`. `null` will use the `default`
703-
update_all_workers = optional(bool) # if true, force all workers to update
704703
entitlement = optional(string) # entitlement option for openshift
705704
pod_subnet = optional(string) # Portable subnet for pods
706705
service_subnet = optional(string) # Portable subnet for services
@@ -902,7 +901,7 @@ module "cluster_pattern" {
902901
|------|-------------|------|---------|:--------:|
903902
| <a name="input_appid"></a> [appid](#input\_appid) | The App ID instance to be used for the teleport vsi deployments | <pre>object({<br> name = optional(string)<br> resource_group = optional(string)<br> use_data = optional(bool)<br> keys = optional(list(string))<br> use_appid = bool<br> })</pre> | <pre>{<br> "use_appid": false<br>}</pre> | no |
904903
| <a name="input_atracker"></a> [atracker](#input\_atracker) | atracker variables | <pre>object({<br> resource_group = string<br> receive_global_events = bool<br> collector_bucket_name = string<br> add_route = bool<br> })</pre> | n/a | yes |
905-
| <a name="input_clusters"></a> [clusters](#input\_clusters) | A list describing clusters workloads to create | <pre>list(<br> object({<br> name = string # Name of Cluster<br> vpc_name = string # Name of VPC<br> subnet_names = list(string) # List of vpc subnets for cluster<br> workers_per_subnet = number # Worker nodes per subnet.<br> machine_type = string # Worker node flavor<br> kube_type = string # iks or openshift<br> kube_version = optional(string) # Can be a version from `ibmcloud ks versions`, `latest` or `default`<br> entitlement = optional(string) # entitlement option for openshift<br> secondary_storage = optional(string) # Secondary storage type<br> pod_subnet = optional(string) # Portable subnet for pods<br> service_subnet = optional(string) # Portable subnet for services<br> resource_group = string # Resource Group used for cluster<br> cos_name = optional(string) # Name of COS instance Required only for OpenShift clusters<br> update_all_workers = optional(bool) # If true force workers to update<br> access_tags = optional(list(string), [])<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> kms_config = optional(<br> object({<br> crk_name = string # Name of key<br> private_endpoint = optional(bool) # Private endpoint<br> })<br> )<br> worker_pools = optional(<br> list(<br> object({<br> name = string # Worker pool name<br> vpc_name = string # VPC name<br> workers_per_subnet = number # Worker nodes per subnet<br> flavor = string # Worker node flavor<br> subnet_names = list(string) # List of vpc subnets for worker pool<br> entitlement = optional(string) # entitlement option for openshift<br> secondary_storage = optional(string) # Secondary storage type<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> })<br> )<br> )<br> })<br> )</pre> | n/a | yes |
904+
| <a name="input_clusters"></a> [clusters](#input\_clusters) | A list describing clusters workloads to create | <pre>list(<br> object({<br> name = string # Name of Cluster<br> vpc_name = string # Name of VPC<br> subnet_names = list(string) # List of vpc subnets for cluster<br> workers_per_subnet = number # Worker nodes per subnet.<br> machine_type = string # Worker node flavor<br> kube_type = string # iks or openshift<br> kube_version = optional(string) # Can be a version from `ibmcloud ks versions`, `latest` or `default`<br> entitlement = optional(string) # entitlement option for openshift<br> secondary_storage = optional(string) # Secondary storage type<br> pod_subnet = optional(string) # Portable subnet for pods<br> service_subnet = optional(string) # Portable subnet for services<br> resource_group = string # Resource Group used for cluster<br> cos_name = optional(string) # Name of COS instance Required only for OpenShift clusters<br> access_tags = optional(list(string), [])<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> kms_config = optional(<br> object({<br> crk_name = string # Name of key<br> private_endpoint = optional(bool) # Private endpoint<br> })<br> )<br> worker_pools = optional(<br> list(<br> object({<br> name = string # Worker pool name<br> vpc_name = string # VPC name<br> workers_per_subnet = number # Worker nodes per subnet<br> flavor = string # Worker node flavor<br> subnet_names = list(string) # List of vpc subnets for worker pool<br> entitlement = optional(string) # entitlement option for openshift<br> secondary_storage = optional(string) # Secondary storage type<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> })<br> )<br> )<br> })<br> )</pre> | n/a | yes |
906905
| <a name="input_cos"></a> [cos](#input\_cos) | Object describing the cloud object storage instance, buckets, and keys. Set `use_data` to false to create instance | <pre>list(<br> object({<br> name = string<br> use_data = optional(bool)<br> resource_group = string<br> plan = optional(string)<br> random_suffix = optional(bool) # Use a random suffix for COS instance<br> access_tags = optional(list(string), [])<br> buckets = list(object({<br> name = string<br> storage_class = string<br> endpoint_type = string<br> force_delete = bool<br> single_site_location = optional(string)<br> region_location = optional(string)<br> cross_region_location = optional(string)<br> kms_key = optional(string)<br> access_tags = optional(list(string), [])<br> allowed_ip = optional(list(string))<br> hard_quota = optional(number)<br> archive_rule = optional(object({<br> days = number<br> enable = bool<br> rule_id = optional(string)<br> type = string<br> }))<br> expire_rule = optional(object({<br> days = optional(number)<br> date = optional(string)<br> enable = bool<br> expired_object_delete_marker = optional(string)<br> prefix = optional(string)<br> rule_id = optional(string)<br> }))<br> activity_tracking = optional(object({<br> activity_tracker_crn = string<br> read_data_events = bool<br> write_data_events = bool<br> }))<br> metrics_monitoring = optional(object({<br> metrics_monitoring_crn = string<br> request_metrics_enabled = optional(bool)<br> usage_metrics_enabled = optional(bool)<br> }))<br> }))<br> keys = optional(<br> list(object({<br> name = string<br> role = string<br> enable_HMAC = bool<br> }))<br> )<br><br> })<br> )</pre> | n/a | yes |
907906
| <a name="input_enable_transit_gateway"></a> [enable\_transit\_gateway](#input\_enable\_transit\_gateway) | Create transit gateway | `bool` | `true` | no |
908907
| <a name="input_f5_template_data"></a> [f5\_template\_data](#input\_f5\_template\_data) | Data for all f5 templates | <pre>object({<br> tmos_admin_password = optional(string)<br> license_type = optional(string)<br> byol_license_basekey = optional(string)<br> license_host = optional(string)<br> license_username = optional(string)<br> license_password = optional(string)<br> license_pool = optional(string)<br> license_sku_keyword_1 = optional(string)<br> license_sku_keyword_2 = optional(string)<br> license_unit_of_measure = optional(string)<br> do_declaration_url = optional(string)<br> as3_declaration_url = optional(string)<br> ts_declaration_url = optional(string)<br> phone_home_url = optional(string)<br> template_source = optional(string)<br> template_version = optional(string)<br> app_id = optional(string)<br> tgactive_url = optional(string)<br> tgstandby_url = optional(string)<br> tgrefresh_url = optional(string)<br> })</pre> | <pre>{<br> "license_type": "none"<br>}</pre> | no |

cluster.tf

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,16 @@ resource "ibm_container_vpc_cluster" "cluster" {
5454
? local.default_kube_version[each.value.kube_type]
5555
: (lookup(each.value, "kube_version", null) == "latest" ? local.latest_kube_version[each.value.kube_type] : each.value.kube_version)
5656
)
57-
update_all_workers = lookup(each.value, "update_all_workers", null)
58-
tags = var.tags
59-
wait_till = var.wait_till
60-
entitlement = each.value.entitlement
61-
secondary_storage = each.value.secondary_storage
62-
cos_instance_crn = each.value.cos_instance_crn
63-
pod_subnet = each.value.pod_subnet
64-
service_subnet = each.value.service_subnet
65-
crk = each.value.boot_volume_crk_name == null ? null : regex("key:(.*)", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]
66-
kms_instance_id = each.value.boot_volume_crk_name == null ? null : regex(".*:(.*):key:.*", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]
67-
kms_account_id = each.value.boot_volume_crk_name == null ? null : regex("a/([a-f0-9]{32})", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0] == data.ibm_iam_account_settings.iam_account_settings.account_id ? null : regex("a/([a-f0-9]{32})", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]
57+
tags = var.tags
58+
wait_till = var.wait_till
59+
entitlement = each.value.entitlement
60+
secondary_storage = each.value.secondary_storage
61+
cos_instance_crn = each.value.cos_instance_crn
62+
pod_subnet = each.value.pod_subnet
63+
service_subnet = each.value.service_subnet
64+
crk = each.value.boot_volume_crk_name == null ? null : regex("key:(.*)", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]
65+
kms_instance_id = each.value.boot_volume_crk_name == null ? null : regex(".*:(.*):key:.*", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]
66+
kms_account_id = each.value.boot_volume_crk_name == null ? null : regex("a/([a-f0-9]{32})", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0] == data.ibm_iam_account_settings.iam_account_settings.account_id ? null : regex("a/([a-f0-9]{32})", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]
6867
lifecycle {
6968
ignore_changes = [kube_version]
7069
}

0 commit comments

Comments
 (0)