Integrating with Terraform

Terraform is a platform for building, combining and launching infrastructure. It’s a downloadable software that’s supported over most modern operating systems, and it’s possible to integrate this with Statuscake in order to create and configure tests.

First off you should log in to your Statuscake Account , grab your username from the User page , you will also need your API key, make a note of these details before continuing.

Next you will need to visit Terraform  and download their software for your chosen operating system. Once this is done you can begin using the integration.

Adding and modifying tests through Terraform:

Below is an example of how you would structure the addition of a new test through the Terraform terminal, authorization is always required and the website_name, website_url and test_type are required values, all other values are optional:

provider “statuscake” { //This is the field for which “Provider” or integration you want to use.

username = “testuser” //Statuscake username for auth.

apikey = “12345ddfnakn” //Statuscake API key for auth }

resource “statuscake_test” “google” { //resource being used and label

website_name = “” //name for the test

website_url = “” //url for the test

test_type = “HTTP” //protocol for the test

check_rate = 300 //how often the checks are made in seconds

paused = 0 // 0 = unpaused, 1 = paused }

Recommended Settings:



Leave A Comment?