Skip to content

Get the Terraform version being used #391

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

Open
wata727 opened this issue Apr 16, 2025 · 0 comments
Open

Get the Terraform version being used #391

wata727 opened this issue Apr 16, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@wata727
Copy link
Member

wata727 commented Apr 16, 2025

See also terraform-linters/tflint-ruleset-aws#859, terraform-linters/tflint-ruleset-terraform#156

For some rules, you may want to change behavior based on the version of Terraform being used. It would be nice to be able to easily get the Terraform version using the SDK.

The terraform_workspace_remote rule determines the version based on the required_version in the terraform blocks. One idea is to expose this functionality as an API in the SDK.

Other ideas would be to look for a .terraform-version file, or add terraform_version as a TFLint config (It used to exist but has now been removed terraform-linters/tflint#311) and reference that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant