variable Stanza
Warning
This content is part of the legacy version of Waypoint that is no longer actively maintained. For additional information on the new vision of Waypoint, check out this blog post and the HCP Waypoint documentation.
Placement | variable |
The variable
stanza declares a variable and makes it available for use in
other stanzas in the config. Read more about
defining and using variables here.
Multiple variable
stanzas can be specified; there is no limit to the number
of variables you can define for your configuration.
Supply a value to a specified variable
with one of the following methods:
- the
default
value in the definition block - an environment variable on the runner specified by
env
in the definition block - the parameter
-var key=value
- the parameter
-var-file=filename
, wherefilename
is the name of a file with variable values - an environment variable prefixed with
WP_VAR_
- a file of variable values with the suffix
.auto.wpvars
- the Waypoint UI
variable
Parameters
Optional
default
(string: "")
- Sets a default value for the variable. Must be set tonull
if no value is set by other sources.type
(string: expression)
- A type constraint to apply to values for the defined variable.description
(string: "")
- A short summary documenting what the variable is and its purpose.env
(list of string: [])
- Sets a set of environment variables to source a default value from if a value is not set. The environment variables are read only on the runner. See environment variables for more information.