diff --git a/command/012_config_upgrade.go b/command/012_config_upgrade.go deleted file mode 100644 index 641080fc0..000000000 --- a/command/012_config_upgrade.go +++ /dev/null @@ -1,32 +0,0 @@ -package command - -import ( - "strings" -) - -type ZeroTwelveUpgradeCommand struct { - Meta -} - -func (c *ZeroTwelveUpgradeCommand) Run(args []string) int { - c.Ui.Output(` -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" -} diff --git a/command/012_config_upgrade_test.go b/command/012_config_upgrade_test.go deleted file mode 100644 index 270f96111..000000000 --- a/command/012_config_upgrade_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package command - -import ( - "strings" - "testing" - - "github.com/mitchellh/cli" -) - -func TestZeroTwelveUpgrade_deprecated(t *testing.T) { - ui := new(cli.MockUi) - c := &ZeroTwelveUpgradeCommand{ - Meta: Meta{ - Ui: ui, - }, - } - - if code := c.Run([]string{}); code != 0 { - t.Fatalf("bad: \n%s", ui.ErrorWriter.String()) - } - - output := ui.OutputWriter.String() - if !strings.Contains(output, "The 0.12upgrade command has been removed.") { - t.Fatal("unexpected output:", output) - } -} diff --git a/command/013_config_upgrade.go b/command/013_config_upgrade.go deleted file mode 100644 index 5442bef14..000000000 --- a/command/013_config_upgrade.go +++ /dev/null @@ -1,34 +0,0 @@ -package command - -import ( - "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(` -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" -} diff --git a/command/013_config_upgrade_test.go b/command/013_config_upgrade_test.go deleted file mode 100644 index 2daad8fd0..000000000 --- a/command/013_config_upgrade_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package command - -import ( - "strings" - "testing" - - "github.com/mitchellh/cli" -) - -func TestZeroThirteenUpgrade(t *testing.T) { - ui := new(cli.MockUi) - c := &ZeroThirteenUpgradeCommand{ - Meta: Meta{ - Ui: ui, - }, - } - - if code := c.Run([]string{}); code != 0 { - t.Fatalf("bad: \n%s", ui.ErrorWriter.String()) - } - - output := ui.OutputWriter.String() - if !strings.Contains(output, "The 0.13upgrade command has been removed.") { - t.Fatal("unexpected output:", output) - } -} diff --git a/commands.go b/commands.go index b694c6acf..8a7bd0f06 100644 --- a/commands.go +++ b/commands.go @@ -328,18 +328,6 @@ func initCommands( // Plumbing //----------------------------------------------------------- - "0.12upgrade": func() (cli.Command, error) { - return &command.ZeroTwelveUpgradeCommand{ - Meta: meta, - }, nil - }, - - "0.13upgrade": func() (cli.Command, error) { - return &command.ZeroThirteenUpgradeCommand{ - Meta: meta, - }, nil - }, - "force-unlock": func() (cli.Command, error) { return &command.UnlockCommand{ Meta: meta, @@ -408,8 +396,6 @@ func initCommands( } HiddenCommands = map[string]struct{}{ - "0.12upgrade": struct{}{}, - "0.13upgrade": struct{}{}, "env": struct{}{}, "internal-plugin": struct{}{}, "push": struct{}{},