External Data
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.
You can access external data from a waypoint.hcl such as Vault secrets,
Kubernetes configuration, Terraform outputs, and more. External data is
sourced using the
dynamic
function
set as a default value for an
input variable.
Requirements: External data fetching does not works in jobs that run on CLI runners. You can still operate locally on waypoint.hcl files that fetch external data, but all the variables that fetch external values must be manually overridden.
Fetching External Data
The
dynamic
function
is used to fetch external data. This is the same function used to fetch
external data as app and runner configuration. This function is used to set
the value of the default
argument for
input variables, and then the input
variable is used as normal to access the value.
The dynamic
function is only allowed as a default value for input variables.
This ensures that all parametric data for a waypoint.hcl can be consumed
and overridden using standard mechanisms such as CLI flags, wpvars
files,
the UI, and more. For dynamic values, this also makes it easy to use and test
Waypoint with different values without modifying the remote system; you can
just override it using standard input variable mechanisms.
Available Data Sources
The list of available data sources can be found here. This list is maintained in the application configuration section since the same underlying system is used.
Custom data sources can also be implemented by extending Waypoint with a config sourcer plugin. The plugin then needs to be installed like any other plugin described in the extending Waypoint documentation.