opentofu/command/013_config_upgrade.go
Martin Atkins f0ccee854c command/0.13upgrade: Remove this subcommand
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.
2020-09-29 10:00:35 -07:00

36 lines
919 B
Go

package command
import (
"fmt"
"strings"
)
// ZeroThirteenUpgradeCommand upgrades configuration files for a module
// to include explicit provider source settings
type ZeroThirteenUpgradeCommand struct {
Meta
}
func (c *ZeroThirteenUpgradeCommand) Run(args []string) int {
c.Ui.Output(fmt.Sprintf(`
The 0.13upgrade command has been removed. You must run this command with
Terraform v0.13 to upgrade your provider requirements before upgrading to the
current version.`))
return 0
}
func (c *ZeroThirteenUpgradeCommand) Help() string {
helpText := `
Usage: terraform 0.13upgrade
The 0.13upgrade command has been removed. You must run this command with
Terraform v0.13 to upgrade your provider requirements before upgrading to
the current version.
`
return strings.TrimSpace(helpText)
}
func (c *ZeroThirteenUpgradeCommand) Synopsis() string {
return "Rewrites pre-0.13 module source code for v0.13"
}