You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to write a plugin, there is a limitation that you have to use Go because tflint-plugin-sdk is written in Go. This isn't a big limitation if you want to provide uniform rules for all workspaces in your organization, but if you want to add simple rules to a particular workspace, you need to build a binary and publish it to the GitHub release. It's a laborious task.
Since v0.35.0, gRPC is used for the plugin system, so you can write plugins in any language that supports gRPC. For example, if you could write a plugin in Python, you would include custom rules in the repository, and editing the rule would be as quick as editing the *.py file.
However, there are some considerations to support this. The first is that the language needs to support HCL and cty. Python has an HCL2 parser, so it's relatively easy in this regard, but libraries like python-cty will need to be invented. Next is the security issue. Being able to execute arbitrary scripts can increase the attack surface, and its impact should be evaluated. The last is the performance issue. Python should be slower than Go, so inspection time can be slower. This can affect for #1356.
The text was updated successfully, but these errors were encountered:
In order to write a plugin, there is a limitation that you have to use Go because tflint-plugin-sdk is written in Go. This isn't a big limitation if you want to provide uniform rules for all workspaces in your organization, but if you want to add simple rules to a particular workspace, you need to build a binary and publish it to the GitHub release. It's a laborious task.
Since v0.35.0, gRPC is used for the plugin system, so you can write plugins in any language that supports gRPC. For example, if you could write a plugin in Python, you would include custom rules in the repository, and editing the rule would be as quick as editing the *.py file.
However, there are some considerations to support this. The first is that the language needs to support HCL and cty. Python has an HCL2 parser, so it's relatively easy in this regard, but libraries like python-cty will need to be invented. Next is the security issue. Being able to execute arbitrary scripts can increase the attack surface, and its impact should be evaluated. The last is the performance issue. Python should be slower than Go, so inspection time can be slower. This can affect for #1356.
The text was updated successfully, but these errors were encountered: