@@ -38,6 +38,7 @@ in just a few steps, in any technology.
38
38
- [ lintMarkdown] ( #lintmarkdown )
39
39
- [ lintNix] ( #lintnix )
40
40
- [ lintPython] ( #lintpython )
41
+ - [ lintTerraform] ( #lintterraform )
41
42
- [ lintWithLizard] ( #lintwithlizard )
42
43
- [ Pinning] ( #pinning )
43
44
- [ inputs] ( #inputs )
@@ -419,6 +420,14 @@ Attributes:
419
420
- pubKey (` str ` ):
420
421
Public key of the [ Cachix] [ CACHIX ] cache.
421
422
423
+ Required environment variables:
424
+
425
+ - ` CACHIX_AUTH_TOKEN ` : API token of the [ Cachix] [ CACHIX ] cache.
426
+ - For Public caches:
427
+ If not set the cache will only be read, but not written to.
428
+ - For private caches:
429
+ If not set the cache won't be read, nor written to.
430
+
422
431
Example ` makes.nix ` :
423
432
424
433
``` nix
@@ -431,14 +440,6 @@ Example `makes.nix`:
431
440
}
432
441
```
433
442
434
- Required environment variables:
435
-
436
- - ` CACHIX_AUTH_TOKEN ` : API token of the [ Cachix] [ CACHIX ] cache.
437
- - For Public caches:
438
- If not set the cache will only be read, but not written to.
439
- - For private caches:
440
- If not set the cache won't be read, nor written to.
441
-
442
443
## Formatters
443
444
444
445
Formatters help your code be consistent, beautiful and more maintainable.
@@ -773,6 +774,70 @@ Example invocation: `$ m . /lintPython/dirOfModules/makes/main`
773
774
774
775
Example invocation: ` $ m . /lintPython/module/cliMain `
775
776
777
+ ### lintTerraform
778
+
779
+ Lint [ Terraform] [ TERRAFORM ] code
780
+ with [ TFLint] [ TFLINT ] .
781
+
782
+ Attributes:
783
+
784
+ - enable (` boolean ` ): Optional.
785
+ Defaults to false.
786
+ - config (` lines ` ): Optional.
787
+ Defaults to:
788
+
789
+ ``` hcl
790
+ config {
791
+ module = true
792
+ }
793
+
794
+ plugin "aws" {
795
+ enabled = true
796
+ }
797
+ ```
798
+
799
+ - modules (` attrsOf moduleType ` ): Optional.
800
+ Path to [ Terraform] [ TERRAFORM ] modules to lint.
801
+ Defaults to ` { } ` .
802
+
803
+ Custom Types:
804
+
805
+ - moduleType (` submodule ` ):
806
+ - src (` str ` ):
807
+ Path to the [ Terraform] [ TERRAFORM ] module.
808
+ - version (` str ` ):
809
+ [ Terraform] [ TERRAFORM ] version your module is built with.
810
+
811
+ Required environment variables:
812
+
813
+ - If your [ Terraform] [ TERRAFORM ] module uses the AWS provider:
814
+ - ` AWS_ACCESS_KEY_ID `
815
+ - ` AWS_SECRET_ACCESS_KEY `
816
+ - ` AWS_DEFAULT_REGION `
817
+ - ` AWS_SESSION_TOKEN ` : Required only if the AWS credentials are temporary.
818
+
819
+ Example ` makes.nix ` :
820
+
821
+ ``` nix
822
+ {
823
+ lintTerraform = {
824
+ enable = true;
825
+ modules = {
826
+ module1 = {
827
+ src = "/my/module1";
828
+ version = "0.12";
829
+ };
830
+ module2 = {
831
+ src = "/my/module2";
832
+ version = "0.16";
833
+ };
834
+ };
835
+ };
836
+ }
837
+ ```
838
+
839
+ Example invocation: ` $ m . /lintTerraform `
840
+
776
841
### lintWithLizard
777
842
778
843
Using [ Lizard] [ LIZARD ] to check
@@ -883,9 +948,9 @@ Custom Types:
883
948
884
949
Required environment variables:
885
950
886
- - CI_REGISTRY_USER and CI_REGISTRY_PASSWORD, when deploying to GitLab.
887
- - DOCKER_HUB_USER and DOCKER_HUB_PASS, when deploying to Docker Hub.
888
- - GITHUB_ACTOR and GITHUB_TOKEN, when deploying to Github Container Registry.
951
+ - ` CI_REGISTRY_USER ` and ` CI_REGISTRY_PASSWORD ` , when deploying to GitLab.
952
+ - ` DOCKER_HUB_USER ` and ` DOCKER_HUB_PASS ` , when deploying to Docker Hub.
953
+ - ` GITHUB_ACTOR ` and ` GITHUB_TOKEN ` , when deploying to Github Container Registry.
889
954
890
955
Example ` makes.nix ` :
891
956
@@ -1598,6 +1663,9 @@ $ m . /example
1598
1663
- [TERRAFORM_FMT]: https://www.terraform.io/docs/cli/commands/fmt.html
1599
1664
[Terraform FMT][TERRAFORM_FMT]
1600
1665
1666
+ - [TFLINT]: https://github.com/terraform-linters/tflint
1667
+ [TFLint][TFLINT]
1668
+
1601
1669
- [TRAVIS_CI]: https://travis-ci.org/
1602
1670
[Travis CI][TRAVIS_CI]
1603
1671
0 commit comments