June 20-22 Announcing HashiConf Europe full schedule: keynotes, sessions, labs & more Register Now
  • Infrastructure
    • terraform
    • packer
  • Networking
    • consul
  • Security
    • vault
    • boundary
  • Applications
    • nomad
    • waypoint
    • vagrant
  • HashiCorp Cloud Platform

    A fully managed platform to automate infrastructure on any cloud with HashiCorp products.

    • consul
    • terraform
    • vault
    • packerbeta
    Visit cloud.hashicorp.com
  • Overview
  • Tutorials
  • Docs
  • CLI
  • Plugins
  • Community
GitHub
Download
    • v0.8.x (latest)
    • v0.7.x
    • v0.6.x
    • v0.5.x
    • v0.4.x
    • v0.3.x
    • v0.2.x
    • v0.1.x
    • Overview
      • Overview
      • Helm
      • Heroku, Vercel, etc.
      • Kubernetes
  • Getting Started
    • Overview
    • Compatibility Promise
    • Protocol Version Table
    • Release Notifications
      • Overview
      • Upgrade to 0.2.0

    • Install
    • Externally Built Images
    • Building Container Images
    • Helm Deployment
    • YAML-Free Deployment
    • YAML Directory Deployment
    • Resource Status
    • ConfigMaps and Secrets

    • Overview
    • Git Integration
    • Remote Operations
    • Overview
    • Build
    • Deploy
    • Release
    • Hooks
    • Labels
    • Workspace and Label Scoping
    • Overview
      • Overview
      • Input Variables
      • External Data
      • artifact
      • deploy
      • entrypoint
      • labels
      • path
      • workspace
      • Overview
      • Full Reference
      • Templating
      • Overview
      • Expressions
      • JSON Syntax
    • app
    • build
    • config
    • deploy
    • hook
    • plugin
    • registry
    • release
    • runner
    • url
    • use
    • variable
  • URL Service
  • Logs
  • Exec
    • Overview
    • Dynamic Values
    • Files
    • Internal Values
    • Workspace and Label Scoping
    • Overview
      • Overview
      • OIDC
      • Overview
      • Maintenance
      • Production
      • Security
    • Express Server Install
    • Overview
    • Configuration
    • Profiles
    • On-Demand Runner
    • Additional Runners
  • Workspaces
  • Plugins
  • Triggers

    • Overview
      • Overview
      • Registering Plugin Components
      • Handling Configuration
      • Implementing the Builder Interface
      • Compiling the Plugin
      • Creating an Example Application
      • Testing the Plugin
    • Initializing the SDK
    • Passing Values Between Components
      • Overview
      • Authenticator
      • Configurable
      • ConfigurableNotify
      • Builder
      • Registry
      • Platform
      • ReleaseManager
      • Destroy
      • Status
      • Default Parameters
      • Overview
    • Overview
    • Disable
    • Overview
    • GitHub Actions
    • GitLab CI/CD
    • CircleCI
    • Jenkins
  • Troubleshooting
  • Glossary

    • Overview
    • Architecture
    • Operation Execution
  • Roadmap
Type '/' to Search

»Configuration Syntax

This page describes the syntax of the waypoint.hcl configuration language. The waypoint.hcl file uses either HCL or JSON, allowing both human and machine friendly formats. The recommended and typical format is HCL.

HCL is also used by other HashiCorp products such as Terraform. It is not necessary to know all of the details of HCL syntax in order to use Waypoint, and so this page summarizes the most important details. If you are interested, you can find a full definition of HCL syntax in the HCL native syntax specification.

»Parameters and Stanzas

The waypoint.hcl configuration syntax is built around two key syntax constructs: parameters and stanzas.

»Parameters

A parameter assigns a value to a particular name:

image_id = "abc123"
image_id = "abc123"

The identifier before the equals sign is the parameter name, and the expression after the equals sign is the parameter's value.

The context where the parameter appears determines what names and value types are valid. Parameter values can also be built up using expressions which allow the value to either be specified literally or generated from other values programmatically.

»Stanzas

A stanza is a container for other configuration content:

app "web" {
  build {
    use "docker {
      dockerfile = "${path.app}/Dockerfile"
    }
  }

  # ...
}
app "web" {
  build {
    use "docker {
      dockerfile = "${path.app}/Dockerfile"
    }
  }

  # ...
}

In this example, app, build, and use are all stanzas.

A stanza has a type (such as app in this example). Each stanza type defines zero or more labels that must follow the type keyword. The app type expects one label, which is "web" in the example above. A particular stanza type may have any number of required labels, or it may require none as with the nested build stanza type.

After the stanza type keyword and any labels, the stanza body is delimited by the { and } characters. Within the stanza body, further parameters and stanzas may be nested, creating a hierarchy of stanzas and their associated parameters.

All of the stanza types that Waypoint supports are listed in the documentation sidebar to the left. The documentation uses placement tables to document the context in which stanzas are valid.

»Comments

Waypoint configuration supports three different syntaxes for comments:

  • # begins a single-line comment, ending at the end of the line.
  • // also begins a single-line comment, as an alternative to #.
  • /* and */ are start and end delimiters for a comment that might span over multiple lines.

The # single-line comment style is the default comment style and should be used in most cases. Automatic configuration formatting tools may automatically transform // comments into # comments, since the double-slash style is not idiomatic.

»Identifiers

Parameter names, stanza type names, variables, etc. are all identifiers.

Identifiers can contain letters, digits, underscores (_), and hyphens (-). The first character of an identifier must not be a digit, to avoid ambiguity with literal numbers. For complete identifier rules, Waypoint implements the Unicode identifier syntax, extended to include the ASCII hyphen character -.

»Character Encoding and Line Endings

Waypoint configuration files must always be UTF-8 encoded. While the delimiters of the language are all ASCII characters, Waypoint accepts non-ASCII characters in identifiers, comments, and string values.

Waypoint accepts configuration files with either Unix-style line endings (LF only) or Windows-style line endings (CR then LF), but the idiomatic style is to use the Unix convention, and so automatic configuration formatting tools may automatically transform CRLF endings to LF.

github logoEdit this page

Using Waypoint

The best way to understand what Waypoint can enable for your projects is to give it a try.

Waypoint tutorials
Waypoint documentation
Tutorial

Get Started - Kubernetes

Build, deploy, and release applications to a Kubernetes cluster.

View
Tutorial

Introduction to Waypoint

Waypoint enables you to publish any application to any platform with a single file and a single command.

View

Waypoint is maintained by HashiCorp, Inc.

View Code of Conduct
DocumentationCLI ReferenceTutorialsIntegrations
All systems normal