Skip to content

Commit 5419bd2

Browse files
feat: Add Support to enable multiline logs. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-multiline). (#64)
1 parent 830a9c2 commit 5419bd2

File tree

6 files changed

+19
-0
lines changed

6 files changed

+19
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ No modules.
117117
| <a name="input_cluster_config_endpoint_type"></a> [cluster\_config\_endpoint\_type](#input\_cluster\_config\_endpoint\_type) | The type of endpoint to use for the cluster config access: `default`, `private`, `vpe`, or `link`. The `default` value uses the default endpoint of the cluster. | `string` | `"default"` | no |
118118
| <a name="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id) | The ID of the cluster to deploy the agent. | `string` | n/a | yes |
119119
| <a name="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 |
120+
| <a name="input_enable_multiline"></a> [enable\_multiline](#input\_enable\_multiline) | Enable or disable multiline log support. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-multiline) | `bool` | `false` | no |
120121
| <a name="input_is_vpc_cluster"></a> [is\_vpc\_cluster](#input\_is\_vpc\_cluster) | Specify true if the target cluster for the agent is a VPC cluster, false if it is a classic cluster. | `bool` | `true` | no |
121122
| <a name="input_logs_agent_additional_log_source_paths"></a> [logs\_agent\_additional\_log\_source\_paths](#input\_logs\_agent\_additional\_log\_source\_paths) | The list of additional log sources. By default, the Logs agent collects logs from a single source at `/var/log/containers/*.log`. | `list(string)` | `[]` | no |
122123
| <a name="input_logs_agent_additional_metadata"></a> [logs\_agent\_additional\_metadata](#input\_logs\_agent\_additional\_metadata) | The list of additional metadata fields to add to the routed logs. | <pre>list(object({<br/> key = optional(string)<br/> value = optional(string)<br/> }))</pre> | `[]` | no |

ibm_catalog.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@
248248
},
249249
{
250250
"key": "wait_till_timeout"
251+
},
252+
{
253+
"key": "enable_multiline"
251254
}
252255
],
253256
"install_type": "fullstack"

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ resource "helm_release" "logs_agent" {
110110
name = "scc.create"
111111
value = var.logs_agent_enable_scc
112112
}
113+
set {
114+
name = "enableMultiline"
115+
value = var.enable_multiline
116+
}
113117

114118
# dummy value hack to force update https://github.com/hashicorp/terraform-provider-helm/issues/515#issuecomment-813088122
115119
values = [

solutions/fully-configurable/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ module "logs_agent" {
4343
is_vpc_cluster = var.is_vpc_cluster
4444
wait_till = var.wait_till
4545
wait_till_timeout = var.wait_till_timeout
46+
enable_multiline = var.enable_multiline
4647
}

solutions/fully-configurable/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,8 @@ variable "cloud_logs_ingress_port" {
225225
condition = contains([3443, 443], var.cloud_logs_ingress_port)
226226
}
227227
}
228+
variable "enable_multiline" {
229+
description = "Enable or disable multiline log support. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-multiline)"
230+
type = bool
231+
default = false
232+
}

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,8 @@ variable "cloud_logs_ingress_port" {
233233
condition = contains([3443, 443], var.cloud_logs_ingress_port)
234234
}
235235
}
236+
variable "enable_multiline" {
237+
description = "Enable or disable multiline log support. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-multiline)"
238+
type = bool
239+
default = false
240+
}

0 commit comments

Comments
 (0)