2024-02-08 03:48:59 -06:00
// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
2023-05-02 10:33:06 -05:00
// SPDX-License-Identifier: MPL-2.0
2015-03-04 22:42:26 -06:00
package command
import (
"strings"
2015-03-05 14:37:13 -06:00
2023-09-20 06:35:35 -05:00
"github.com/opentofu/opentofu/internal/tfdiags"
2015-03-04 22:42:26 -06:00
)
type PushCommand struct {
Meta
}
func ( c * PushCommand ) Run ( args [ ] string ) int {
2018-03-28 11:47:05 -05:00
// 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 ,
2023-09-21 07:38:46 -05:00
"Command \"tofu push\" is no longer supported" ,
2023-08-23 11:04:21 -05:00
"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." ,
2018-03-28 11:47:05 -05:00
) )
return 1
2015-03-04 22:42:26 -06:00
}
func ( c * PushCommand ) Help ( ) string {
helpText := `
2023-09-21 07:38:46 -05:00
Usage : tofu [ global options ] push [ options ] [ DIR ]
2015-03-04 22:42:26 -06:00
2018-03-28 11:47:05 -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 22:42:26 -06:00
`
return strings . TrimSpace ( helpText )
}
func ( c * PushCommand ) Synopsis ( ) string {
2018-03-28 11:47:05 -05:00
return "Obsolete command for Terraform Enterprise legacy (v1)"
2015-03-05 16:55:15 -06:00
}