core(runner) - Add option to use an existing terraform installation#819
Open
Minosity-VR wants to merge 1 commit intomainfrom
Open
core(runner) - Add option to use an existing terraform installation#819Minosity-VR wants to merge 1 commit intomainfrom
Minosity-VR wants to merge 1 commit intomainfrom
Conversation
Support STRATUS_TERRAFORM_BINARY_PATH env var to use a pre-installed binary. Falls back to downloading if the existing binary version is below the required minimum. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NathanaeldeLaChesnais
approved these changes
Apr 1, 2026
NathanaeldeLaChesnais
left a comment
There was a problem hiding this comment.
Do we want to mock tests for existingBinaryVersionSufficient?
Collaborator
Author
If we mock, we will just return an arbitrary version instead of calling the real terraform. Then what we will really test is just that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Enhancement: Support STRATUS_TERRAFORM_BINARY_PATH env var to use a pre-installed binary. Falls back to downloading if the existing binary version is below the required minimum.
Tested by using a local terraform version, it doesn't reinstall one.
Motivation
Soon™️ we are going to open source a wrapper for stratus to run it as a service. It requires some modifications in the core:
Having a controlable terraform binary rather than relying on the runner to download one makes it easier to deploy as a service - no request to hashicorp's domain that might need CNP authorisation + upcoming changes to allow a remote state would have conflicted - if using a remote state, it would end up storing the terraform binary remotely