Temporarily skip API version checking

This commit is contained in:
Chris Arcand 2021-10-21 22:25:00 -05:00
parent e16c53b561
commit 12a4af3e72
3 changed files with 14 additions and 11 deletions

View File

@ -295,14 +295,16 @@ func (b *Cloud) Configure(obj cty.Value) tfdiags.Diagnostics {
desiredAPIVersion, _ := version.NewVersion("2.5") desiredAPIVersion, _ := version.NewVersion("2.5")
if parseErr != nil || currentAPIVersion.LessThan(desiredAPIVersion) { if parseErr != nil || currentAPIVersion.LessThan(desiredAPIVersion) {
diags = diags.Append(tfdiags.Sourceless( log.Printf("[TRACE] API version check failed; want: >= %s, got: %s", desiredAPIVersion.Original(), currentAPIVersion)
tfdiags.Error, // FIXME: Skip version checking temporarily.
"Unsupported Terraform Enterprise version", // diags = diags.Append(tfdiags.Sourceless(
fmt.Sprintf( // tfdiags.Error,
`The 'cloud' option requires Terraform Enterprise %s or later.`, // "Unsupported Terraform Enterprise version",
apiToMinimumTFEVersion["2.5"], // fmt.Sprintf(
), // `The 'cloud' option requires Terraform Enterprise %s or later.`,
)) // apiToMinimumTFEVersion["2.5"],
// ),
// ))
} }
// Configure a local backend for when we need to run operations locally. // Configure a local backend for when we need to run operations locally.

View File

@ -269,6 +269,7 @@ func TestCloud_config(t *testing.T) {
} }
func TestCloud_configVerifyMinimumTFEVersion(t *testing.T) { func TestCloud_configVerifyMinimumTFEVersion(t *testing.T) {
t.Skip("skipping, as TFE version checking has been temporarily disabled")
config := cty.ObjectVal(map[string]cty.Value{ config := cty.ObjectVal(map[string]cty.Value{
"hostname": cty.NullVal(cty.String), "hostname": cty.NullVal(cty.String),
"organization": cty.StringVal("hashicorp"), "organization": cty.StringVal("hashicorp"),

View File

@ -7,6 +7,6 @@ package cloud
// The cloud package here, introduced in Terraform 1.1.0, requires a minimum of 2.5 (v202201-1) // 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 // 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. // header can be considered < 2.3.
var apiToMinimumTFEVersion = map[string]string{ // var apiToMinimumTFEVersion = map[string]string{
"2.5": "v202201-1", // "2.5": "v202201-1",
} // }