A Terraform provider that allows you to manage resources in Axiom.
Axiom lets you make the most of your event data without compromises: all your data, all the time, for all possible needs. Say goodbye to data sampling, waiting times, and hefty fees.
📖 For more information, see the documentation.
🔧 To see the provider in action, check out the example.
❓ Issues or feedback? Contact us or join the Axiom Discord community.
- Sign up for a free Axiom account. All you need is an email address.
- Create an advanced API token in Axiom with the permissions to perform the actions you want to use. For example, to use Terraform to create and update datasets, create the advanced API token with these permissions.
- Create a Terraform account.
- Install the Terraform CLI.
To install the Axiom Terraform Provider from the Terraform Registry, follow these steps:
-
Add the following code to your Terraform configuration file. Replace
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.terraform { required_providers { axiom = { source = "axiomhq/axiom" } } } provider "axiom" { api_token = "API_TOKEN" }
-
In your terminal, go to the folder of your main Terraform configuration file, and then run the command
terraform init
.
To create a dataset in Axiom using the provider, add the following code to your Terraform configuration file:
resource "axiom_dataset" "test_dataset" {
name = "test_dataset"
description = "This is a test dataset created by Terraform."
}
To access an existing dataset in Axiom using the provider, follow these steps:
- Determine the ID of the Axiom dataset using the
getDatasets
query of the Axiom API. - Add the following code to your Terraform configuration file. Replace
DATASET_ID
with the ID of the Axiom dataset.
data "axiom_dataset" "test_dataset" {
id = "DATASET_ID"
}
For more information on licensing, see LICENSE.