bosh-bootloader icon indicating copy to clipboard operation
bosh-bootloader copied to clipboard

Use local terraform binary

Open mdimiceli opened this issue 1 year ago • 5 comments

Today it is not possible to choose which version of terraform to use with bbl.

This change adds a global flag to use the local terraform binary if it exists.

mdimiceli avatar May 14 '24 09:05 mdimiceli

the whole idea that we packed a specific terraform binary with bbl. was that the templates are version specific. so instead of relying on local install terraform. so my question is basically why you would use a local installed terraform?

ramonskie avatar May 23 '24 14:05 ramonskie

Hi @ramonskie!

Having a "one functional binary without caring about dependencies", like BBL, is indeed great.

But we have different use-cases where we would like to be able to select the terraform version without changing the whole bbl binary; to name a few:

  • we had some bugs which have been fixed in a more recent terraform version, this might not affect everyone and we would like to select the TF version
  • we want to test a new TF version (or why not, opentofu), without rebuilding bbl

This is an opt-in feature which does not change the normal bbl behaviour (and, hopefully, does not increase its size).

Would it be preferable to explicitly set the custom terraform binary location instead of a boolean flag?

romain-dartigues avatar May 26 '24 06:05 romain-dartigues

we are always happy to review prs if you have found any bugs. so we could upgrade terraform if you found that solved something.

and maby we should even keep up with the latest terraform versions in our ci

and yes it would be preferable if you set he terraform location instead of boolean flag. someting like --terraform-binary=/usr/bin/terraform i think that makes a bit more sense that set a flag and then rely on the env variable

ramonskie avatar May 27 '24 09:05 ramonskie

@romain-dartigues have you already had time to fix the adjustments?

ramonskie avatar Jun 13 '24 14:06 ramonskie

Converting to draft, feel free to mark ready for review once the above points have been addressed.

rkoster avatar Jul 04 '24 14:07 rkoster

Hi, I fixed the ajustements and the errors that appeared with the new version of golangci-lint

mdimiceli avatar Aug 23 '24 16:08 mdimiceli