Introduction
This article explains how to configure fluent-bit log forwarding during an automated installation of Terraform Enterprise. Recent releases of Terraform Enterprise include a fluent-bit log streaming option that you can enable to forward logs to an external destination.
Prerequisites
- An automated installation of Terraform Enterprise.
- Access to modify the
settings.jsonconfiguration file for the installation.
Procedure
To configure log forwarding, you must add specific key-value pairs to your settings.json file.
- Open your
settings.jsonfile in a text editor. -
Add the following configuration to enable the log forwarding feature. This setting activates the fluent-bit service within the Terraform Enterprise installation.
"log_forwarding_enabled": { "value": "1" } -
Add the following configuration to set a default
nulloutput. This is a recommended baseline that prevents forwarding all logs by default and allows you to add more specific forwarding rules later."log_forwarding_config": { "value": "# Match all logs and do not forward them anywhere.\n[OUTPUT]\n Name null\n Match *\n" }
After adding these settings, proceed with your automated installation. Terraform Enterprise will start with the fluent-bit service configured according to these settings.
Additional Information
- For more details on log forwarding capabilities and how to configure specific outputs, please refer to the official Terraform Enterprise documentation.