Skip to content

Commit 23d8edb

Browse files
feat: implement endpoint_type for cluster config (#218)
Co-authored-by: Conall Ó Cofaigh <[email protected]>
1 parent 86d3b22 commit 23d8edb

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ You need the following permissions to run this module.
100100
|------|---------|
101101
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.1.0, <1.6.0 |
102102
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.8.0 |
103-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.49.0 |
103+
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >= 1.59.0 |
104104

105105
### Modules
106106

@@ -121,6 +121,7 @@ No modules.
121121

122122
| Name | Description | Type | Default | Required |
123123
|------|-------------|------|---------|:--------:|
124+
| <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 |
124125
| <a name="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id) | Cluster id to add to agents to | `string` | n/a | yes |
125126
| <a name="input_cluster_resource_group_id"></a> [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id) | Resource group of the cluster | `string` | n/a | yes |
126127
| <a name="input_logdna_add_cluster_name"></a> [logdna\_add\_cluster\_name](#input\_logdna\_add\_cluster\_name) | If true, configure the logdna agent to attach a tag containing the cluster name to all log messages. | `bool` | `true` | no |

examples/basic/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ terraform {
55
required_providers {
66
ibm = {
77
source = "ibm-cloud/ibm"
8-
version = ">= 1.49.0"
8+
version = ">= 1.59.0"
99
}
1010
helm = {
1111
source = "hashicorp/helm"

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ data "ibm_container_cluster_config" "cluster_config" {
1212
cluster_name_id = var.cluster_id
1313
resource_group_id = var.cluster_resource_group_id
1414
config_dir = "${path.module}/kubeconfig"
15+
endpoint_type = var.cluster_config_endpoint_type != "default" ? var.cluster_config_endpoint_type : null # null value represents default
1516
}
1617

1718
##############################################################################

variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,15 @@ variable "sysdig_add_cluster_name" {
118118
default = true
119119
}
120120

121+
variable "cluster_config_endpoint_type" {
122+
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."
123+
type = string
124+
default = "default"
125+
nullable = false # use default if null is passed in
126+
validation {
127+
error_message = "Invalid Endpoint Type! Valid values are 'default', 'private', 'vpe', or 'link'"
128+
condition = contains(["default", "private", "vpe", "link"], var.cluster_config_endpoint_type)
129+
}
130+
}
131+
121132
##############################################################################

version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ terraform {
55
ibm = {
66
# Use "greater than or equal to" range in modules
77
source = "ibm-cloud/ibm"
8-
version = ">= 1.49.0"
8+
version = ">= 1.59.0"
99
}
1010
helm = {
1111
source = "hashicorp/helm"

0 commit comments

Comments
 (0)