diff --git a/README.md b/README.md index 5ce7d77..8d56cbb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # TFLint plugin SDK [![Build Status](https://github.com/terraform-linters/tflint-plugin-sdk/workflows/build/badge.svg?branch=master)](https://github.com/terraform-linters/tflint-plugin-sdk/actions) [![GitHub release](https://img.shields.io/github/release/terraform-linters/tflint-plugin-sdk.svg)](https://github.com/terraform-linters/tflint-plugin-sdk/releases/latest) +[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/terraform-linters/tflint-plugin-sdk) [![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-blue.svg)](LICENSE) [TFLint](https://github.com/terraform-linters/tflint) plugin SDK for building custom rules. @@ -9,13 +10,15 @@ NOTE: This plugin system is experimental. This means that API compatibility is f ## Requirements -- TFLint v0.14+ +- TFLint v0.17+ - Go v1.14 ## Usage Please refer to [tflint-ruleset-template](https://github.com/terraform-linters/tflint-ruleset-template) for an example plugin implementation using this SDK. +For more details on the API, see [tflint](https://pkg.go.dev/github.com/terraform-linters/tflint-plugin-sdk/tflint) and [helper](https://pkg.go.dev/github.com/terraform-linters/tflint-plugin-sdk/helper) packages on pkg.go.dev. + ## Architecture This plugin system uses [go-plugin](https://github.com/hashicorp/go-plugin). TFLint launches the plugin as a sub-process and communicates with the plugin over RPC. The plugin acts as a server, while TFLint acts as a client that sends inspection requests to the plugin. diff --git a/plugin/plugin.go b/plugin/plugin.go index 766213a..8f9eaf3 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -10,7 +10,7 @@ import ( // handShakeConfig is used for UX. ProcotolVersion will be updated by incompatible changes. var handshakeConfig = plugin.HandshakeConfig{ - ProtocolVersion: 1, + ProtocolVersion: 2, MagicCookieKey: "TFLINT_RULESET_PLUGIN", MagicCookieValue: "5adSn1bX8nrDfgBqiAqqEkC6OE1h3iD8SqbMc5UUONx8x3xCF0KlPDsBRNDjoYDP", }