The Terraform provider for ThousandEyes allows you to manage resources in ThousandEyes.
This provider version is only compatible with the ThousandEyes API v7.
The same breaking changes are applied to the provider as they are to the API.
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 = ">= 3.0.0"
}
}
}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:
account_group_idmay be set to distinguish between affected account groups, if your ThousandEyes account supports more than one. This may instead be set by the environment variableTE_AID.timeoutmay be set to specify the number of seconds to wait for responses from the ThousandEyes endpoints. This may instead be set by the environment variableTE_TIMEOUT. If this is unset or set to0, then the thousandeyes-sdk-go library will use its default settings.api_sdk_logs_enabledcan be enabled to assist with troubleshooting by providing detailed logs from the ThousandEyes SDK. The default value isfalse.
Example of an HTTP test:
data "thousandeyes_agent" "arg_cordoba" {
agent_name = "Cordoba, Argentina"
}
resource "thousandeyes_http_server" "example_http_server_test" {
test_name = "Example HTTP test set from Terraform provider"
interval = 120
alerts_enabled = false
url = "https://www.thousandeyes.com"
agents = [data.thousandeyes_agent.arg_cordoba.id]
}- agent-to-agent
- agent-to-server
- bgp
- dnssec
- dns-server
- dns-trace
- ftp-server
- http-server
- page-load
- sip-server
- voice (RTP stream)
- web-transactions
- api
- alert rules
- connectors
- connector assignments
- tags
- tag assignments
- account groups
- users
- roles
- dashboards
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-thousandeyesEnter the provider directory and build the provider:
$ cd $GOPATH/src/github.com/thousandeyes/terraform-provider-thousandeyes
$ make buildFollow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.
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.
Join the discussion in the ThousandEyes Community. For bug reports, feature requests, or questions about this provider, please contact ThousandEyes Support.
ThousandEyes would like to thank William Fleming, John Dyer, and Joshua Blanchard for their contribution and community maintenance of this project.
See https://github.com/thousandeyes/terraform-provider-thousandeyes/releases.