diff --git a/README.md b/README.md index 121e5aa..13bc34a 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ No modules. | [logs\_agent\_tolerations](#input\_logs\_agent\_tolerations) | List of tolerations to apply to Logs agent. The default value means a pod will run on every node. |
list(object({
key = optional(string)
operator = optional(string)
value = optional(string)
effect = optional(string)
tolerationSeconds = optional(number)
}))
|
[
{
"operator": "Exists"
}
]
| no | | [logs\_agent\_trusted\_profile\_id](#input\_logs\_agent\_trusted\_profile\_id) | The IBM Cloud trusted profile ID. Used only when `logs_agent_iam_mode` is set to `TrustedProfile`. The trusted profile must have an IBM Cloud Logs `Sender` role. | `string` | `null` | no | | [max\_unavailable](#input\_max\_unavailable) | The maximum number of pods that can be unavailable during a DaemonSet rolling update. Accepts absolute number or percentage (e.g., '1' or '10%'). | `string` | `"1"` | no | +| [storage\_name](#input\_storage\_name) | The custom name for the fluent cache that stores data streams and chunks, as well as the database file that tracks processed files and their states, helping prevent multiple logs-agents from using the same cache and database. | `string` | `""` | no | | [wait\_till](#input\_wait\_till) | To avoid long wait times when you run your Terraform code, you can specify the stage when you want Terraform to mark the cluster resource creation as completed. Depending on what stage you choose, the cluster creation might not be fully completed and continues to run in the background. However, your Terraform code can continue to run without waiting for the cluster to be fully created. Supported args are `MasterNodeReady`, `OneWorkerNodeReady`, `IngressReady` and `Normal` | `string` | `"Normal"` | no | | [wait\_till\_timeout](#input\_wait\_till\_timeout) | Timeout for wait\_till in minutes. | `number` | `90` | no | diff --git a/ibm_catalog.json b/ibm_catalog.json index e28010d..82a7e0b 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -471,6 +471,9 @@ { "key": "wait_till_timeout" }, + { + "key": "storage_name" + }, { "key": "enable_multiline" }, diff --git a/main.tf b/main.tf index 281e2cb..8d69803 100644 --- a/main.tf +++ b/main.tf @@ -28,6 +28,7 @@ locals { logs_agent_iam_api_key = var.logs_agent_iam_api_key != null ? var.logs_agent_iam_api_key : "" logs_agent_trusted_profile_id = var.logs_agent_trusted_profile_id != null ? var.logs_agent_trusted_profile_id : "" cloud_logs_ingress_endpoint = var.cloud_logs_ingress_endpoint != null ? var.cloud_logs_ingress_endpoint : "" + storage_name = var.storage_name != null ? var.storage_name : "" logs_agent_additional_metadata = length(var.logs_agent_additional_metadata) > 0 ? merge([ for metadata in var.logs_agent_additional_metadata : { (metadata.key) = metadata.value @@ -131,6 +132,10 @@ resource "helm_release" "logs_agent" { { name = "updateStrategy.maxUnavailable" value = var.max_unavailable + }, + { + name = "storageName" + value = local.storage_name } ] diff --git a/solutions/fully-configurable/main.tf b/solutions/fully-configurable/main.tf index 9690caa..d99c306 100644 --- a/solutions/fully-configurable/main.tf +++ b/solutions/fully-configurable/main.tf @@ -87,5 +87,6 @@ module "logs_agent" { enable_annotations = var.enable_annotations log_filters = var.log_filters max_unavailable = var.max_unavailable + storage_name = var.storage_name logs_agent_multi_process_workers = var.logs_agent_multi_process_workers } diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index d2a82ab..2649c60 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -295,6 +295,13 @@ variable "max_unavailable" { nullable = false } +variable "storage_name" { + type = string + description = "The custom name for the fluent cache that stores data streams and chunks, as well as the database file that tracks processed files and their states, helping prevent multiple logs-agents from using the same cache and database." + default = "" + nullable = false +} + variable "provider_visibility" { description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)." type = string diff --git a/variables.tf b/variables.tf index e23018a..6f47a12 100644 --- a/variables.tf +++ b/variables.tf @@ -279,7 +279,6 @@ variable "max_unavailable" { } } - variable "log_filters" { # variable type is any because filters schema is not fixed and there are many filters each having its unique fields. @@ -289,3 +288,10 @@ variable "log_filters" { type = any default = [] } + +variable "storage_name" { + type = string + description = "The custom name for the fluent cache that stores data streams and chunks, as well as the database file that tracks processed files and their states, helping prevent multiple logs-agents from using the same cache and database." + default = "" + nullable = false +}