liveBook · Manning

Plugin

As explained in Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu

A plugin is a software component that extends a host application's capabilities through a defined extension interface.

When TFLint needs provider-specific or custom checks, a plugin extends its rule set through a defined interface. Each plugin supplies rules that static analysis can enforce without running the Terraform configuration. section 7.3.3

The Terraform plugin provides generic checks, but installation does not enable it automatically. Declare it in the project’s .tflint.hcl file, choose a preset, and then initialize TFLint before running analysis. section 7.3.3

Use plugins to manage rule coverage deliberately:

  • Select the recommended preset, switch to all for broader checks, or add and exclude individual rules. section 7.3.3

Run plugin-backed checks

A Make target can run `tflint --init` to install configured plugins and then `tflint` to report issues such as missing required versions or unused providers.

How Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu covers it

How deep it goes
Configures enablement, presets, versions, sources, exclusions, and inline exceptions, while custom plugin development requires Go.
Examples
Demonstrates Terraform, AWS, Azure, and Google plugins alongside Make targets, diagnostics, disabled rules, and inline ignores.
What it assumes
Assumes Terraform and TFLint usage, while defining plugins through concrete configuration and command examples.
What you can do after
Operate/configure TFLint plugins to initialize rule sets, customize checks, and handle justified exceptions.
How it connects
Connects static analysis, linters, Terraform providers, rule presets, and Open Policy Agent.

Also explained in

Compare how 6 books explain plugin →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu. The section links point to the parts of the book it draws on.