opentofu/internal/cloud/versioning.go
Chris Arcand 7cc53fe163 cloud: Set minimum TFE version
These changes remove all of the preexisting version checking for
individual features, wiping the slate clean with an overall minimum
requirement of a future TFP-API-Version 2.5, which at the time of this
writing is expected to be TFE v202112-1.

It also actually provides that expected TFE version as an actionable
error message, rather than generically saying that it isn't supported or
using the somewhat opaque API version header.
2021-10-28 19:29:12 -05:00

13 lines
564 B
Go

package cloud
// This simple map exists to translate TFP-API-Version strings to the TFE release where it was
// introduced, to provide actionable feedback on features that may be unsupported by the TFE
// installation but present in this version of Terraform.
//
// The cloud package here, introduced in Terraform 1.1.0, requires a minimum of 2.5 (v202201-1)
// The TFP-API-Version header that this refers to was introduced in 2.3 (v202006-1), so an absent
// header can be considered < 2.3.
var apiToMinimumTFEVersion = map[string]string{
"2.5": "v202201-1",
}