Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Scoped config in waypoint.hcl #2237

Merged
merged 8 commits into from
Sep 8, 2021
Merged

Scoped config in waypoint.hcl #2237

merged 8 commits into from
Sep 8, 2021

Conversation

mitchellh
Copy link
Contributor

@mitchellh mitchellh commented Sep 7, 2021

This introduces the ability to scope configuration in waypoint.hcl to workspaces, labels, and runners. This is the frontend-implementation of the already-merged backend functionality in #2186.

The following shows a single waypoint.hcl example that is using all the functionality introduced in this PR. This is unlikely to be practical, I expect people will use bits and pieces at a time.

project = "foo"

config {
  env = { "ENV" = "default" }

  workspace "dev" {
    env = { "ENV" = "dev" }
  }

  // Could've just used "workspace" here but showing off...
  label "waypoint/workspace is 'production'" {
    env = { "ENV" = "prod" }
  }

  // These apply to on-demand runners only when working on things related
  // to this project.
  runner {
    env = { "BUILD_ENV" = "dev" }
  }
}

app "api" {
  // can use config in here too
}

@mitchellh mitchellh requested a review from a team September 7, 2021 17:57
@github-actions github-actions bot added the core label Sep 7, 2021
@mitchellh mitchellh added the pr/no-changelog No automatic changelog entry required for this pull request label Sep 7, 2021
@mitchellh mitchellh removed the pr/no-changelog No automatic changelog entry required for this pull request label Sep 7, 2021
Copy link
Contributor

@evanphx evanphx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at all this topological soooorting! /cc @izaaklauer

@mitchellh mitchellh merged commit 91ac77d into main Sep 8, 2021
@mitchellh mitchellh deleted the feature/config-scope branch September 8, 2021 15:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants