You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[ibm_container_cluster.cluster](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_cluster)| data source |
127
129
|[ibm_container_cluster_config.cluster_config](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_cluster_config)| data source |
128
130
|[ibm_container_vpc_cluster.cluster](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_vpc_cluster)| data source |
129
131
@@ -145,6 +147,7 @@ No modules.
145
147
| <aname="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 |
146
148
| <aname="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id)| The ID of the cluster you wish to deploy the agents in |`string`| n/a | yes |
147
149
| <aname="input_cluster_resource_group_id"></a> [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id)| The Resource Group ID of the cluster |`string`| n/a | yes |
150
+
| <aname="input_is_vpc_cluster"></a> [is\_vpc\_cluster](#input\_is\_vpc\_cluster)| Specify true if the target cluster for the observability agents is a VPC cluster, false if it is a classic cluster. |`bool`|`true`| no |
148
151
| <aname="input_log_analysis_add_cluster_name"></a> [log\_analysis\_add\_cluster\_name](#input\_log\_analysis\_add\_cluster\_name)| If true, configure the log analysis agent to attach a tag containing the cluster name to all log messages. |`bool`|`true`| no |
149
152
| <aname="input_log_analysis_agent_custom_line_exclusion"></a> [log\_analysis\_agent\_custom\_line\_exclusion](#input\_log\_analysis\_agent\_custom\_line\_exclusion)| Log Analysis agent custom configuration for line exclusion setting LOGDNA\_K8S\_METADATA\_LINE\_EXCLUSION. See https://github.com/logdna/logdna-agent-v2/blob/master/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering for more info. |`string`|`null`| no |
150
153
| <aname="input_log_analysis_agent_custom_line_inclusion"></a> [log\_analysis\_agent\_custom\_line\_inclusion](#input\_log\_analysis\_agent\_custom\_line\_inclusion)| Log Analysis agent custom configuration for line inclusion setting LOGDNA\_K8S\_METADATA\_LINE\_INCLUSION. See https://github.com/logdna/logdna-agent-v2/blob/master/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering for more info. |`string`|`null`| no |
# Lookup cluster name from ID. The is_vpc_cluster variable defines whether to use the VPC data block or the Classic data block
6
6
data"ibm_container_vpc_cluster""cluster" {
7
+
count=var.is_vpc_cluster?1:0
8
+
name=var.cluster_id
9
+
resource_group_id=var.cluster_resource_group_id
10
+
}
11
+
12
+
data"ibm_container_cluster""cluster" {
13
+
count=var.is_vpc_cluster?0:1
7
14
name=var.cluster_id
8
15
resource_group_id=var.cluster_resource_group_id
9
16
}
@@ -18,7 +25,7 @@ data "ibm_container_cluster_config" "cluster_config" {
18
25
19
26
locals {
20
27
# LOCALS
21
-
cluster_name=data.ibm_container_vpc_cluster.cluster.resource_name# Not publically documented in provider. See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4485
28
+
cluster_name=var.is_vpc_cluster?data.ibm_container_vpc_cluster.cluster[0].resource_name: data.ibm_container_cluster.cluster[0].resource_name# Not publically documented in provider. See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4485
0 commit comments