Files
opentf/internal/command/push.go
Kuba Martin 3b5b8ba719 Update internal/command to use OpenTF in user-provided strings. (#87)
* Update `internal/command` to use OpenTF

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix e2e tests.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix e2e tests.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Rewrite message.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

---------

Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-08-24 10:56:05 +02:00

40 lines
1.1 KiB
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package command
import (
"strings"
"github.com/placeholderplaceholderplaceholder/opentf/internal/tfdiags"
)
type PushCommand struct {
Meta
}
func (c *PushCommand) Run(args []string) int {
// This command is no longer supported, but we'll retain it just to
// give the user some next-steps after upgrading.
c.showDiagnostics(tfdiags.Sourceless(
tfdiags.Error,
"Command \"opentf push\" is no longer supported",
"This command was used to push configuration to Terraform Enterprise legacy (v1), which has now reached end-of-life. To push configuration to a new cloud backend, use its REST API.",
))
return 1
}
func (c *PushCommand) Help() string {
helpText := `
Usage: opentf [global options] push [options] [DIR]
This command was for the legacy version of Terraform Enterprise (v1), which
has now reached end-of-life. Therefore this command is no longer supported.
`
return strings.TrimSpace(helpText)
}
func (c *PushCommand) Synopsis() string {
return "Obsolete command for Terraform Enterprise legacy (v1)"
}