workspace Variables
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.
Workspace variables are used to read information about the currently active workspace.
workspace.name
Placement | * (global) |
The name of the currently active workspace.
A common use case for workspaces is to model environments (staging, production, etc.). This variable can be used to change behavior based on this workspace. In the example below, we change the Dockerfile used based on the workspace.
Example: