mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
f0ccee854c
We only preserve these major upgrade versions for one major version after they are added, because our upgrade path assumes moving forward only one major version at a time. Now that our main branch is tracking towards Terraform 0.14, we no longer need the 0.13upgrade subcommand. This also includes some minor adjustments to the 0.12upgrade command to align the terminology used in the output of both commands. We usually use the word "deprecated" to mean that something is still available but no longer recommended, but neither of these commands is actually available so "removed" is clearer. We could in principle have removed even the removal notice for 0.12upgrade here, but it's relatively little code and not a big deal to keep around to help prompt those who might try to upgrade directly from 0.11 to 0.14. We may still remove the historical configuration upgrade commands prior to releasing Terraform 1.0, though.
34 lines
789 B
Go
34 lines
789 B
Go
package command
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
type ZeroTwelveUpgradeCommand struct {
|
|
Meta
|
|
}
|
|
|
|
func (c *ZeroTwelveUpgradeCommand) Run(args []string) int {
|
|
c.Ui.Output(fmt.Sprintf(`
|
|
The 0.12upgrade command has been removed. You must run this command with
|
|
Terraform v0.12 to upgrade your configuration syntax before upgrading to the
|
|
current version.`))
|
|
return 0
|
|
}
|
|
|
|
func (c *ZeroTwelveUpgradeCommand) Help() string {
|
|
helpText := `
|
|
Usage: terraform 0.12upgrade
|
|
|
|
The 0.12upgrade command has been removed. You must run this command with
|
|
Terraform v0.12 to upgrade your configuration syntax before upgrading to
|
|
the current version.
|
|
`
|
|
return strings.TrimSpace(helpText)
|
|
}
|
|
|
|
func (c *ZeroTwelveUpgradeCommand) Synopsis() string {
|
|
return "Rewrites pre-0.12 module source code for v0.12"
|
|
}
|