github.com/iaas-resource-provision/iaas-rpc@v1.0.7-0.20211021023331-ed21f798c408/internal/command/push.go (about)

     1  package command
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/iaas-resource-provision/iaas-rpc/internal/tfdiags"
     7  )
     8  
     9  type PushCommand struct {
    10  	Meta
    11  }
    12  
    13  func (c *PushCommand) Run(args []string) int {
    14  	// This command is no longer supported, but we'll retain it just to
    15  	// give the user some next-steps after upgrading.
    16  	c.showDiagnostics(tfdiags.Sourceless(
    17  		tfdiags.Error,
    18  		"Command \"terraform push\" is no longer supported",
    19  		"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.",
    20  	))
    21  	return 1
    22  }
    23  
    24  func (c *PushCommand) Help() string {
    25  	helpText := `
    26  Usage: terraform [global options] push [options] [DIR]
    27  
    28    This command was for the legacy version of Terraform Enterprise (v1), which
    29    has now reached end-of-life. Therefore this command is no longer supported.
    30  `
    31  	return strings.TrimSpace(helpText)
    32  }
    33  
    34  func (c *PushCommand) Synopsis() string {
    35  	return "Obsolete command for Terraform Enterprise legacy (v1)"
    36  }