Skip to content

chore: correct user-guide for plugins and make them more understandable #2334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Netkracker
Copy link

@Netkracker Netkracker commented Jun 17, 2025

Updating docs for plugin development. Docs seem to be wrong for windows systems.

.tflint.hcl

plugin "azurerm" {
    enabled = true
    version = "0.28.0"
    source  = "github.com/terraform-linters/tflint-ruleset-azurerm"
}

plugin "terraform" {
    enabled = true
    version = "0.12.0"
    source  = "github.com/terraform-linters/tflint-ruleset-terraform"
}

plugin "postch" {
  enabled = true
}

Placing local plugin into directory defined in docs
image

tflint debug

12:06:40 runner.go:47: [INFO] Initialize new runner for root
12:06:40 discovery.go:90: [DEBUG] Find plugin path: C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe
12:06:40 discovery.go:54: [INFO] Plugin "azurerm" found
12:06:40 [DEBUG] cmdrunner/cmd_runner.go:73: starting plugin: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe args=["C:\\Users\\SamAccountName\\.tflint.d\\plugins\\github.com\\terraform-linters\\tflint-ruleset-azurerm\\0.28.0\\tflint-ruleset-azurerm.exe"]
12:06:40 [DEBUG] cmdrunner/cmd_runner.go:80: plugin started: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe pid=22628
12:06:40 [DEBUG] [email protected]/client.go:827: waiting for RPC address: plugin=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe  
12:06:40 [DEBUG] [email protected]/client.go:1216: tflint-ruleset-azurerm.exe: 12:06:40 [DEBUG] [email protected]/server.go:419: plugin address: network=tcp address=127.0.0.1:10000
12:06:40 [DEBUG] [email protected]/client.go:880: using plugin: version=11
12:06:40 discovery.go:90: [DEBUG] Find plugin path: C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe
12:06:40 discovery.go:54: [INFO] Plugin "terraform" found
12:06:40 [DEBUG] cmdrunner/cmd_runner.go:73: starting plugin: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe args=["C:\\Users\\SamAccountName\\.tflint.d\\plugins\\github.com\\terraform-linters\\tflint-ruleset-terraform\\0.12.0\\tflint-ruleset-terraform.exe"]
12:06:40 [DEBUG] cmdrunner/cmd_runner.go:80: plugin started: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe pid=23204
12:06:40 [DEBUG] [email protected]/client.go:827: waiting for RPC address: plugin=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe
12:06:40 [DEBUG] [email protected]/client.go:1216: tflint-ruleset-terraform.exe: 12:06:40 [DEBUG] [email protected]/server.go:419: plugin address: network=tcp address=127.0.0.1:10001
12:06:40 [DEBUG] [email protected]/client.go:880: using plugin: version=11
Failed to initialize plugins; Plugin "postch" not found in C:\Users\SamAccountName\.tflint.d\plugins

Placing local plugin directly into to the plugin folder without further subfolders
image
tflint debug

12:16:34 runner.go:47: [INFO] Initialize new runner for root
12:16:34 discovery.go:90: [DEBUG] Find plugin path: C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe
12:16:34 discovery.go:54: [INFO] Plugin "azurerm" found
12:16:34 [DEBUG] cmdrunner/cmd_runner.go:73: starting plugin: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe args=["C:\\Users\\SamAccountName\\.tflint.d\\plugins\\github.com\\terraform-linters\\tflint-ruleset-azurerm\\0.28.0\\tflint-ruleset-azurerm.exe"]
12:16:34 [DEBUG] cmdrunner/cmd_runner.go:80: plugin started: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe pid=13636       
12:16:34 [DEBUG] [email protected]/client.go:827: waiting for RPC address: plugin=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe  
12:16:34 [DEBUG] [email protected]/client.go:1216: tflint-ruleset-azurerm.exe: 12:16:34 [DEBUG] [email protected]/server.go:419: plugin address: network=tcp address=127.0.0.1:10002
12:16:34 [DEBUG] [email protected]/client.go:880: using plugin: version=11
12:16:34 discovery.go:90: [DEBUG] Find plugin path: C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe
12:16:34 discovery.go:54: [INFO] Plugin "terraform" found
12:16:34 [DEBUG] cmdrunner/cmd_runner.go:73: starting plugin: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe args=["C:\\Users\\SamAccountName\\.tflint.d\\plugins\\github.com\\terraform-linters\\tflint-ruleset-terraform\\0.12.0\\tflint-ruleset-terraform.exe"]
12:16:34 [DEBUG] cmdrunner/cmd_runner.go:80: plugin started: path=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe pid=21220   
12:16:34 [DEBUG] [email protected]/client.go:827: waiting for RPC address: plugin=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe
12:16:34 [DEBUG] [email protected]/client.go:880: using plugin: version=11
12:16:34 [DEBUG] [email protected]/client.go:1216: tflint-ruleset-terraform.exe: 12:16:34 [DEBUG] [email protected]/server.go:419: plugin address: network=tcp address=127.0.0.1:10003
12:16:34 discovery.go:90: [DEBUG] Find plugin path: C:\Users\SamAccountName\.tflint.d\plugins\tflint-ruleset-postch.exe
12:16:34 discovery.go:54: [INFO] Plugin "postch" found
12:16:34 [DEBUG] cmdrunner/cmd_runner.go:73: starting plugin: path=C:\Users\SamAccountName\.tflint.d\plugins\tflint-ruleset-postch.exe args=["C:\\Users\\SamAccountName\\.tflint.d\\plugins\\tflint-ruleset-postch.exe"] 
12:16:35 [DEBUG] cmdrunner/cmd_runner.go:80: plugin started: path=C:\Users\SamAccountName\.tflint.d\plugins\tflint-ruleset-postch.exe pid=17556
12:16:35 [DEBUG] [email protected]/client.go:827: waiting for RPC address: plugin=C:\Users\SamAccountName\.tflint.d\plugins\tflint-ruleset-postch.exe
12:16:35 [DEBUG] [email protected]/client.go:1216: tflint-ruleset-postch.exe: 12:16:35 [DEBUG] [email protected]/server.go:419: plugin address: network=tcp address=127.0.0.1:10004
12:16:35 [DEBUG] [email protected]/client.go:880: using plugin: version=11
12:16:35 [DEBUG] host2plugin/client.go:124: starting host-side gRPC server
12:16:35 [DEBUG] host2plugin/client.go:124: starting host-side gRPC server
12:16:35 [DEBUG] host2plugin/client.go:124: starting host-side gRPC server
12:16:35 [DEBUG] [email protected]/grpc_stdio.go:142: stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
12:16:35 [INFO]  [email protected]/client.go:780: plugin process exited: plugin=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-azurerm\0.28.0\tflint-ruleset-azurerm.exe id=13636
12:16:35 [DEBUG] [email protected]/client.go:558: plugin exited
12:16:35 [DEBUG] [email protected]/grpc_stdio.go:142: stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
12:16:35 [INFO]  [email protected]/client.go:780: plugin process exited: plugin=C:\Users\SamAccountName\.tflint.d\plugins\github.com\terraform-linters\tflint-ruleset-terraform\0.12.0\tflint-ruleset-terraform.exe id=21220
12:16:35 [DEBUG] [email protected]/client.go:558: plugin exited
12:16:35 [DEBUG] [email protected]/grpc_stdio.go:142: stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
12:16:35 [INFO]  [email protected]/client.go:780: plugin process exited: plugin=C:\Users\SamAccountName\.tflint.d\plugins\tflint-ruleset-postch.exe id=17556
12:16:35 [DEBUG] [email protected]/client.go:558: plugin exited
3 issue(s) found:

using tflint 0.58.0
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant