Skip to content

Commit dad80e6

Browse files
authored
Merge pull request #45 from terraform-linters/bump_protocol_version
Bump protocol version
2 parents feed952 + e89666b commit dad80e6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# TFLint plugin SDK
22
[![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)
33
[![GitHub release](https://img.shields.io/github/release/terraform-linters/tflint-plugin-sdk.svg)](https://github.com/terraform-linters/tflint-plugin-sdk/releases/latest)
4+
[![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)
45
[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-blue.svg)](LICENSE)
56

67
[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
910

1011
## Requirements
1112

12-
- TFLint v0.14+
13+
- TFLint v0.17+
1314
- Go v1.14
1415

1516
## Usage
1617

1718
Please refer to [tflint-ruleset-template](https://github.com/terraform-linters/tflint-ruleset-template) for an example plugin implementation using this SDK.
1819

20+
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.
21+
1922
## Architecture
2023

2124
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.

plugin/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// handShakeConfig is used for UX. ProcotolVersion will be updated by incompatible changes.
1212
var handshakeConfig = plugin.HandshakeConfig{
13-
ProtocolVersion: 1,
13+
ProtocolVersion: 2,
1414
MagicCookieKey: "TFLINT_RULESET_PLUGIN",
1515
MagicCookieValue: "5adSn1bX8nrDfgBqiAqqEkC6OE1h3iD8SqbMc5UUONx8x3xCF0KlPDsBRNDjoYDP",
1616
}

0 commit comments

Comments
 (0)