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

TerraformPlugin: make it easy to detect the current terraform version #186

Closed
kmanning opened this issue Jan 30, 2020 · 0 comments
Closed
Labels
enhancement New feature or request
Milestone

Comments

@kmanning
Copy link
Collaborator

kmanning commented Jan 30, 2020

UseCase: I want to be able to easily detect the correct terraform version, so that I can use that version for other purposes - like pulling in a dockerfile image that automatically matches the version of terraform that I'm using.

The example below pulls a terraform docker image that matches the version of terraform that was detected for your project.

Jenkinsfile.init(this)

def terraformVersion = TerraformPlugin.checkVersion()
AgentNodePlugin.withAgentDockerImage("hashicorp/terraform:${terraformVersion}")
               .withAgentDockerImageOptions("--entrypoint=''")
               .init()
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant