diff --git a/backend/remote/backend.go b/backend/remote/backend.go index 8823384e0..3d3598926 100644 --- a/backend/remote/backend.go +++ b/backend/remote/backend.go @@ -370,7 +370,7 @@ func (b *Remote) checkConstraints(c *disco.Constraints) tfdiags.Diagnostics { } // Create the version to check. - v, err := version.NewVersion(tfversion.String()) + v, err := version.NewVersion(tfversion.Version) if err != nil { return diags.Append(checkConstraintsWarning(err)) } @@ -433,7 +433,7 @@ func (b *Remote) checkConstraints(c *disco.Constraints) tfdiags.Diagnostics { summary := fmt.Sprintf("Incompatible Terraform version v%s", v.String()) details := fmt.Sprintf( "The configured Terraform Enterprise backend is compatible with Terraform "+ - "versions >= %s, < %s%s.", c.Minimum, c.Maximum, excluding, + "versions >= %s, <= %s%s.", c.Minimum, c.Maximum, excluding, ) if action != "" && toVersion != "" { diff --git a/backend/remote/backend_test.go b/backend/remote/backend_test.go index c250b3745..7edbd4358 100644 --- a/backend/remote/backend_test.go +++ b/backend/remote/backend_test.go @@ -379,7 +379,7 @@ func TestRemote_checkConstraints(t *testing.T) { Maximum: "0.11.11", }, version: "0.10.1", - result: "versions >= 0.11.0, < 0.11.11.", + result: "versions >= 0.11.0, <= 0.11.11.", }, "list exclusion": { constraints: &disco.Constraints{