- Make sure you have the latest version of Terraform installed. You can do this however you like. I use asdf to manage multiple Terraform versions.
- Make sure Terraform is working by running
terraform -version
. You can see other commands avaialble withterraform -help
- Create a new team in Honeycomb and generate a new API token for your team that has all of the permissions checked.
- Clone this repository and navigate into the directory for the scenario you'd like to run. You should see 2 files in this directory: main.tf and variables.tf.
- The variables you need to set to run the scenario are defined in variables.tf. There are lots of different ways to set variables in Terraform. These instructions use environment variables but you can use whatever way you prefer.
- Export the API key you generated in Honeycomb to the environment variable TF_VAR_honeycomb_api_key
export TF_VAR_honeycomb_api_key=YOUR_API_KEY_HERE
- Export the API URL for Honeycomb to the environment variable TF_VAR_honeycomb_api_url
export TF_VAR_honeycomb_api_url=YOUR_HONEYCOMB_API_URL_HERE
- Any other variables (like dataset_count, column_count, derived_column_count) can be left unset. Terraform will prompt you for them in the command line later.
- Run
terraform init
to download any necessary providers needed to work with your configuration. - Run
terraform validate
to check whether your current configuration is valid. - Run
terraform plan
. This will show a preview of everything that will be created if your runterraform apply
with your current configuration. - Run
terraform apply
. This will generate another plan and ask for your approval before creating anything. Type 'yes' and then look in the Honeycomb UI to see your applied changes. - Run
terraform destroy
. This will generate another plan and ask for your approval before destroying anything. Type 'yes' and then look in the Honeycomb UI to see that everything was destroyed. Some resources (like datasets) cannot be deleted with the provider. You'll have to delete these by deleting your team if your want to clean up.