Unable to run terraform even after switching to the directory where terraform file located during deployment stage

There are 2 issues here, one is terraform is unable to find the configuration files even after switching to the directory before running terraform command (tried running the same commands listed in deploy stage in debug mode and it worked) and second is unable to export the value for the variable EC2_PUBLIC_DNS inside a bash script.

When I tried running multiple commands in the deploy stage due to the fact that I wanted to export the value for EC2_PUBLIC_DNS from terraform output. Adding all these commands to a single bash script and exporting that variable is not working hence I am using above mentioned approach where I am running each commands in deploy stage rather than inside a bash script.

–––––––––––––––
The following details will be sent along to help us help you better, but you may also edit them as you like.

Build Logs:

https://travis-ci.com/github/acatus/simplified_installer/builds/169718103
https://travis-ci.com/github/acatus/simplified_installer/builds/343883536

Config: https://travis-ci.com/github/acatus/simplified_installer/builds/169718769/config

Page: https://travis-ci.com/github/acatus/simplified_installer/jobs/343883536

Technical details:

  • UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
  • Vendor: Google Inc.
  • Platform: Win32
  • App Version: 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
  • Language: en-US
Imprint