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
Current issue I know we've talked about is when running terraform plan output. The output file has relative paths to where it was ran. So if you ran apply on another node in jenkins and the paths where different. Things would break.
I'm wondering what happens when you set the environment variable TF_IN_AUTOMATION? Does it remove all those relative path issues?
The text was updated successfully, but these errors were encountered:
NVM. looking more through this. found this statement Before running apply, obtain the archive created in the previous step and extract it at the same absolute path.
I thought there was an open feature request on terraform to fix this, but apparently there isn't.
Extracting at the same absolute path is problematic in Jenkins, because (1) if you have multiple build nodes, you'd need to ensure that JENKINS_HOME is the same on all of them, and (2) if you're using GitHub Branch Source / Multibranch, I'm pretty sure the workspace paths are different for every build.
The only sure-fire way that I can think of to fix this is to run terraform inside a Docker container (i.e. with docker.image('image/name:tag').inside() { ... }, and mount the workspace in to some reproducible path like /app. But that's pretty ugly for multiple reasons, if you're not already doing it.
Current issue I know we've talked about is when running terraform plan output. The output file has relative paths to where it was ran. So if you ran apply on another node in jenkins and the paths where different. Things would break.
I'm wondering what happens when you set the environment variable
TF_IN_AUTOMATION
? Does it remove all those relative path issues?The text was updated successfully, but these errors were encountered: