Understand the TFLint plugin architecture
masterTFLint is a pluggable linter that does not contain rule implementations. Instead, rules are provided as external plugins launched as subprocesses. Communication between the TFLint host and plugins occurs over gRPC.
In this architecture, both the host and the plugin act as both gRPC server and client:
Plugin (Client) to Host (Server) requests:
- Retrieve Terraform configs (e.g.,
aws_instance.main) - Evaluate expressions (e.g.,
var.foo) - Save reported issues to the host server
Host (Client) to Plugin (Server) requests:
- Apply plugin configurations
- Request to run inspections
Plugin development is based on the TFLint plugin SDK.