Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Example usage

build tests documentation

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.

Usage

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_host

Documentation

See Better Stack Telemetry API docs to obtain API token and get the complete list of parameter options. Or explore the Terraform Registry provider documentation.