mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-13 09:32:24 -06:00
Merge pull request #29645 from hashicorp/alisdair/verify-remote-terraform-version-update
backend/remote: Support interop from 0.14 to 1.1
This commit is contained in:
commit
50fac6afd8
@ -917,9 +917,9 @@ func (b *Remote) VerifyWorkspaceTerraformVersion(workspaceName string) tfdiags.D
|
|||||||
// are aware of are:
|
// are aware of are:
|
||||||
//
|
//
|
||||||
// - 0.14.0 is guaranteed to be compatible with versions up to but not
|
// - 0.14.0 is guaranteed to be compatible with versions up to but not
|
||||||
// including 1.1.0
|
// including 1.2.0
|
||||||
v110 := version.Must(version.NewSemver("1.1.0"))
|
v120 := version.Must(version.NewSemver("1.2.0"))
|
||||||
if tfversion.SemVer.LessThan(v110) && remoteVersion.LessThan(v110) {
|
if tfversion.SemVer.LessThan(v120) && remoteVersion.LessThan(v120) {
|
||||||
return diags
|
return diags
|
||||||
}
|
}
|
||||||
// - Any new Terraform state version will require at least minor patch
|
// - Any new Terraform state version will require at least minor patch
|
||||||
|
@ -566,7 +566,8 @@ func TestRemote_VerifyWorkspaceTerraformVersion(t *testing.T) {
|
|||||||
{"0.14.0", "0.13.5", false, false},
|
{"0.14.0", "0.13.5", false, false},
|
||||||
{"0.14.0", "0.14.1", true, false},
|
{"0.14.0", "0.14.1", true, false},
|
||||||
{"0.14.0", "1.0.99", true, false},
|
{"0.14.0", "1.0.99", true, false},
|
||||||
{"0.14.0", "1.1.0", true, true},
|
{"0.14.0", "1.1.0", true, false},
|
||||||
|
{"0.14.0", "1.2.0", true, true},
|
||||||
{"1.2.0", "1.2.99", true, false},
|
{"1.2.0", "1.2.99", true, false},
|
||||||
{"1.2.0", "1.3.0", true, true},
|
{"1.2.0", "1.3.0", true, true},
|
||||||
{"0.15.0", "latest", true, false},
|
{"0.15.0", "latest", true, false},
|
||||||
|
Loading…
Reference in New Issue
Block a user