Terraform

GET /terraform/instances

Get the terraform instances

Response JSON Object:
 
  • [] (object) –
  • [].instanceID (string) –
  • [].source (string) –
  • [].destination (string) –
  • [].bastionID (string) –
  • [].clusterID (string) –
  • [].serverIPs (string) –

Example response:

[
  {}
]
GET /terraform/instance/{instanceID}

Get the terraform instances

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • instanceID (string) –
  • source (string) –
  • destination (string) –
  • bastionID (string) –
  • clusterID (string) –
  • serverIPs (string) –

Example response:

{}
GET /instance/{instanceID}/tfvars/default

Get the default terraform variables.

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • [key] – . Type can be any of boolean,integer,number,object,string,null.

Example response:

{}
GET /terraform/instance/{instanceID}/tfvars

Get the terraform variables. This is the content of the terraform.tfvars file.

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • [key] – . Type can be any of boolean,integer,number,object,string,null.

Example response:

{}
POST /terraform/instance/{instanceID}/tfvars

Set the terraform variables. This is the content of the terraform.tfvars file.

Parameters:
  • instanceID – The instance ID
Request JSON Object:
 
  • [key] – . Type can be any of boolean,integer,number,object,string,null.

Example query:

{}
POST /terraform/instance/{instanceID}/get

Execute the terraform get command

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • data (string) –

Example response:

{}
POST /terraform/instance/{instanceID}/plan

Execute the terraform plan command

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • data (string) –
  • instanceID (string) –
  • category (string) –
  • command (string) –
  • args (string) –
  • error (string) –
  • start (string) –
  • end (string) –

Example response:

{}
POST /terraform/instance/{instanceID}/refresh

Execute the terraform refresh command

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • data (string) –
  • instanceID (string) –
  • category (string) –
  • command (string) –
  • args (string) –
  • error (string) –
  • start (string) –
  • end (string) –

Example response:

{}
POST /terraform/instance/{instanceID}/apply

Execute the terraform apply command

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • data (string) –
  • instanceID (string) –
  • category (string) –
  • command (string) –
  • args (string) –
  • error (string) –
  • start (string) –
  • end (string) –

Example response:

{}
POST /terraform/instance/{instanceID}/destroy

Execute the terraform destroy command

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • data (string) –
  • instanceID (string) –
  • category (string) –
  • command (string) –
  • args (string) –
  • error (string) –
  • start (string) –
  • end (string) –

Example response:

{}
POST /terraform/instance/{instanceID}/output

Execute the terraform output command

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • sensitive (boolean) –
  • type (string) –
  • value (undefined) –

Example response:

{}
GET /instance/{instanceID}/content/{contentID}

Get the content of a {contentID}.tf.json file

Parameters:
  • instanceID – The instance ID
Response JSON Object:
 
  • [key] – . Type can be any of boolean,integer,number,object,string,null.

Example response:

{}
POST /instance/{instanceID}/content/{contentID}

Set the content of a {contentID}.tf.json file

Parameters:
  • instanceID – The instance ID
Request JSON Object:
 
  • [key] – . Type can be any of boolean,integer,number,object,string,null.

Example query:

{}
DELETE /instance/{instanceID}/content/{contentID}

Delete a {contentID}.tf.json file

Parameters:
  • instanceID – The instance ID

Commands

GET /terraform/instance/{instanceID}/commands

Get the commands

Parameters:
  • instanceID – The instance ID
Query Parameters:
 
  • current – If true, only return executing commands
Response JSON Object:
 
  • [] (object) –
  • [].data (string) –
  • [].instanceID (string) –
  • [].category (string) –
  • [].command (string) –
  • [].args (string) –
  • [].error (string) –
  • [].start (string) –
  • [].end (string) –

Example response:

[
  {}
]
GET /terraform/instance/{instanceID}/log/{commandID}

Get a command log

Parameters:
  • instanceID – The instance ID
  • commandID – The command ID
Query Parameters:
 
  • origin – Either start or end
  • offset – The offset to the origin
  • size – The max size of the return value
Response JSON Object:
 
  • offset (integer) –
  • data (string) –
  • isDone (boolean) –

Example response:

{}
GET /instance/{instanceID}/terminate/{commandID}

Terminate a command

Parameters:
  • instanceID – The instance ID
  • commandID – The command ID
GET /instance/{instanceID}/kill/{commandID}

Kill a command

Parameters:
  • instanceID – The instance ID
  • commandID – The command ID