Skip to content

honeycombio/terraform-provider-honeycombio

Repository files navigation

Honeycomb.io Terraform Provider

OSS Lifecycle CI Terraform Registry

A Terraform provider for Honeycomb.io.

📄 Check out the documentation

🏗️ Examples can be found in example/

❓ Questions? Feel free to create a new issue or find us on the Honeycomb Pollinators Slack, channel #discuss-api-and-terraform (you can find a link to request an invite here)

🔧 Want to contribute? Check out CONTRIBUTING.md

Using the provider

You can install the provider directly from the Terraform Registry. Add the following block in your Terraform config, this will download the provider from the Terraform Registry:

terraform {
  required_providers {
    honeycombio = {
      source  = "honeycombio/honeycombio"
      version = "~> 0.28.0"
    }
  }
}

You can override the default API Endpoint (https://api.honeycomb.io) by setting the HONEYCOMB_API_ENDPOINT environment variable.

The Honeycomb provider requires an API key to communicate with the Honeycomb APIs. The provider can make calls to v1 and v2 APIs and requires specific key configurations for each. For more information about API Keys, check out Best Practices for API Keys.

A single instance of the provider can be configured with both key types. At least one of the v1 or v2 API key configuration is required.

v1 APIs

v1 APIs require Configuration Keys. Their permissions can be managed in Environment settings. Most resources and data sources call v1 APIs today.

The key can be set with the api_key argument or via the HONEYCOMB_API_KEY or HONEYCOMBIO_APIKEY environment variable.

HONEYCOMB_API_KEY environment variable will take priority over the HONEYCOMBIO_APIKEY environment variable.

v2 APIs

v2 APIs require a Mangement Key. Their permissions can be managed in Team settings. Resources and data sources that call v2 APIs will be noted along with the scope required to use the resource or data source.

The key pair can be set with the api_key_id and api_key_secret arguments, or via the HONEYCOMB_KEY_ID and HONEYCOMB_KEY_SECRET environment variables.

Configuring the provider for Honeycomb EU

If you are a Honeycomb EU customer, to use the provider you must override the default API host. This can be done with a provider block (example below) or by setting the HONEYCOMB_API_ENDPOINT environment variable.

provider "honeycombio" {
  api_url = "https://api.eu1.honeycomb.io"
}

License

This software is distributed under the terms of the MIT license, see LICENSE for details.