cloudfoundry / bosh-bootloader

Command line utility for standing up a BOSH director on an IAAS of your choice.
Apache License 2.0
178 stars 180 forks source link

Use local terraform binary #603

Open mdimiceli opened 2 months ago

mdimiceli commented 2 months ago

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.

ramonskie commented 1 month ago

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?

romain-dartigues commented 1 month ago

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:

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?

ramonskie commented 1 month ago

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 commented 1 month ago

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

rkoster commented 2 weeks ago

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