Skip to content

Variables

Introduction

variables

Variables are, like secrets, a set of key-value data pairs for use in endpoint tasks. Unlike secrets however, they are not private and not protected. This means that they can be viewed, and are unsuitable for sensitive data. Additionally, they can be set with multiple scopes, allowing different conditions to access different data for the same variable.

Adding a new variable is accomplished by clicking the large + button at the top of the screen, entering a name, and at least one Scope (see below), followed by hitting Save.

Scopes

Scopes allow for different values to be presented based on the context. The following scopes are currently available to variables:

  • System
  • Tenant
  • Endpoint
  • Endpoint Environment
  • Endpoint Version

If multiple scopes are added, they are attempted in order with Endpoint Version having highest priority for a match, and System having lowest.

variable scopes

Using the above configuration as our example, if the Endpoint we run is magic, our test variable will result in value 1. This is because Tenant is the only scope that matches this endpoint, with the other scopes expecting the spell endpoint. If however, version 1 of our spell endpoint is in production, and we access that, then we can expect to get value 4. This is because Endpoint Version has the highest priority, even though all of the scopes match.

System

priority 5
System scoped variables are not definable directly by a user, and instead are specified in config files for the AireGlu install itself. This scope has the lowest priority in the chain.

Tenant

priority 4
A tenant-scoped value is accessible to all endpoints on the current account.

Endpoint

priority 3
Values in this scope are available only to the specified endpoint, regardless of version or environment.

Endpoint Environment

priority 2
The endpoint environment scope allows values to only be passed to Staging or Production endpoints, as specified. It also requires a specific endpoint to be named, and will not provide values to other endpoints. Other versions of the endpoint will also not get these values.

IMPORTANT

If an environment is named in the URL, this will take priority over endpoint versions. Additionally, if no version or environment is named in the url, then production is assumed and also takes priority over endpoint versions.

Endpoint Version

priority 1
This is the highest priority scope, and targets a specific version of a specific endpoint. If this scope matches, then it is always used, regardless of any other matching scopes.

IMPORTANT

This scope only applies when a version is specified in the URL of the endpoint.

Secret Variables

By clicking the key icon in the value field when creating a variable, you can tell it to reference a Secret instead. This allows you to apply secrets to different scopes in the same way as you would a regular variable. Be aware that this still does not let you see the value of the secret you choose.