This module adds the loki plugin to your Spacelift account. It will send logs, with information about the run, to Loki.
Note: There is currently a limitation in the Spacelift API that prevents sending the actual log output to Loki. This means that you will only see metadata about the run, such as the run ID, the stack ID, the status of the run, etc. You will not see the actual logs of a run.
- Spin up the module (see examples below)
- Add the
plugin_lokilabel to any stack.
The labeled stacks will automatically send logs to Loki.
module "plugin_loki" {
source = "spacelift.io/spacelift-solutions/plugin-loki/spacelift"
# Required Variables
loki_endpoint = "https://loki.example.com/loki/api/v1/push"
space_id = "root"
# Optional Variables
name_suffix = "loki"
policy_labels = ["production"]
webhook_labels = ["production"]
}| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| loki_endpoint | The endpoint of the Loki instance to send logs to. Example: https://{your-publicly-facing-loki-endpoint}/loki/api/v1/push |
string |
n/a | yes |
| name_suffix | Suffix to append to the name of the resources | string |
"" |
no |
| policy_labels | Labels to apply to the policy | list(string) |
[] |
no |
| space_id | The ID of the Space to create the resources in | string |
n/a | yes |
| webhook_labels | Labels to apply to the webhook | list(string) |
[] |
no |

