-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tflint_bp_plugin): add min & max paramters
- Loading branch information
Showing
12 changed files
with
254 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
...t/rules/testdata/terraform_required_version/multiple-invalid-config/.expected/issues.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
[ | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \">= 1\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 1, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 1, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \">= 1.1\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 5, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 5, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \">= 1.1.0\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 9, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 9, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \">=1.1.0\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 13, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 13, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \">= 1.1.0, < 2.0\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 17, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 17, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \">=0.13.0\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 21, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 21, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \"=0.13.0\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 25, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 25, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \"0.13.0\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 29, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 29, | ||
"Column": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"Message": "required_version is not inclusive of the the minimum \"1.6\" and maximum \"1.9\" terraform required_version: \"~>0.13.0\"", | ||
"Range": { | ||
"Filename": "main.tf", | ||
"Start": { | ||
"Line": 33, | ||
"Column": 1 | ||
}, | ||
"End": { | ||
"Line": 33, | ||
"Column": 10 | ||
} | ||
} | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
...t-blueprint/rules/testdata/terraform_required_version/multiple-invalid-config/.tflint.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rule "terraform_required_version" { | ||
enabled = true | ||
min_version = "1.6" | ||
max_version = "1.9" | ||
} |
35 changes: 35 additions & 0 deletions
35
...leset-blueprint/rules/testdata/terraform_required_version/multiple-invalid-config/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
terraform { | ||
required_version = ">= 1" | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.1" | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.1.0" | ||
} | ||
|
||
terraform { | ||
required_version = ">=1.1.0" | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.1.0, < 2.0" | ||
} | ||
|
||
terraform { | ||
required_version = ">=0.13.0" | ||
} | ||
|
||
terraform { | ||
required_version = "=0.13.0" | ||
} | ||
|
||
terraform { | ||
required_version = "0.13.0" | ||
} | ||
|
||
terraform { | ||
required_version = "~>0.13.0" | ||
} |
1 change: 1 addition & 0 deletions
1
...es/testdata/terraform_required_version/multiple-valid-config-single/.expected/issues.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
4 changes: 4 additions & 0 deletions
4
...eprint/rules/testdata/terraform_required_version/multiple-valid-config-single/.tflint.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
rule "terraform_required_version" { | ||
enabled = true | ||
max_version = "1.6" | ||
} |
11 changes: 11 additions & 0 deletions
11
...-blueprint/rules/testdata/terraform_required_version/multiple-valid-config-single/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
terraform { | ||
required_version = ">=1.3" | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.3, < 2.0" | ||
} | ||
|
||
terraform { | ||
required_version = "~>1.6" | ||
} |
1 change: 1 addition & 0 deletions
1
...int/rules/testdata/terraform_required_version/multiple-valid-config/.expected/issues.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
5 changes: 5 additions & 0 deletions
5
...set-blueprint/rules/testdata/terraform_required_version/multiple-valid-config/.tflint.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rule "terraform_required_version" { | ||
enabled = true | ||
min_version = "1.6" | ||
max_version = "1.9" | ||
} |
15 changes: 15 additions & 0 deletions
15
...ruleset-blueprint/rules/testdata/terraform_required_version/multiple-valid-config/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
terraform { | ||
required_version = ">=1.6" | ||
} | ||
|
||
terraform { | ||
required_version = ">= 1.6, < 2.0" | ||
} | ||
|
||
terraform { | ||
required_version = "~>1.6" | ||
} | ||
|
||
terraform { | ||
required_version = "~>1.9" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters