Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use local terraform binary #603

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mdimiceli
Copy link
Contributor

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
Copy link
Contributor

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 romain-dartigues deleted the use-local-terraform-binary branch May 26, 2024 06:16
@romain-dartigues romain-dartigues restored the use-local-terraform-binary branch May 26, 2024 06:18
@romain-dartigues
Copy link
Contributor

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?

@ramonskie
Copy link
Contributor

ramonskie commented May 27, 2024

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
Copy link
Contributor

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

@rkoster
Copy link

rkoster commented Jul 4, 2024

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

@rkoster rkoster marked this pull request as draft July 4, 2024 14:40
@mdimiceli
Copy link
Contributor Author

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

@mdimiceli mdimiceli marked this pull request as ready for review August 23, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Pending Review | Discussion
Development

Successfully merging this pull request may close these issues.

None yet

5 participants