@@ -47,6 +47,8 @@ in just a few steps, in any technology.
47
47
- [ lintPython] ( #lintpython )
48
48
- [ lintTerraform] ( #lintterraform )
49
49
- [ lintWithLizard] ( #lintwithlizard )
50
+ - [ Testing] ( #testing )
51
+ - [ testTerraform] ( #testterraform )
50
52
- [ Pinning] ( #pinning )
51
53
- [ inputs] ( #inputs )
52
54
- [ requiredMakesVersion] ( #requiredmakesversion )
@@ -925,7 +927,7 @@ Custom Types:
925
927
Defaults to ` [ ] ` .
926
928
- src (` str ` ):
927
929
Path to the [ Terraform] [ TERRAFORM ] module.
928
- - version (` str ` ):
930
+ - version (` enum [ "0.12" "0.13" "0.14" "0.15" "0.16" ] ` ):
929
931
[ Terraform] [ TERRAFORM ] version your module is built with.
930
932
931
933
Example ` makes.nix ` :
@@ -980,6 +982,52 @@ Example `makes.nix`:
980
982
981
983
Example invocation: ` $ m . /lintWithLizard `
982
984
985
+ ## Testing
986
+
987
+ ### testTerraform
988
+
989
+ Test [ Terraform] [ TERRAFORM ] code
990
+ by performing a ` terraform plan `
991
+ over the specified [ Terraform] [ TERRAFORM ] modules.
992
+
993
+ Attributes:
994
+
995
+ - modules (` attrsOf moduleType ` ): Optional.
996
+ Path to [ Terraform] [ TERRAFORM ] modules to lint.
997
+ Defaults to ` { } ` .
998
+
999
+ Custom Types:
1000
+
1001
+ - moduleType (` submodule ` ):
1002
+ - authentication (` listOf package ` ): Optional.
1003
+ [ Makes Secrets] [ MAKES_SECRETS ] to use (if required by your module).
1004
+ Defaults to ` [ ] ` .
1005
+ - src (` str ` ):
1006
+ Path to the [ Terraform] [ TERRAFORM ] module.
1007
+ - version (` enum [ "0.12" "0.13" "0.14" "0.15" "0.16" ] ` ):
1008
+ [ Terraform] [ TERRAFORM ] version your module is built with.
1009
+
1010
+ Example ` makes.nix ` :
1011
+
1012
+ ``` nix
1013
+ {
1014
+ testTerraform = {
1015
+ modules = {
1016
+ module1 = {
1017
+ src = "/my/module1";
1018
+ version = "0.12";
1019
+ };
1020
+ module2 = {
1021
+ src = "/my/module2";
1022
+ version = "0.16";
1023
+ };
1024
+ };
1025
+ };
1026
+ }
1027
+ ```
1028
+
1029
+ Example invocation: ` $ m . /testTerraform `
1030
+
983
1031
## Pinning
984
1032
985
1033
### inputs
@@ -1709,6 +1757,8 @@ Guidelines:
1709
1757
- Write an argument: `/src/args`
1710
1758
- Write a module (if applies): `/src/evaluator/modules`
1711
1759
- Write docs: `/README.md`
1760
+ - Write a test: `/makes.nix` or `/makes/**/main.nix`
1761
+ - Write a test [GitHub workflow][GITHUB_WORKFLOWS]: `/.github/workflows/dev.yml`
1712
1762
1713
1763
Examples:
1714
1764
0 commit comments