Add support for Terraform v1.6+
wata727 opened this issue · comments
Introduction
Terraform v1.6 added the following features related to TFLint.
- Unknown value refinements
- hashicorp/terraform#33234
- This concept has already been introduced in HCL and cty and has also been applied to TFLint, but Terraform's built-in functions have been expanded on this concept in v1.6. If a plugin checks refinements, you may not be able to get full refinements without this change.
- Testing framework
- hashicorp/terraform#33325
- hashicorp/terraform#33339
- hashicorp/terraform#33683
- These updates are required for linting
.tftest.hcl
andtftest.json
files.
Proposal
Update the embedded Terraform fork to v1.6.
However, this change will be affected by the licensing change to BUSL. As a result, TFLint will be bound to MPL and BUSL. See #1826
Fortunately, this update does not immediately impact (refinement is an edge case) Terraform v1.6 users, so we can postpone this decision further. At this point, I'm on the side of accepting the license change. OpenToFu could be a solution, but maintaining full compatibility without any references to Terraform's implementation would be difficult. As long as TFLint exists as a "Terraform" linter, this option may not be practical.
References
- https://github.com/hashicorp/terraform/releases/tag/v1.6.0
- https://github.com/hashicorp/terraform/tree/v1.6.0/internal/addrs
- https://github.com/hashicorp/terraform/tree/v1.6.0/internal/configs
- https://github.com/hashicorp/terraform/tree/v1.6.0/internal/lang
- https://github.com/hashicorp/terraform/tree/v1.6.0/internal/terraform
- #1778