terraform/command/012_config_upgrade.go

33 lines
769 B
Go
Raw Normal View History

package command
2020-06-01 22:12:30 +02:00
import (
"strings"
)
type ZeroTwelveUpgradeCommand struct {
Meta
}
func (c *ZeroTwelveUpgradeCommand) Run(args []string) int {
2020-12-01 16:48:55 +01:00
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
2020-12-01 16:48:55 +01:00
current version.`)
return 0
}
2020-06-01 22:12:30 +02:00
func (c *ZeroTwelveUpgradeCommand) Help() string {
helpText := `
Usage: terraform 0.12upgrade
The 0.12upgrade command has been removed. You must run this command with
2020-06-01 22:12:30 +02:00
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"
}