• 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


  • URL Service
  • Logs
  • Exec
    • Overview
    • Dynamic Values
    • Files
    • Internal Values
    • Workspace and Label Scoping
  • 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. App Configuration
  5. Internal Values
  • 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

ยปInternal Values

Internal values are static or dynamic configuration values that can be referenced by environment variables, files, or other internal variables to compose values. An example common usecase is building a database connection string which requires a database host, username, password, etc. that may come from difference sources.

Using Internal Values

Internal values are declared in the waypoint.hcl file in the config stanza. The example below configures an internal value that reads a database username and host from a Terraform output and then combines them in an environment variable:

config {
  internal = {
    "db_host" = dynamic("terraform-cloud", {
      organization = "mycorp"
      workspace = "databases"
      output = "db_host"
    })

    "db_user" = dynamic("terraform-cloud", {
      organization = "mycorp"
      workspace = "databases"
      output = "db_user"
    })
  }

  env = {
    "DB_ADDR" = "${config.internal.db_user}@${config.internal.db_host}"
  }
}

The internal values db_host and db_user are never exposed directly to the application. Instead, only the combined value created in the DB_ADDR env var is exposed.

If the dynamic value of the database host or user changes, the environment variable will subsequently be updated and the application will be restarted using standard application restart behavior.

Edit this page on GitHub

On this page

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