• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Waypoint
  • Install
  • Tutorials
  • Documentation
  • CLI
  • Plugins
  • Try Cloud(opens in new tab)
  • Sign up
Waypoint Home

Documentation

Skip to main content
  • Documentation
  • Getting Started


    • Overview
      • Overview
      • Input Variables
      • External Data
      • artifact
      • deploy
      • entrypoint
      • labels
      • path
      • workspace
    • app
    • build
    • config
    • deploy
    • hook
    • plugin
    • registry
    • release
    • runner
    • url
    • use
    • variable
  • URL Service
  • Logs
  • Exec
  • Workspaces
  • Plugins
  • Triggers

  • Troubleshooting
  • Glossary

  • Roadmap

  • Resources

  • Tutorial Library
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  1. Developer
  2. Waypoint
  3. Documentation
  4. waypoint.hcl
  5. Variables
  6. workspace
  • Waypoint
  • v0.9.x
  • v0.8.x
  • v0.7.x
  • v0.6.x
  • v0.5.x
  • v0.4.x
  • v0.3.x
  • v0.2.x
  • v0.1.x

ยปworkspace Variables

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:

dockerfile = "${path.project}/Dockerfile.${workspace.name}"
Edit this page on GitHub

On this page

  1. workspace Variables
  2. workspace.name
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)