- #337: helper: Add support sensitive variables in TestRunner
- #324: Bump github.com/hashicorp/go-plugin from 1.6.0 to 1.6.1
- #328: Bump github.com/hashicorp/go-version from 1.6.0 to 1.7.0
- #330: Bump google.golang.org/protobuf from 1.34.0 to 1.34.2
- #332: Bump github.com/go-test/deep from 1.1.0 to 1.1.1
- #333: Bump github.com/hashicorp/hcl/v2 from 2.20.1 to 2.21.0
- #334: Bump golang.org/x/tools from 0.20.0 to 0.23.0
- #335: Bump google.golang.org/grpc from 1.63.2 to 1.65.0
- #336: Bump github.com/zclconf/go-cty from 1.14.4 to 1.15.0
- #316: Bump github.com/hashicorp/hcl/v2 from 2.19.1 to 2.20.1
- This is required for provider-defined functions support
- #311: Bump google.golang.org/protobuf from 1.32.0 to 1.33.0
- #314: Bump github.com/zclconf/go-cty from 1.14.2 to 1.14.4
- #317: Bump github.com/hashicorp/go-hclog from 1.6.2 to 1.6.3
- #319: Bump golang.org/x/tools from 0.18.0 to 0.20.0
- #320: Bump google.golang.org/grpc from 1.61.1 to 1.63.2
- #321: Bump golang.org/x/net from 0.21.0 to 0.23.0
- #322: deps: Go 1.22.2
- #323: Bump google.golang.org/protobuf from 1.33.0 to 1.34.0
- #281 #307: deps: Go 1.22
- #283: Bump actions/checkout from 3 to 4
- #294: Bump github.com/google/go-cmp from 0.5.9 to 0.6.0
- #297: Bump github.com/hashicorp/hcl/v2 from 2.17.0 to 2.19.1
- #299: Bump google.golang.org/grpc from 1.57.0 to 1.61.1
- #300: Bump github.com/hashicorp/go-plugin from 1.4.10 to 1.6.0
- #301: Bump github.com/zclconf/go-cty from 1.13.2 to 1.14.2
- #302: Bump golang.org/x/tools from 0.11.0 to 0.18.0
- #303: Bump github/codeql-action from 2 to 3
- #304: Bump actions/setup-go from 4 to 5
- #305: Bump github.com/hashicorp/go-hclog from 1.5.0 to 1.6.2
- #306: Bump google.golang.org/protobuf from 1.31.0 to 1.32.0
- #268: helper: Un-export
NewLocalRunner
andAddLocalFile
- #273: Internalize unnecessarily published plugin packages
- #274: tflint: Remove deprecated IncludeNotCreated option
- #271: hclext: Add support for expression unwrapping in hclext.BoundExpr
- #267: Bump google.golang.org/protobuf from 1.30.0 to 1.31.0
- #270: Bump golang.org/x/tools from 0.10.0 to 0.11.0
- #272: Bump google.golang.org/grpc from 1.55.0 to 1.57.0
This release adds support for autofix API. The EmitIssueWithFix
API allows you to implement autofix in your plugin using tflint.Fixer
. Autofix is available in TFLint v0.47+. In earlier versions, the autofix is ignored.
This SDK version no longer supports TFLint v0.40/v0.41. This means that plugins built using this SDK require TFLint v0.42+.
Also, the Check
method has been removed from tflint.RuleSet
as a minor change. This means that if you override the Check
method in a custom ruleset that embeds tflint.RuleSet
, it will not be called. This is classified as a breaking change, but since the Check
method is not supposed to be overwritten, it is recommended to use something like NewRunner
.
- #258: tflint: Remove
Check
method fromtflint.RuleSet
interface - #263: Drop support for TFLint v0.40/v0.41
- #254: Introduce autofix API
- #253: Configure aqua to install protoc
- #255: Bump google.golang.org/grpc from 1.54.0 to 1.55.0
- #257: Bump github.com/zclconf/go-cty from 1.13.1 to 1.13.2
- #261: Bump github.com/hashicorp/go-plugin from 1.4.9 to 1.4.10
- #262: Bump github.com/hashicorp/hcl/v2 from 2.16.2 to 2.17.0
- #264: Bump golang.org/x/tools from 0.8.0 to 0.10.0
- #252: ruleset: Fix NewRunner hook not injecting a custom runner
- #251: Bump golang.org/x/tools from 0.7.0 to 0.8.0
This release deprecates the runner.EnsureNoError
helper. This helper is still available in this version, but we recommend migrating to the function callback approach.
// Before
var val string
err := runner.EvaluateExpr(expr, &val, nil)
err = runner.EnsureNoError(err, func () error {
// Test values
})
if err != nil {
return err
}
// After
err := runner.EvaluateExpr(expr, func (val string), error {
// Test values
}, nil)
See also terraform-linters/tflint-ruleset-template#76 for an example of upgrading the SDK.
- #225: ruleset: Allow a runner to be redefined within a ruleset
- The
NewRunner
method has been added to thetflint.RuleSet
interface.
- The
- #239: plugin2host: Send marked values over the wire
- With this change, sensitive values can now be handled by plugins (requires TFLint v0.46+). Previously,
tflint.ErrSensitive
was always returned.
- With this change, sensitive values can now be handled by plugins (requires TFLint v0.46+). Previously,
- #246 #247: runner: Add support for function callbacks as the target of
EvaluateExpr
- This allows reproducing the same behavior as before without using
EnsureNoError
.
- This allows reproducing the same behavior as before without using
- #248: runner: Add support for the bool type as a target value of
EvaluateExpr
- #236: runner: Deprecate
EnsureNoError
helper- This helper is still available in this version, but we recommend migrating to the function callback approach.
- #233: Bump golang.org/x/net from 0.3.0 to 0.7.0
- #234: Go 1.20
- #235: plugin2host: Handle eval errors on the client side
- #238: Bump github.com/hashicorp/go-plugin from 1.4.8 to 1.4.9
- #240: Bump github.com/hashicorp/hcl/v2 from 2.15.0 to 2.16.2
- #241: Bump golang.org/x/tools from 0.4.0 to 0.7.0
- #243: Bump actions/setup-go from 3 to 4
- #244: Bump github.com/zclconf/go-cty from 1.12.1 to 1.13.1
- #245: Bump google.golang.org/protobuf from 1.28.1 to 1.30.0
- #249: Bump github.com/hashicorp/go-hclog from 1.4.0 to 1.5.0
- #250: Bump google.golang.org/grpc from 1.51.0 to 1.54.0
- #224: Add GetOriginalwd method
- #214: Bump github.com/hashicorp/hcl/v2 from 2.14.1 to 2.15.0
- #219: Bump google.golang.org/grpc from 1.50.1 to 1.51.0
- #220: Bump github.com/hashicorp/go-plugin from 1.4.5 to 1.4.8
- #221: Bump github.com/go-test/deep from 1.0.8 to 1.1.0
- #222: Bump github.com/hashicorp/go-hclog from 1.3.1 to 1.4.0
- #223: Bump golang.org/x/tools from 0.1.12 to 0.4.0
This release includes several new features for plugin developers. Introduced the Schema Mode to get all attributes, and added an option to set constraints on compatible TFLint versions. These may not work with older TFLint versions, so set version constraints as needed.
The evaluation of each.*
and count.*
added in TFLint v0.42 requires plugins built with this version. In earlier versions, these values are always unknown.
IncludeNotCreated
in GetModuleContentOption
has been deprecated. Use ExpandModeNone
instead. The old option will still work, but will be removed in a future version.
- #201: hclext: Add schema mode to BodySchema
- This is available only for TFLint v0.42+. Schema mode is ignored in earlier versions. Set
>= 0.42.0
as a version constraint if you cannot tolerate being ignored.
- This is available only for TFLint v0.42+. Schema mode is ignored in earlier versions. Set
- #202: host2plugin: Allow plugins to set host version constraints
- This is available only for TFLint v0.42+. Version constraints are ignored in earlier versions. Note that version constraints may not work in v0.40, v0.41.
- #203: host2plugin: Add SDKVersion
- #205: hclext: Add hclext.BoundExpr
- This is necessary due to the evaluation of
each.*
andcount.*
added in TFLint v0.42. Plugins not built with SDK v0.14+ will always evaluate to unknown values.
- This is necessary due to the evaluation of
- #206: hclext: Add Copy() to structures
- #207: hclext: Add WalkAttribute to hclext.BodyContent
- #208: plugin2host: Add ExpandMode to GetModuleContentOption
IncludeNotCreated
is deprecated. UseExpandModeNone
instread.
- #199: Bump github.com/hashicorp/hcl/v2 from 2.14.0 to 2.14.1
- #200: Bump github.com/hashicorp/go-hclog from 1.3.0 to 1.3.1
- #209: Bump google.golang.org/grpc from 1.49.0 to 1.50.1
- #198: host2plugin: Allow ruleset to accept Only option
- This change is necessary due to a priority bug with the
--only
option. Most plugins are unaffected by this change.
- This change is necessary due to a priority bug with the
- #197: Bump github.com/google/go-cmp from 0.5.8 to 0.5.9
This release adds GetModulePath()
API. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.40+.
See also terraform-linters/tflint-ruleset-template#62 for an example of upgrading the SDK.
- #169: hclext: Add hclext.Blocks's OfType helper
- #170: hclext: Add AsNative helper
- #172: tflint: Add GetProviderContent helper
- #174: tflint: Add tflint.ErrSensitive
- #177: helper: Add support for JSON syntax in TestRunner
- #178: Allow calling DecodeRuleConfig without rule config
- #180: terraform: Add
lang.ReferencesInExpr
- #181: tflint: Add WalkExpressions function
- #190: logger: Do not set location offset in go-plugin
- #161 #182: Bump github.com/hashicorp/go-plugin from 1.4.3 to 1.4.5
- #166 #194: Bump github.com/hashicorp/hcl/v2 from 2.12.0 to 2.14.0
- #168 #187: Bump google.golang.org/grpc from 1.46.0 to 1.49.0
- #173 #195: Bump github.com/hashicorp/go-hclog from 1.2.0 to 1.3.0
- #175: Bump google.golang.org/protobuf from 1.28.0 to 1.28.1
- #176: build: go 1.19
- #179: build: Use
go-version-file
instead ofgo-version
- #183: Bump golang.org/x/tools from 0.1.11 to 0.1.12
- #184: Bump github.com/go-test/deep from 1.0.3 to 1.0.8
- #185: Remove unused ruleset function
- #186: Bump github.com/zclconf/go-cty from 1.10.0 to 1.11.0
- #160: tflint: Add IncludeNotCreated option to GetModuleContent
- #150: Bump google.golang.org/protobuf from 1.27.1 to 1.28.0
- #154: Bump actions/setup-go from 2 to 3
- #155: Bump google.golang.org/grpc from 1.45.0 to 1.46.0
- #156: Bump github.com/hashicorp/hcl/v2 from 2.11.1 to 2.12.0
- #157: plugin2host: Return sources instead of
*hcl.File
in GetRuleConfigContent - #158: Bump github.com/google/go-cmp from 0.5.7 to 0.5.8
- #159: Bump github/codeql-action from 1 to 2
- #153: helper: Skip un-used variable block attributes
This release contains a major update to the plugin system. Previously, this SDK uses traditional net/rpc + gob, but now it uses gRPC + Protocol Buffers.
The API also contains many incompatible changes. See terraform-linters/tflint-ruleset-template#48 for how to migrate. TFLint v0.35+ is required to work with new plugin systems.
- #133 #145: build: Go 1.18
- #134: Bump github.com/hashicorp/go-plugin from 1.4.2 to 1.4.3
- #136: Bump github.com/zclconf/go-cty from 1.9.0 to 1.10.0
- #138: Bump github.com/hashicorp/hcl/v2 from 2.10.0 to 2.11.1
- #139: Bump github.com/hashicorp/go-version from 1.3.0 to 1.4.0
- #141: Bump github.com/google/go-cmp from 0.5.6 to 0.5.7
- #143: Bump actions/checkout from 2 to 3
- #144: Bump github.com/hashicorp/go-hclog from 0.16.2 to 1.2.0
- #128: tflint: Add workaround when parsing a config that has a trailing heredoc
- #125: Bump github.com/zclconf/go-cty from 1.8.4 to 1.9.0
- #126: Bump github.com/hashicorp/go-hclog from 0.16.1 to 0.16.2
This release adds Files()
API. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.30+.
See also terraform-linters/tflint-ruleset-template#37 for an example of upgrading the SDK.
- #109: Bump github.com/hashicorp/go-version from 1.2.1 to 1.3.0
- #112: Bump github.com/hashicorp/hcl/v2 from 2.9.1 to 2.10.0
- #117: Bump github.com/hashicorp/go-hclog from 0.15.0 to 0.16.1
- #120: Bump github.com/google/go-cmp from 0.5.5 to 0.5.6
- #121: Bump github.com/hashicorp/go-plugin from 1.4.0 to 1.4.2
- #123: Bump github.com/zclconf/go-cty from 1.8.1 to 1.8.4
- #101: helper: Use a consistent env var for TF_WORKSPACE
- #107: client: Pass only type to EvalExpr when passed detailed types
- #102: Upgrade to Go 1.16
- #103 #106: Bump github.com/hashicorp/hcl/v2 from 2.8.2 to 2.9.1
- #105: Bump github.com/google/go-cmp from 0.5.4 to 0.5.5
- #108: Bump github.com/zclconf/go-cty from 1.8.0 to 1.8.1
- #100: tflint: Make sure RuleNames always return all rules
This release fixes some bugs when using Config
API. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.24+.
See also terraform-linters/tflint-ruleset-template#26 for an example of upgrading the SDK.
- #96: Use msgpack to encoding to pass cty.Value in variable default
- #98: Use json for transfering cty.Type
- #97: Fix heredoc parsing in parseConfig
- #94: Bump github.com/hashicorp/hcl/v2 from 2.8.1 to 2.8.2
- #99: Allow use of ${terraform.workspace} in tests
- #93: tflint: Add workaround for parsing heredoc expressions
This release changes the Runner interface. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.23+.
See also terraform-linters/tflint-ruleset-template#23 for an example of upgrading the SDK.
- #79: tflint: Extend runner API for accessing the root provider configuration
- #82: tflint: Add support for fetching rule config
- #85: tflint: Add
IsNullExpr
API - #88: Avoid to read file directly from plugin side
- #91: Make terraform configuration compatible with v0.14
- #80: Bump github.com/google/go-cmp from 0.5.3 to 0.5.4
- #86: Bump github.com/zclconf/go-cty from 1.7.0 to 1.7.1
- #87: Bump github.com/hashicorp/hcl/v2 from 2.7.1 to 2.8.1
- #90: Revise README
This release adds support for JSON configuration syntax. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.21+.
See also terraform-linters/tflint-ruleset-template#19 for an example of upgrading the SDK.
- #72: Allow serving custom RuleSet by plugins
- Change
tflint.Ruleset
struct to the interface. The previous behavior can be reproduced by using thetflint.BuiltinRuleSet
. If you do not need plugin-specific processing, please usetflint.BuiltinRuleSet
directly.
- Change
- #78: Bump protocol version
- #68: Bump actions/setup-go from v2.1.2 to v2.1.3
- #71: Bump github.com/zclconf/go-cty from 1.6.1 to 1.7.0
- #73: Bump github.com/hashicorp/go-hclog from 0.14.1 to 0.15.0
- #74: Bump github.com/hashicorp/go-plugin from 1.3.0 to 1.4.0
- #76: Bump github.com/google/go-cmp from 0.5.2 to 0.5.3
- #77: Bump github.com/hashicorp/hcl/v2 from 2.7.0 to 2.7.1
This release adds Config()
API to accessing the Terraform configuration. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.20+.
See also terraform-linters/tflint-ruleset-template#15 for an example of upgrading the SDK.
- #59: Make terraform configuration compatible with v0.13
- Remove
Backend.ConfigRange
,ModleCall.ConfigRange
,ModuleCall.CountRange
, andModuleCall.ForEachRange
- Remove
- #65: Tweaks package structures
- Renamed package names
terraform.Backend
=>configs.Backend
terraform.Resource
=>configs.Resource
terraform.ModuleCall
=>configs.ModuleCall
- Renamed package names
- #67: plugin: Bump protocol version
- #60: tflint: Add
Runner.Config()
- #54: Accept DisabledByDefault config attribute
- #55: chore(deps): bump go to v1.15
- #56: Update GitHub Actions by Dependabot
- #57: Bump actions/setup-go from v1 to v2.1.2
- #58: Bump github.com/google/go-cmp from 0.5.1 to 0.5.2
- #63: Bump github.com/zclconf/go-cty from 1.5.1 to 1.6.1
- #66: Make terraform configuration compatible with v0.13.2
This release adds WalkModuleCalls()
API to accessing the module calls. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.19+.
See also terraform-linters/tflint-ruleset-template#11 for an example of upgrading the SDK.
- #53: plugin: Bump protocol version
- #50: client: Implement
WalkModuleCalls
- #51: Bump github.com/google/go-cmp from 0.5.0 to 0.5.1
- #52: Bump github.com/hashicorp/go-version from 1.0.0 to 1.2.1
This release adds Backend()
API to accessing the Terraform backend configuration. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.18+.
See also terraform-linters/tflint-ruleset-template#10 for an example of upgrading the SDK.
- #48: plugin: Bump protocol version
This release adds APIs to access more Terraform's configurations.
Previously, only WalkResourceAttributes
that can access top-level attributes were available, but WalkResourceBlocks
that can access blocks and WalkResources
that can access the entire resource including meta-arguments are now available.
In addition, the communication system between the plugin and the host has changed, and it is no longer dependent on the HCL structure implementation. This is a breaking change and all plugins need to be built using this version in order to work with TFLint v0.17+.
- #24: tflint: Sending expression nodes as a text representation
- #41: tflint: Remove Metadata
- #45: plugin: Bump protocol version
- #23: helper: Compare Rule types with custom comparer
- #29 #33: tflint: Add WalkResourceBlocks API
- #35: tflint: Allow to omit metadata expr on EmitIssue
- #34 #37: tflint: Add WalkResources API
- #40: helper: Add WalkResourceBlocks helper
- #27: Bump github.com/hashicorp/go-hclog from 0.13.0 to 0.14.1
- #38: Revise package structure
- #39: Bump github.com/google/go-cmp from 0.4.1 to 0.5.0
- #42: Bump github.com/zclconf/go-cty from 1.4.1 to 1.5.1
- #43: Create Dependabot config file
- #44: Setup Code Scanning
- #20: helper: Make Issues of TestRunner non-nil
- #15: Bump github.com/hashicorp/go-hclog from 0.10.1 to 0.13.0
- #16: Bump github.com/google/go-cmp from 0.3.1 to 0.4.1
- #17: Bump github.com/hashicorp/hcl/v2 from 2.2.0 to 2.5.1
- #18: Adding gitignore file
- #19: Add tests and CI setups
- #21: Bump github.com/hashicorp/go-plugin from 1.0.1 to 1.3.0
- #22: Bump github.com/zclconf/go-cty from 1.1.1 to 1.4.1
Initial release