-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support folder-level -var-file
setting
#1478
Comments
Hi @anilkumarmyla I'm afraid that there isn't any good way of making this work "out of the box" the way you suggest where "go-to-reference/definition" brings up the relationship between your I'm curious if having some settings and/or environment variables to give the extension/LS hints would be a good compromise? I'm wondering how do your team members know how exactly to execute |
@radeksimko Thanks for the quick response
Yes, this would be a good comprose like say scan this subdirectory for this root-module for additional files, something along the lines of
Our automation takes care of substituting the right var-file for supported environments, most team members only work on the dev environment where they have sufficient privileges, rest of them are handled by automation |
-var-file
setting
Versions
Extension
Problem Statement
We have an unorthodox file structure for terraform project as follows
where we store tfvars for different environments in a subfolder and pass them to terraform plan as
-var-file tfvars/{env}.tfvars
.This workflow works fair but with vscode references to variables don't show anything from
tfvars/{env}.tfvars
since the extension expects tfvars to be in the same folder. If we move the tfvars files up one level where the root module is, vscode does indeed show the references in{env}.tfvars
files. But moving these files one level above clutters the project with too many files and distinction between config and code is lost.Expected User Experience
Reference to tfvars file in a subfolder should be resolved and shown
Proposal
Don't have enough knowledge on the internals to propose something
References
#636 has resolved tfvars support but that only works if tfvars files are in root module folder
The text was updated successfully, but these errors were encountered: