-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
38 lines (32 loc) · 905 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
_ "embed"
"github.com/knowbe4/tflint-ruleset-kb4/rules"
"github.com/terraform-linters/tflint-plugin-sdk/plugin"
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
)
/** @todo
* These rules still need to be written:
* For Modules
* - Resources should be named `this` where possible.
* - No providers in modules (this can be ignored on a module by module basis if needed)
* For all terraform
* - `terraform_remote_state {}` in _init.tf
* - `provider {}` in _init.tf
* - `terraform {}` in _init.tf
* - Do we want to restrict where locals can be put?
*/
//go:embed VERSION
var VERSION string
func main() {
plugin.Serve(&plugin.ServeOpts{
RuleSet: &tflint.BuiltinRuleSet{
Name: "template",
Version: VERSION,
Rules: []tflint.Rule{
rules.NewTerraformValidatedVariablesRule(),
rules.NewTerraformKb4FileStructureRule(),
},
},
})
}