Merge pull request #27498 from hashicorp/alisdair/fix-remote-terraform-version-check-again

cli: Fix double check of remote workspace version
This commit is contained in:
Alisdair McDiarmid 2021-01-14 11:02:28 -05:00 committed by GitHub
commit a15c5c84a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1116,6 +1116,11 @@ func (m *Meta) remoteBackendVersionCheck(b backend.Backend, workspace string) tf
// an error
versionDiags := rb.VerifyWorkspaceTerraformVersion(workspace)
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