Skip to content

Commit 18f58ba

Browse files
authored
feat: enable new endpoint type for cluster config (#277)
1 parent 497740d commit 18f58ba

File tree

11 files changed

+22
-9
lines changed

11 files changed

+22
-9
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Optionally, you need the following permissions to attach Access Management tags
153153
| Name | Version |
154154
|------|---------|
155155
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0, < 1.6.0 |
156-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.58.1, < 2.0.0 |
156+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.59.0, < 2.0.0 |
157157
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.16.1 |
158158
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.2.1 |
159159
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |
@@ -189,6 +189,7 @@ Optionally, you need the following permissions to attach Access Management tags
189189
|------|-------------|------|---------|:--------:|
190190
| <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 |
191191
| <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, 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> alb-oauth-proxy = optional(string)<br> debug-tool = optional(string)<br> image-key-synchronizer = optional(string)<br> istio = optional(string)<br> openshift-data-foundation = optional(string)<br> static-route = optional(string)<br> cluster-autoscaler = optional(string)<br> vpc-block-csi-driver = optional(string)<br> })</pre> | `null` | no |
192+
| <a name="input_cluster_config_endpoint_type"></a> [cluster\_config\_endpoint\_type](#input\_cluster\_config\_endpoint\_type) | Specify which type of endpoint to use for for cluster config access: 'default', 'private', 'vpe', 'link'. 'default' value will use the default endpoint of the cluster. | `string` | `"default"` | no |
192193
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | The name that will be assigned to the provisioned cluster | `string` | n/a | yes |
193194
| <a name="input_cluster_ready_when"></a> [cluster\_ready\_when](#input\_cluster\_ready\_when) | The cluster is ready when one of the following: MasterNodeReady (not recommended), OneWorkerNodeReady, Normal, IngressReady | `string` | `"IngressReady"` | no |
194195
| <a name="input_cos_name"></a> [cos\_name](#input\_cos\_name) | Name of the COS instance to provision. New instance only provisioned if `use_existing_cos = false`. Default: `<cluster_name>_cos` | `string` | `null` | no |

examples/add_rules_to_sg/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
ibm = {
55
source = "ibm-cloud/ibm"
6-
version = ">= 1.58.1"
6+
version = ">= 1.59.0"
77
}
88
}
99
}

examples/apply_taints/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
ibm = {
55
source = "ibm-cloud/ibm"
6-
version = ">= 1.58.1"
6+
version = ">= 1.59.0"
77
}
88
}
99
}

examples/existing_cos/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
# Pin to the lowest provider version of the range defined in the main module to ensure lowest version still works
55
ibm = {
66
source = "ibm-cloud/ibm"
7-
version = ">= 1.58.1"
7+
version = ">= 1.59.0"
88
}
99
}
1010
}

examples/fscloud/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
# Pin to the lowest provider version of the range defined in the main module to ensure lowest version still works
55
ibm = {
66
source = "ibm-cloud/ibm"
7-
version = "1.58.1"
7+
version = "1.59.0"
88
}
99
# The logdna provider is not actually required by the module itself, just this example, so OK to use ">=" here instead of locking into a version
1010
logdna = {

examples/multiple_mzr_clusters/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
ibm = {
55
source = "ibm-cloud/ibm"
6-
version = ">= 1.58.1"
6+
version = ">= 1.59.0"
77
}
88
# The kubernetes provider is not actually required by the module itself, just this example, so OK to use ">=" here instead of locking into a version
99
kubernetes = {

examples/single_zone_autoscale_cluster/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
ibm = {
55
source = "ibm-cloud/ibm"
6-
version = ">= 1.58.1"
6+
version = ">= 1.59.0"
77
}
88
kubernetes = {
99
source = "hashicorp/kubernetes"

examples/standard/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
ibm = {
55
source = "ibm-cloud/ibm"
6-
version = ">= 1.58.1"
6+
version = ">= 1.59.0"
77
}
88
}
99
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ data "ibm_container_cluster_config" "cluster_config" {
239239
cluster_name_id = local.cluster_id
240240
config_dir = "${path.module}/kubeconfig"
241241
resource_group_id = var.resource_group_id
242+
endpoint_type = var.cluster_config_endpoint_type != "default" ? var.cluster_config_endpoint_type : null # null value represents default
242243
}
243244

244245
##############################################################################

variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,15 @@ variable "addons" {
214214
default = null
215215
}
216216

217+
variable "cluster_config_endpoint_type" {
218+
description = "Specify which type of endpoint to use for for cluster config access: 'default', 'private', 'vpe', 'link'. 'default' value will use the default endpoint of the cluster."
219+
type = string
220+
default = "default"
221+
nullable = false # use default if null is passed in
222+
validation {
223+
error_message = "Invalid Endpoint Type! Valid values are 'default', 'private', 'vpe', or 'link'"
224+
condition = contains(["default", "private", "vpe", "link"], var.cluster_config_endpoint_type)
225+
}
226+
}
227+
217228
##############################################################################

0 commit comments

Comments
 (0)