The Terraform provider for ThousandEyes allows you to manage resources in ThousandEyes.
Due to some defects on the provider registry and also lack of supported functions, we just added two functions to show how this muodule works. We will add more function as soon as provider provides more modules.
- Terraform 0.12.x
- Thousandeyes Virtual Appliances
- Thousandeyes Profile
The virtual appliance is a virtual machine containing a pre-built ThousandEyes Enterprise Agent, which can be quickly imported into virtualization software, configured and made available for use in testing. This article describes the requirements and steps required to install and use the ThousandEyes virtual appliance.
The installation process for a Virtual Appliance consists of two parts:
- Import the virtual appliance into your virtualization software (hypervisor)
Installation instructions fall into one of two groups, depending on the type of hypervisor:
- Virtualization software that supports Open Virtualization Format (OVA/OVF): Oracle VirtualBox, VMWare products, Microsoft Hyper-V for Windows Server 2012, 2016
- Virtualization software that does not support Open Virtualization Format (OVA/OVF): Microsoft Hyper-V for Windows Server 2008 Configure the virtual appliance
Before starting with the import it is necessary to know where these resources can be accessed.
-
Enterprise Agents are listed in the Agent Settings.
-
If no agents have been installed yet, the listing shows No Enterprise Agents Found
-
To import a virtual appliance agent from this area, click Add New Enterprise Agent.
-
Follow the steps below to proceed with the import from this area of the ThousandEyes platform.
-
Download the latest thousandeyes-va-.ova file from the Cloud & Enterprise Agents > Agent Settings > Enterprise Agents > Agents page.
-
Click Add New Enterprise Agent on the left side of the Agent Settings screen.
-
There are several package types and options under this Menu. Under the Package Type, “Appliance” should be selected: Click the button in the listing labeled Download - OVA for Virtual Appliance shown above the link for this Installation Guide.
-
Double-click the downloaded thousandeyes-va-latest.ova file, or import it based on the virtualization software if this does not occur automatically. Click the import button and the progress of the installation will be shown.
-
Go through the steps in the VM application you have. Note: We recommend at least 2GB RAM memory allocated for the virtual appliance.
-
No matter which platform you choose, you will need to configure your guest (virtual machine) to use a bridged network connection, so that the guest has unimpeded network and Internet access. (see the screenshot below). NOTE: For VMware hypervisors, the VMXNET 3 adapter type is recommended. Flexible adapters are currently not supported.
-
Configure the virtual appliance.
In order to get a new agent to appear in the Agents Settings page listing the newly downloaded ThousandEyes Enterprise Agent, the virtual appliance will need to be configured.
-
After the system starts, a screen will appear that will show and IP address for the management console and default access credentials
-
Access the ThousandEyes virtual appliance interface through the URL in that screen and login with the credentials shown.
Open a browser entering the URL presented on the screen. Enter the default username and password given.
Change the virtual appliance management console Web Interface Password, and click Change Password.
- Following that enter the Account Group Token in the field that will show up under the Agent section. This should appear automatically after changing the password.
- Retrieve the Account Group token from Cloud & Enterprise Agents > Agent Settings > Enterprise Agents > Agents > Add New Enterprise Agents view. It can be found under the link labeled "Show Account Group Token for Installation". This will reveal the token so it may be copied for use.
Paste the Account Group Token into the Account Token field. The field should turn green.
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"
}
}
}
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_id
may 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
.timeout
may 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.
below code will create two https test and will enterprise agent we setup earlier. all variable must address based on the configuration.
data "thousandeyes_agent" "ce_agent" {
agent_name = var.ce_agent_name
}
resource "thousandeyes_agent_to_server" "server_test" {
test_name = "my agent test"
interval = 120
server = "www.google.com"
port = 80
agents {
agent_id = data.thousandeyes_agent.ce_agent.agent_id
}
}
resource "thousandeyes_http_server" "google_http_test" {
test_name = "google test"
interval = 120
url = "https://google.com"
agents {
agent_id = data.thousandeyes_agent.ce_agent.agent_id
}
agents {
agent_id = 467841
}
}
after adding repository on Github, Terraform will push the codes to the Thousandeyes API.
This will create 2 tests we created earlier.
All other setting for the tests can be configured via coding or it can be configured on the GUI.
Below test can be deployed via Terraform
- agent-to-agent
- agent-to-server
- alert-rule
- bgpS
- dnssec
- dns-server
- dns-trace
- ftp-server
- http-server
- page-load
- sip-server
- voice-call
- voice (RTP stream)
- web-transactions
Please visit our repositories for more detail and other projects in automation and programability:
https://github.com/bay-infotech
We are working hard to bring more automation and programmability into community. Please contact us for more detail projects and solutions