• 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 contentOverview
  • 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. path
  • 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

ยปpath Variables

Path variables are used to construct an absolute path to reference files or directories that may be used within your Waypoint configuration. For example, path variables may be used with the Docker builder to specify the path to the Dockerfile to build.

path.app

Placementapp

The directory of the application being built or deployed with Waypoint.

If path is not set for the app, this will always equal path.project. If you are referencing app-relative data, you should always use path.app in case you move the application in the future.

Example:

dockerfile = "${path.app}/Dockerfile"

path.project

Placement* (global)

The directory that contains the waypoint.hcl. This is the recommended variable to use when referencing files relative to the waypoint.hcl file.

Unlike path.pwd, this will always point to the directory where the waypoint.hcl is. If you execute Waypoint from a subdirectory and it loads a waypoint.hcl file in some parent directory, that directory will be the value of path.project. When executing the waypoint CLI in the same directory as the waypoint.hcl file, path.pwd and path.project are equivalent.

Example:

dockerfile = "${path.project}/Dockerfile"

path.pwd

Placement* (global)

The working directory for the CLI. This is equivalent to the result of pwd in the shell.

When executed from a subdirectory, Waypoint will search parent directories for a waypoint.hcl. In this case, the path.pwd variable will point to the subdirectory where you executed Waypoint, not the directory where the waypoint.hcl is.

Example:

dockerfile = "${path.pwd}/Dockerfile"

path.pwd is not recommended. You almost always want path.project or path.app instead. Using path.pwd makes Waypoint execution dependent on the current working directory when executing waypoint, which can be surprising to users.

Edit this page on GitHub

On this page

  1. path Variables
  2. path.app
  3. path.project
  4. path.pwd
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)