plugin: Switch internal Terraform rules to the bundled plugin #1496
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.
Fixes #1352
Fixes #1056
See https://github.com/terraform-linters/tflint-ruleset-terraform
This PR cuts out the Terraform rules built directly into TFLint into a plugin for historical reasons. The plugin is bundled in the TFLint core as a bundled plugin so that if the plugin is not explicitly enabled, it will be automatically enabled. This allows end-users to use Terraform rules almost the same as before.
All rules are available if the plugin is enabled, but due to how this bundled plugin works, the "recommended" preset is automatically set when enabled automatically. This means that the following configuration is automatically inserted:
https://github.com/terraform-linters/tflint-ruleset-terraform/blob/1891988f8797be2006a30702505d7e00774ad3c0/docs/configuration.md
Please note that the "recommended" preset is different from the current default rules. The following rules are added to the rules enabled by default:
terraform_deprecated_index
terraform_required_providers
terraform_required_version
terraform_typed_variables
terraform_unused_declarations
This behavior can be changed by explicitly declaring a "terraform" plugin block. For example, the following declaration will enable all rules instead of the "recommended".
As with any plugin, you can enable a different version of the plugin than the bundled plugin by declaring the
version
andsource
. In this case, you need to runtflint --init
.TODO
cli_test.go
to integration teststerraform_required_version
rules running in non-Terraform workspaces