This is tflint ruleset used in KazanExpress team for better terraform code quality.
- TFLint v0.42+
- Go v1.21
You can install the plugin with tflint --init
. Declare a config in .tflint.hcl
as follows:
plugin "ke" {
enabled = true
version = "0.4.1"
source = "github.com/KazanExpress/tflint-ruleset-ke-ke"
signing_key = <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGUEdYcBEACwpxnj48oxhF/bzAwzX761XeBjF3MTjFSK3i6bNbzHlvnBVG39
U/b3cqzNO/VidFCdSp/xoUDP+74Z55WSJ+nn+iKBILHc9qLLRM2S1yPi1t7M1ri9
30xOrAgczW3ftWH7O1BLVWvXi+bLOPKG2DR4YqF8GPa6YILBww4erYd1lUEEB9lK
hhwtWSnnzQZ28+PpNxtuAIA4Wok8ZmQE4kzx4nNWKeshhU11A9cN28QRwfh1dF/x
2tP+1ZpdazZeEnYzhiXRBrOHpSBjWK6oTRfDsGmTZasY1qTsltgqjhLMopuefFBO
hxKFZmI3MGiTd44JkQEx4yP/2gvRI1J0gE5DWwciMTV2jfxgZiNeUPitJzJrGB0w
KY743ehkfCa5ZQCUKfynrBB/ft1Knq1Dncv9nHPRx/mmZ7wksWj4oY9PfOjxE/oX
Js+tsfTgBcLPM/BOh/KAIYMC1Dq1K9Cj5d+q4TkFCekbQJRbe005nc+ZQwa8N10L
lbWZngDummVLWenpMmz5+rQPCZyzTyYBfXFh20x4iXLTC+zDBTDhPQQst6nlMk2e
vioGDHBnrI+ZvkiWVBdivtkWzqGqszXeuYEpxpNCggJqO0+2bxtRw4es7MgCWTu7
y1YVrwaZzUg1RykAC3et2vObjlbGavMSNPWdB6lIBK0KK0ioT3yP32/CUwARAQAB
tDFpbmZyYUBrYXphbmV4cHJlc3MudGVjaCA8aW5mcmFAa2F6YW5leHByZXNzLnRl
Y2g+iQJRBBMBCAA7FiEEZ4QK7UQ1feIy0SlXgKK8Yv7sH+4FAmUEdYcCGwMFCwkI
BwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQgKK8Yv7sH+4z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m2u6TycVkm9U1i40M
/cTNgpPBAgoRDBYUiZaMqg==
=EPIV
-----END PGP PUBLIC KEY BLOCK-----
EOF
}
Name | Description | Severity | Enabled | Link |
---|---|---|---|---|
terraform_module_version | Checks whether terraform module version is not very old | WARNING | ✔ |
Clone the repository locally and run the following command:
$ make
You can easily install the built plugin with the following:
$ make install
You can run the built plugin like the following:
$ cat << EOS > .tflint.hcl
plugin "template" {
enabled = true
}
EOS
$ tflint