You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if this tool allowed to avoid the painful process (ok, I'm lazy) of adding variable block definitions each time a new variable is referenced in a config.
e.g. if we have a file main.tf in the config like:
resource aws_instance example {
ami = var.ami
...
}
Would check to see if a variable definition exists already for ami and if not add this to a tfvar_vars.tf file.
Options:
append to existing vars.tf (specify file on command-line)
recurse into sub-directories aka modules
generate current outputs such as env vars, cli flags, terraform.tfvars
The text was updated successfully, but these errors were encountered:
Thank you for the suggestion. Currently, this tool looks for variable blocks and extracts the information. If we'd implement something like the above, we'd need to do it "in reverse"? It'd be like asking an editor to perform autocompletion on a variable declaration based on its usage. It does seem very interesting, and I am happy to accept PR for this feature.
It would be great if this tool allowed to avoid the painful process (ok, I'm lazy) of adding variable block definitions each time a new variable is referenced in a config.
e.g. if we have a file main.tf in the config like:
resource aws_instance example {
ami = var.ami
...
}
Would check to see if a variable definition exists already for ami and if not add this to a tfvar_vars.tf file.
Options:
The text was updated successfully, but these errors were encountered: