Temporarily skip API version checking
This commit is contained in:
parent
e16c53b561
commit
12a4af3e72
|
@ -295,14 +295,16 @@ func (b *Cloud) Configure(obj cty.Value) tfdiags.Diagnostics {
|
|||
desiredAPIVersion, _ := version.NewVersion("2.5")
|
||||
|
||||
if parseErr != nil || currentAPIVersion.LessThan(desiredAPIVersion) {
|
||||
diags = diags.Append(tfdiags.Sourceless(
|
||||
tfdiags.Error,
|
||||
"Unsupported Terraform Enterprise version",
|
||||
fmt.Sprintf(
|
||||
`The 'cloud' option requires Terraform Enterprise %s or later.`,
|
||||
apiToMinimumTFEVersion["2.5"],
|
||||
),
|
||||
))
|
||||
log.Printf("[TRACE] API version check failed; want: >= %s, got: %s", desiredAPIVersion.Original(), currentAPIVersion)
|
||||
// FIXME: Skip version checking temporarily.
|
||||
// diags = diags.Append(tfdiags.Sourceless(
|
||||
// tfdiags.Error,
|
||||
// "Unsupported Terraform Enterprise version",
|
||||
// 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.
|
||||
|
|
|
@ -269,6 +269,7 @@ func TestCloud_config(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{
|
||||
"hostname": cty.NullVal(cty.String),
|
||||
"organization": cty.StringVal("hashicorp"),
|
||||
|
|
|
@ -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 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",
|
||||
}
|
||||
// var apiToMinimumTFEVersion = map[string]string{
|
||||
// "2.5": "v202201-1",
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue