cli: Fix double check of remote workspace version
After verifying the remote backend workspace version is compatible with the local Terraform version, we need to record that this check was successful. Otherwise the fallback error handling path will run a strict version check, even if the versions are compatible, which will cause an unexpected failure.
This commit is contained in:
parent
dcf49dc7dd
commit
ddac282553
|
@ -1115,6 +1115,11 @@ func (m *Meta) remoteBackendVersionCheck(b backend.Backend, workspace string) tf
|
||||||
// an error
|
// an error
|
||||||
versionDiags := rb.VerifyWorkspaceTerraformVersion(workspace)
|
versionDiags := rb.VerifyWorkspaceTerraformVersion(workspace)
|
||||||
diags = diags.Append(versionDiags)
|
diags = diags.Append(versionDiags)
|
||||||
|
// If there are no errors resulting from this check, we do not need to
|
||||||
|
// check again
|
||||||
|
if !diags.HasErrors() {
|
||||||
|
rb.IgnoreVersionConflict()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return diags
|
return diags
|
||||||
|
|
Loading…
Reference in New Issue