Skip to content

Commit 38350df

Browse files
SBGoodsbflad
andauthored
Terraform Version Checking (#128)
* Add `tfversion` package and `TerraformVersionCheck` interface * Add `TerraformVersionChecks` field and implement checks in `Test()` * Extract `testExpectTFatal()` to internal/plugintest package * Implement built-in version checks * Add documentation for version checks * fix typo * Add Terraform Version Checks page to website navigation * Add comment for `All()` and fix test * Add Changie Entries * Add copyright headers * Add comments to tests * Add tfversion_checks_test.go * Rename interface request and response to avoid abbreviation * Add version variables * Update documentation to include and use pre-defined version variables Co-authored-by: Brian Flad <[email protected]> * Add copyright header * Properly handle error Co-authored-by: Brian Flad <[email protected]> * Set golangci-lint run timeout to 5 minutes * Fix wording in logging messages Co-authored-by: Brian Flad <[email protected]> --------- Co-authored-by: Brian Flad <[email protected]>
1 parent 7b472a7 commit 38350df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1776
-48
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Introduced new `tfversion` package with interface and built-in Terraform
3+
version check functionality'
4+
time: 2023-06-02T10:15:45.704158-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `SkipAbove` built-in version check, which skips the test if
3+
the Terraform CLI version is above the given maximum.'
4+
time: 2023-06-02T12:44:03.123635-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `SkipBelow` built-in version check, which skips the test if
3+
the Terraform CLI version is below the given minimum.'
4+
time: 2023-06-02T12:44:37.228557-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `SkipBetween` built-in version check, which skips the test
3+
if the Terraform CLI version is between the given minimum (inclusive) and maximum
4+
(exclusive).'
5+
time: 2023-06-02T12:44:53.737283-04:00
6+
custom:
7+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `SkipIf` built-in version check, which skips the test if the
3+
Terraform CLI version matches the given version.'
4+
time: 2023-06-02T12:45:14.812485-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `RequireAbove` built-in version check, which fails the test
3+
if the Terraform CLI version is below the given maximum.'
4+
time: 2023-06-02T12:45:32.983833-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `RequireBelow` built-in version check, which fails the test
3+
if the Terraform CLI version is above the given minimum.'
4+
time: 2023-06-02T12:46:53.705136-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `RequireBetween` built-in version check, fails the test if
3+
the Terraform CLI version is outside the given minimum (exclusive) and maximum (inclusive).'
4+
time: 2023-06-02T12:47:11.762061-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `RequireNot` built-in version check, which fails the test
3+
if the Terraform CLI version matches the given version.'
4+
time: 2023-06-02T12:47:32.000508-04:00
5+
custom:
6+
Issue: "128"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: FEATURES
2+
body: 'tfversion: Added `Any` built-in version check, which fails the test if none
3+
of the given sub-checks return a nil error and empty skip message.'
4+
time: 2023-06-02T12:47:53.181503-04:00
5+
custom:
6+
Issue: "128"

0 commit comments

Comments
 (0)