Skip to content

Get the Terraform version being used #391

Open
@wata727

Description

@wata727

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions