diff --git a/command/012_config_upgrade.go b/command/012_config_upgrade.go index 497e0d1b7..45e5a6d40 100644 --- a/command/012_config_upgrade.go +++ b/command/012_config_upgrade.go @@ -1,6 +1,9 @@ package command -import "fmt" +import ( + "fmt" + "strings" +) type ZeroTwelveUpgradeCommand struct { Meta @@ -13,3 +16,18 @@ 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 is deprecated. 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/commands.go b/commands.go index 785615bbd..d1823568c 100644 --- a/commands.go +++ b/commands.go @@ -311,7 +311,7 @@ func initCommands(config *cliconfig.Config, services *disco.Disco, providerSrc g //----------------------------------------------------------- "0.12upgrade": func() (cli.Command, error) { - return &command.ZeroThirteenUpgradeCommand{ + return &command.ZeroTwelveUpgradeCommand{ Meta: meta, }, nil },