Terraform (0.13+) provider for Better Stack Logs (formerly Logtail.com).
terraform {
required_version = ">= 0.13"
required_providers {
logtail = {
source = "BetterStackHQ/logtail"
version = ">= 0.2.0"
}
}
}
provider "logtail" {
# `api_token` can be omitted if LOGTAIL_API_TOKEN env var is set.
api_token = "XXXXXXXXXXXXXXXXXXXXXXXX"
}
resource "logtail_source" "this" {
name = "Production Server"
platform = "ubuntu"
}
output "logtail_source_token" {
value = logtail_source.this.token
}
See Terraform Registry docs.
PREREQUISITE: go1.16+.
git clone https://github.com/betterstackhq/terraform-provider-logtail && \
cd terraform-provider-logtail
make help
Simply push a new tag vX.Y.Z
to GitHub and a new version will be built and released automatically through a GitHub action.