These examples demonstrate how to provision and manage Better Stack Telemetry resources with Terraform.
The files in this directory are a ready-to-run basic example - a source, an errors application, a couple of explorations and an alert.
The connection/ directory shows a connection, which requires a global API token.
Detailed, per-resource examples live in resources/ and data-sources/ - these are embedded in the registry docs and exercised end-to-end in CI.
git clone https://github.com/BetterStackHQ/terraform-provider-logtail && \
cd terraform-provider-logtail/examples
echo '# See variables.tf for more.
logtail_api_token = "XXXXXXXXXXXXXXXXXXXXXXXX"
' > terraform.tfvars
terraform init
terraform apply
# The source token to start shipping logs, and the host to send them to:
terraform output logtail_source_token
terraform output logtail_ingesting_hostSee Better Stack Telemetry API docs to obtain API token and get the complete list of parameter options. Or explore the Terraform Registry provider documentation.