Variable Definitions
The variable argument block is the main construct for defining variables, their values, and their relationships in a Terraform blueprint configuration. The argument configurations allow for a very wide range of expressive possibility through their various combinations.
The variable argument block supports nine arguments:
Argument | Description | Required |
name | The name of the variable, must match the variable defintion in a Terraform module to override it's configuration. | Yes |
display_name | A readable display name to show to the consumer, defaults to name. | No |
helper_text | Descriptive text shown to the consumer in the collection form giving context and requirements for the values to be provided. | No |
type | The type of the variable, must be shortText, radio, checkbox, or map. | No |
value | A static value or reference value assigned to the variable. | No |
options | An options block defining the options for a radio or checkbox | No |
validation_rule | A validation_rule block defining validation rules for the variable. | No |
required_values | A list of string values that are required for a list element. | No |
conditional | A conditional block defining behavior based on the value of other variables. | No |
These arguments are detailed in the sections below.
Example variable definition requesting a string input for the variable application:
Example variable definition defining a static value namespace set to autocloud:
The form display arguments name, display_name and helper_text determine how the variable will be displayed to the consumer. For example, imagine this variable is defined in a module:
and a blueprint configuration with this variable block:
The consumer form will display this form element:

ο»Ώ
ο»Ώ
Some display elements such as radio buttons require multiple options for the user to choose from. To support this, the options argument block is used. The options block takes one or more option child block to define the choices available to the user. The option block supports the following arguments:
Argument | Description | Required |
label | Display text for the option. If no label is provided, the value will be used. | No |
value | The value of the option. | Yes |
checked | A boolean indicating whether or not the option is checked by default. Only one option may have this argument set to true. Defaults to false, not checked. | No |
Example radio:
Variables may have validation rules applied to them. The validation_rule argument block implements these rules. Currently, only a single rule type is supported. The argument block supports two arguments:
Argument | Description | Required |
rule | Name of rule to apply. Currently, only isRequired is supported. | Yes |
error_message | An error message shown to the user in the event of validation failure. | Yes |
The isRequired rule checks to ensure that a value is given for the variable. If not value is provided, validation is failed, and the message provided in the error_message argument is shown to the consumer.
Example:
In many circumstances it is necessary to have the value of an input variable depend on the value of another. For example, the value of a DNS record may depend on the environment that the application is deployed in. To support these use cases, the conditional argument block is used. The block supports the following arguments:
Argument | Description | Required |
source | A module variable reference on whose value the conditional will change. | Yes |
condition | The value of the source variable for which the content applies. | Yes |
content | The content of the variable block when the condition is met. Follows the same syntax as the normal variable block. | Yes |
Example:
ο»Ώ
ο»Ώ
ο»Ώ
