Fake mono repo for testing variables. This was made so we can test different scenarios manually while working on the Variable Editor project. If you want to make changes, it is best to first fork this repository so you can try things out as well.
- TFC doc on Variables & their precedence: https://www.terraform.io/cloud-docs/workspaces/variables#precedence-example
Default Workspace creation that uses the root directory.
- fork this repo and make it public
- in TFC add create 2 varsets in your org's settings:
Setup
- Select Version Control Workflow
- Choose this repository
- Don't open up advanced options & create workspace
- Even after the editor is re-added, you will still need to create an environment_variable in order to see it in the output
- you will also need to apply the workspace varset
Result
Your variable config should look like this:
Key things to note: The environment variable,a nd the global varset var should not come up as pending variables.
The output of a run should look like this:
Select a different working directory
- Select Version Control Workflow
- Again choose this repository
- You'll want to rename the workspace because it won't let you have 2 with the same name
- Open up the advanced options
Result Key things to note:
- The environment variable and the global varset var should not come up as pending variables.
- The auto var from the root directory should also not come up as a pending variable
- The output should only contain variables and values attached to the project_a (or b if you picked b)