Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I run terraform apply from Bamboo?

Victor Damian-Chicon November 11, 2018

I have tried adding a server capability type executable command defining the path were terraform is install in the Bamboo server. However when running a local agent I get:

/opt/bamboo-home/temp/..611127650554.sh: line 6: /usr/bin/terraform: No such file or directory

1 answer

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2018

Hi! 

 

@Victor Damian-Chicon have you checked under bamboo user visibility of the /usr/bin/terraform ?

Capability, used like the filter of the your agents. 

Cheers,

Gonchik Tsymzhitov

Victor Damian-Chicon November 12, 2018

Thank you. Im a noob of course. It helps if I work on the right server : ( . ....
so

  • installed terraform in /usr/bin/terraform (in the right server this time ¯\_(ツ)_/¯)
  • /usr/bin/ is in the bamboo path (URL..../admin/systemInfo.action or install_dir.../bin/setenv.sh)
  • added Server Capability terraform Executable -> Command -> path /usr/bin/terraform (URL..../admin/agent/configureSharedLocalCapabilities.action)
  • Created Plan -> Job -> task -> script -> shell -> inline -> body .... and

           green logs:

            terraform -v

           Terraform v0.11.10

 

Thank you Gonchik Tsymzhitov

Like # people like this
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 13, 2018

You are welcome! 

Pieter Smit March 6, 2022

Might also want to look at a tool that can select a specific terraform version.

e.g. https://github.com/warrensbox/terraform-switcher

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events