» Environments API

Environments represent running infrastructure managed by Terraform.

Environments can also be connected to Consul clusters. This documentation covers the environment interactions with Terraform.

» Get Latest Configuration Version

This endpoint updates the Terraform variables for an environment. Due to the sensitive nature of variables, they are not returned on success.

Method Path
PUT /environments/:username/:name/variables

» Parameters

  • :username (string: <required>) - Specifies the username or organization name under which to update variables. This username must already exist in the system, and the user must have permission to create new configuration versions under this namespace. This is specified as part of the URL.

  • :name (string: <required>) - Specifies the name of the environment for which to update variables. This is specified as part of the URL.

  • variables (map<string|string>) - Specifies a key-value map of Terraform variables to be updated. Existing variables will only be removed when their value is empty. Variables of the same key will be overwritten.

» Sample Payload

  "variables": {
    "desired_capacity": "15",
    "foo": "bar"

» Sample Request

$ curl \
    --header "X-Atlas-Token: ..." \
    --header "Content-Type: application/json" \
    --request PUT \
    --data @payload.json \

» Sample Response

(empty body)