Skip to content

Commit 37c3326

Browse files
authored
Merge branch 'main' into renovate/major-terraform-dependencies
2 parents 58aa795 + 732f2bb commit 37c3326

File tree

9 files changed

+164
-51
lines changed

9 files changed

+164
-51
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ Optionally, you need the following permissions to attach Access Management tags
289289
| <a name="input_access_tags"></a> [access\_tags](#input\_access\_tags) | A list of access tags to apply to the resources created by the module, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial for more details | `list(string)` | `[]` | no |
290290
| <a name="input_additional_lb_security_group_ids"></a> [additional\_lb\_security\_group\_ids](#input\_additional\_lb\_security\_group\_ids) | Additional security groups to add to the load balancers associated with the cluster. Ensure that the `number_of_lbs` is set to the number of LBs associated with the cluster. This comes in addition to the IBM maintained security group. | `list(string)` | `[]` | no |
291291
| <a name="input_additional_vpe_security_group_ids"></a> [additional\_vpe\_security\_group\_ids](#input\_additional\_vpe\_security\_group\_ids) | Additional security groups to add to all existing load balancers. This comes in addition to the IBM maintained security group. | <pre>object({<br/> master = optional(list(string), [])<br/> registry = optional(list(string), [])<br/> api = optional(list(string), [])<br/> })</pre> | `{}` | no |
292-
| <a name="input_addons"></a> [addons](#input\_addons) | Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). For full list of all supported add-ons and versions, see https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions | <pre>object({<br/> debug-tool = optional(string)<br/> image-key-synchronizer = optional(string)<br/> openshift-data-foundation = optional(string)<br/> vpc-file-csi-driver = optional(string)<br/> static-route = optional(string)<br/> cluster-autoscaler = optional(string)<br/> vpc-block-csi-driver = optional(string)<br/> ibm-storage-operator = optional(string)<br/> openshift-ai = optional(string)<br/> })</pre> | `{}` | no |
292+
| <a name="input_addons"></a> [addons](#input\_addons) | Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). For full list of all supported add-ons and versions, see https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions | <pre>object({<br/> debug-tool = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> image-key-synchronizer = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> openshift-data-foundation = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> vpc-file-csi-driver = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> static-route = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> cluster-autoscaler = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> vpc-block-csi-driver = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> ibm-storage-operator = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> openshift-ai = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> })</pre> | `{}` | no |
293293
| <a name="input_allow_default_worker_pool_replacement"></a> [allow\_default\_worker\_pool\_replacement](#input\_allow\_default\_worker\_pool\_replacement) | (Advanced users) Set to true to allow the module to recreate a default worker pool. If you wish to make any change to the default worker pool which requires the re-creation of the default pool follow these [steps](https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc?tab=readme-ov-file#important-considerations-for-terraform-and-default-worker-pool). | `bool` | `false` | no |
294294
| <a name="input_attach_ibm_managed_security_group"></a> [attach\_ibm\_managed\_security\_group](#input\_attach\_ibm\_managed\_security\_group) | Specify whether to attach the IBM-defined default security group (whose name is kube-<clusterid>) to all worker nodes. Only applicable if `custom_security_group_ids` is set. | `bool` | `true` | no |
295295
| <a name="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules) | The list of context-based restriction rules to create. | <pre>list(object({<br/> description = string<br/> account_id = string<br/> rule_contexts = list(object({<br/> attributes = optional(list(object({<br/> name = string<br/> value = string<br/> }))) }))<br/> enforcement_mode = string<br/> tags = optional(list(object({<br/> name = string<br/> value = string<br/> })), [])<br/> operations = optional(list(object({<br/> api_types = list(object({<br/> api_type_id = string<br/> }))<br/> })))<br/> }))</pre> | `[]` | no |

examples/advanced/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ module "ocp_base" {
171171
# Enable if using worker autoscaling. Stops Terraform managing worker count.
172172
ignore_worker_pool_size_changes = true
173173
addons = {
174-
"cluster-autoscaler" = "1.2.3"
174+
"cluster-autoscaler" = { version = "1.2.3" }
175175
}
176176
kms_config = {
177177
instance_id = module.kp_all_inclusive.kms_guid

main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,15 +505,15 @@ data "ibm_container_addons" "existing_addons" {
505505

506506
locals {
507507
# for each cluster, look for installed csi driver to get version. If array is empty (no csi driver) then null is returned
508-
csi_driver_version = anytrue([for key, value in var.addons : true if key == "vpc-block-csi-driver" && value != null]) ? [var.addons["vpc-block-csi-driver"]] : [
508+
csi_driver_version = anytrue([for key, value in var.addons : true if key == "vpc-block-csi-driver" && value != null]) ? [var.addons["vpc-block-csi-driver"].version] : [
509509
for addon in data.ibm_container_addons.existing_addons.addons :
510510
addon.version if addon.name == "vpc-block-csi-driver"
511511
]
512512

513513
# get the addons and their versions and create an addons map including the corresponding csi_driver_version
514514
addons = merge(
515515
{ for addon_name, addon_version in(var.addons != null ? var.addons : {}) : addon_name => addon_version if addon_version != null },
516-
length(local.csi_driver_version) > 0 ? { vpc-block-csi-driver = local.csi_driver_version[0] } : {}
516+
length(local.csi_driver_version) > 0 ? { vpc-block-csi-driver = { version = local.csi_driver_version[0] } } : {}
517517
)
518518
}
519519

@@ -531,8 +531,9 @@ resource "ibm_container_addons" "addons" {
531531
dynamic "addons" {
532532
for_each = local.addons
533533
content {
534-
name = addons.key
535-
version = addons.value
534+
name = addons.key
535+
version = lookup(addons.value, "version", null)
536+
parameters_json = lookup(addons.value, "parameters_json", null)
536537
}
537538
}
538539

modules/fscloud/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ No resources.
115115
| <a name="input_access_tags"></a> [access\_tags](#input\_access\_tags) | A list of access tags to apply to the resources created by the module, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial for more details | `list(string)` | `[]` | no |
116116
| <a name="input_additional_lb_security_group_ids"></a> [additional\_lb\_security\_group\_ids](#input\_additional\_lb\_security\_group\_ids) | Additional security groups to add to the load balancers associated with the cluster. Ensure that the number\_of\_lbs is set to the number of LBs associated with the cluster. This comes in addition to the IBM maintained security group. | `list(string)` | `[]` | no |
117117
| <a name="input_additional_vpe_security_group_ids"></a> [additional\_vpe\_security\_group\_ids](#input\_additional\_vpe\_security\_group\_ids) | Additional security groups to add to all existing load balancers. This comes in addition to the IBM maintained security group. | <pre>object({<br/> master = optional(list(string), [])<br/> registry = optional(list(string), [])<br/> api = optional(list(string), [])<br/> })</pre> | `{}` | no |
118-
| <a name="input_addons"></a> [addons](#input\_addons) | Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). For full list of all supported add-ons and versions, see https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions | <pre>object({<br/> debug-tool = optional(string)<br/> image-key-synchronizer = optional(string)<br/> openshift-data-foundation = optional(string)<br/> vpc-file-csi-driver = optional(string)<br/> static-route = optional(string)<br/> cluster-autoscaler = optional(string)<br/> vpc-block-csi-driver = optional(string)<br/> ibm-storage-operator = optional(string)<br/> openshift-ai = optional(string)<br/> })</pre> | `{}` | no |
118+
| <a name="input_addons"></a> [addons](#input\_addons) | Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). For full list of all supported add-ons and versions, see https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions | <pre>object({<br/> debug-tool = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> image-key-synchronizer = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> openshift-data-foundation = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> vpc-file-csi-driver = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> static-route = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> cluster-autoscaler = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> vpc-block-csi-driver = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> ibm-storage-operator = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> openshift-ai = optional(object({<br/> version = optional(string)<br/> parameters_json = optional(string)<br/> }))<br/> })</pre> | `{}` | no |
119119
| <a name="input_allow_default_worker_pool_replacement"></a> [allow\_default\_worker\_pool\_replacement](#input\_allow\_default\_worker\_pool\_replacement) | (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. | `bool` | `false` | no |
120120
| <a name="input_attach_ibm_managed_security_group"></a> [attach\_ibm\_managed\_security\_group](#input\_attach\_ibm\_managed\_security\_group) | Specify whether to attach the IBM-defined default security group (whose name is kube-<clusterid>) to all worker nodes. Only applicable if custom\_security\_group\_ids is set. | `bool` | `true` | no |
121121
| <a name="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules) | The list of context-based restriction rules to create. | <pre>list(object({<br/> description = string<br/> account_id = string<br/> rule_contexts = list(object({<br/> attributes = optional(list(object({<br/> name = string<br/> value = string<br/> }))) }))<br/> enforcement_mode = string<br/> tags = optional(list(object({<br/> name = string<br/> value = string<br/> })), [])<br/> operations = optional(list(object({<br/> api_types = list(object({<br/> api_type_id = string<br/> }))<br/> })))<br/> }))</pre> | `[]` | no |

modules/fscloud/variables.tf

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,42 @@ variable "verify_worker_network_readiness" {
152152

153153
variable "addons" {
154154
type = object({
155-
debug-tool = optional(string)
156-
image-key-synchronizer = optional(string)
157-
openshift-data-foundation = optional(string)
158-
vpc-file-csi-driver = optional(string)
159-
static-route = optional(string)
160-
cluster-autoscaler = optional(string)
161-
vpc-block-csi-driver = optional(string)
162-
ibm-storage-operator = optional(string)
163-
openshift-ai = optional(string)
155+
debug-tool = optional(object({
156+
version = optional(string)
157+
parameters_json = optional(string)
158+
}))
159+
image-key-synchronizer = optional(object({
160+
version = optional(string)
161+
parameters_json = optional(string)
162+
}))
163+
openshift-data-foundation = optional(object({
164+
version = optional(string)
165+
parameters_json = optional(string)
166+
}))
167+
vpc-file-csi-driver = optional(object({
168+
version = optional(string)
169+
parameters_json = optional(string)
170+
}))
171+
static-route = optional(object({
172+
version = optional(string)
173+
parameters_json = optional(string)
174+
}))
175+
cluster-autoscaler = optional(object({
176+
version = optional(string)
177+
parameters_json = optional(string)
178+
}))
179+
vpc-block-csi-driver = optional(object({
180+
version = optional(string)
181+
parameters_json = optional(string)
182+
}))
183+
ibm-storage-operator = optional(object({
184+
version = optional(string)
185+
parameters_json = optional(string)
186+
}))
187+
openshift-ai = optional(object({
188+
version = optional(string)
189+
parameters_json = optional(string)
190+
}))
164191
})
165192
description = "Map of OCP cluster add-on versions to install (NOTE: The 'vpc-block-csi-driver' add-on is installed by default for VPC clusters and 'ibm-storage-operator' is installed by default in OCP 4.15 and later, however you can explicitly specify it here if you wish to choose a later version than the default one). For full list of all supported add-ons and versions, see https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions"
166193
default = {}

0 commit comments

Comments
 (0)