terraform/internal/command/push.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.1 KiB
Go
Raw Permalink Normal View History

// Copyright IBM Corp. 2014, 2026
// SPDX-License-Identifier: BUSL-1.1
2015-03-04 23:42:26 -05:00
package command
import (
"strings"
2015-03-05 15:37:13 -05:00
"github.com/hashicorp/terraform/internal/tfdiags"
2015-03-04 23:42:26 -05:00
)
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 \"terraform 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 Terraform Enterprise v2, use its REST API. Contact Terraform Enterprise support for more information.",
))
return 1
2015-03-04 23:42:26 -05:00
}
func (c *PushCommand) Help() string {
helpText := `
Usage: terraform [global options] push [options] [DIR]
2015-03-04 23:42:26 -05:00
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.
2015-03-04 23:42:26 -05:00
`
return strings.TrimSpace(helpText)
}
func (c *PushCommand) Synopsis() string {
return "Obsolete command for Terraform Enterprise legacy (v1)"
2015-03-05 17:55:15 -05:00
}