'is it possible to read values from a tfvars file in Jenkins?

I have some terraform code that uses a map of tfvars to deploy multiple lambdas to Aws. it all works fine except I want to run the script in a Jenkins pipeline which would need to download the jars from Nexus first for each lamda. is there a way I can read the tfvars file in the Jenkins pipeline to get the names of the jars to download from Nexus, copy them into the working dir on Jenkins and then upload them using terraform?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source