thousandeyes / terraform-provider-thousandeyes

ThousandEyes Terraform Provider
Apache License 2.0
21 stars 26 forks source link
terraform terraform-provider

Terraform Provider for ThousandEyes GitHub tag (latest SemVer) [license]()

The Terraform provider for ThousandEyes allows you to manage resources in ThousandEyes.

Requirements

Usage

The provider is on the Terraform registry. To use it, add the following code and run terraform init:

terraform {
  required_providers {
    thousandeyes = {
      source = "thousandeyes/thousandeyes"
      version = ">= 1.3.1"
    }
  }
}

Setting up provider

provider "thousandeyes" {
  token = "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
}

The provider requires a token. The token can be set on the token variable, as shown in the example, or it may instead be passed via the TE_TOKEN environment variable.

The provider also supports the following optional settings:

Examples

Example of an HTTP test:

data "thousandeyes_agent" "arg_cordoba" {
  agent_name = "Cordoba, Argentina"
}

resource "thousandeyes_http_server" "www_thousandeyes_http_test" {
  test_name      = "Example HTTP test set from Terraform provider"
  interval       = 120
  alerts_enabled = false

  url = "https://www.thousandeyes.com"

  agents {
    agent_id = data.thousandeyes_agent.arg_cordoba.agent_id
  }
}

Supported tests

Building The Provider

Clone repository to: $GOPATH/src/github.com/thousandeyes/terraform-provider-thousandeyes

$ git clone git@github.com:thousandeyes/terraform-provider-thousandeyes $GOPATH/src/github.com/thousandeyes/terraform-provider-thousandeyes

Enter the provider directory and build the provider:

$ cd $GOPATH/src/github.com/thousandeyes/terraform-provider-thousandeyes
$ make build

Follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.

Maintainers

This provider plugin is maintained by the ThousandEyes engineering team and accepts community contributions.

[!NOTE]
The docs/ folder should not be changed manually. Instead, if there are changes to the examples, inputs/outputs of any data_source or resource, you need to run go generate locally and commit the resulting changes to the .md files.

Acknowledgements

ThousandEyes would like to thank William Fleming, John Dyer, and Joshua Blanchard for their contribution and community maintenance of this project.