You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit baa72ce
Browse filesBrowse the repository at this point in the historyBrowse files
Explicit version strings are actually also version constraints! And the special
comparisons we were doing to allow a range of compatible versions can also be
expressed as version constraints.
Bonus: also simplify the way we handle version check errors, by composing the
messages inline and only extracting the repetitive parts into a function.
suggestion:="If you're sure you want to upgrade the state, you can force Terraform to continue using the -ignore-remote-version flag. This may result in an unusable workspace."
42
-
ifignoreVersionConflict {
43
-
suggestion=""
44
-
}
34
+
constignoreRemoteVersionHelp="If you're sure you want to upgrade the state, you can force Terraform to continue using the -ignore-remote-version flag. This may result in an unusable workspace."
45
35
46
-
description:=fmt.Sprintf(
47
-
"The local Terraform version (%s) does not meet the version requirements for remote workspace %s/%s (%s).\n\n%s",
48
-
tfversion,
49
-
organization,
50
-
workspace.Name,
51
-
workspace.TerraformVersion,
52
-
suggestion,
53
-
)
54
-
description=strings.TrimSpace(description)
55
-
returntfdiags.Sourceless(severity, "Terraform version mismatch", description)
suggestion:="If you're sure you want to upgrade the state, you can force Terraform to continue using the -ignore-remote-version flag. This may result in an unusable workspace."
65
-
ifignoreVersionConflict {
66
41
suggestion=""
67
42
}
68
-
69
-
description:=fmt.Sprintf("The remote workspace specified an invalid Terraform version or version constraint: %s\n\n%s", tfversion, suggestion)
70
-
description=strings.TrimSpace(description)
71
-
returntfdiags.Sourceless(severity, "Terraform version error", description)
0 commit comments