Merge pull request #25103 from hashicorp/alisdair/fix-012upgrade-stub

command: Fix 0.12upgrade stub
This commit is contained in:
Alisdair McDiarmid 2020-06-01 16:18:12 -04:00 committed by GitHub
commit ded30b6836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View File

@ -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"
}

View File

@ -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
},