Skip to main content

Create Account Variables

In this section, you will find a guide on creating variables.


At StackSpot, there are three moments when different people need to configure responses for Plugin and Action Inputs:

  1. When configuring Stack Contexts for an Account or Workspace;
  2. When creating Plugins and Actions;
  3. When applying Plugins and using Actions to create Applications and Infrastructures within the Workspace.

Frequently, the responses to these Inputs are repetitive, requiring developers to write and rewrite the same information, which leads to errors and wasted time. To solve this problem, you can use Account Variables:

What are Account Variables?

Account Variables are pre-configured Input responses by Account Holders or Account Administrators, and they come in two types:

  1. Official StackSpot Variables;
  2. Account Variables that you can create for your Account.

The concept of Account Variables involves using a friendly name to reference a value you can reuse in various parts of StackSpot. By using a variable, developers have a single place to update these values, making it easier to implement changes that affect multiple Plugins and Actions.

Account Variables attributes

An Account Variable contains the following attributes:

  • Name: Defines the variable name, which should always follow the MACRO_CASE pattern.
  • Description: Describes the purpose of the variable to provide context to the user.
  • Type: Input type to accept text data.
  • Value: The value assigned to the variable. The Variable's value can be edited, but not its name. If you want the value to be fixed, you can set it as mandatory.

Check out the steps to create custom Account Variables below:

How to create Account Variables

Requirements

Steps

danger

Do not include sensitive data in your variables. For sensitive information, such as passwords, consider using the password input type or an external credential storage service.

Step 1. Go directly to the Account Portal; or after logging into the StackSpot Portal, click on your profile avatar.

Step 2. Click the 'Organization' option;

Step 3. In 'EDP' section click on 'Variables';

Step 4. Then, click on 'Create Variable';

Step 5. Now, configure your new Variable by filling in the fields:

  • 'VName': Give the Variable a name so that it can be identified;
warning
  • You must write the Variable name following the MACRO_CASE pattern. This means all letters must be uppercase and separated by an underscore.

For example, APPLICATION_NAME.

  • The Variable name cannot use the prefix STK. Only official StackSpot variables can use this prefix;
  • 'Value': Set the Variable value. If you want this value to be unchangeable when the Variable is used, check the 'Mandatory' checkbox.

  • 'Description': Describe the purpose of the Variable.

Step 4. Click 'Create Variable';

You've created your variable.

Next Steps