Inspectopedia
 
2024.3

Unused elements

Warning
Code Style
New
Last modified: 03 December 2024

Reports unused variables, locals, and data sources in a Terraform module and provides a quick-fix to remove them.

Example of a problem:

In this example, unused_data_source, unused_variable1, and unused_local1 are declared in the file, but are not used anywhere.

After the quick-fix is applied: