Skip to content

SigNoz/terraform-provider-signoz

Repository files navigation

Terraform logo

Terraform SigNoz Provider

The SigNoz Provider lets Terraform manage SigNoz observability resources as code, on both SigNoz Cloud and self-hosted deployments.

📖 Provider documentation on the Terraform Registry

Usage

terraform {
  required_providers {
    signoz = {
      source = "signoz/signoz"
    }
  }
}

provider "signoz" {
  # SigNoz Cloud region URL, or the UI URL of a self-hosted deployment. Also reads
  # SIGNOZ_ENDPOINT; defaults to http://localhost:8080.
  endpoint = "http://localhost:8080"

  # API access token from a service account. Prefer the SIGNOZ_ACCESS_TOKEN
  # environment variable to keep the secret out of configuration and state.
  access_token = var.signoz_access_token
}

Create an access token from a SigNoz service account. See the registry documentation for every resource, data source, and example.

Requirements

  • Terraform >= 1.0
  • Go >= 1.25 (only to build the provider from source)

Building the provider

  1. Clone the repository.
  2. Enter the repository directory.
  3. Build the provider with the Go install command:
go install

Adding dependencies

This provider uses Go modules. To add a new dependency github.com/author/dependency:

go get github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

Documentation

Documentation is generated with terraform-plugin-docs from the provider schema, the prose templates in templates/, and the examples in examples/. Edit those sources, then regenerate:

go generate ./...

The files in docs/ are auto-generated — do not edit them by hand. CI re-runs generation and fails if docs/ is out of date.

Developing the provider

You'll need Go >= 1.25 (see Requirements). To compile the provider, run go install; the binary lands in $GOPATH/bin. After changing the schema, examples, or templates, run go generate ./... to refresh docs/.

About

Terraform Provider of SigNoz

Topics

Resources

License

Stars

13 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors