command/remote: Adding skeleton

This commit is contained in:
Armon Dadgar 2014-10-09 15:05:53 -07:00 committed by Mitchell Hashimoto
parent 1bee8b08af
commit b3871c0c5a
2 changed files with 46 additions and 0 deletions

40
command/remote.go Normal file
View File

@ -0,0 +1,40 @@
package command
import "strings"
// RemoteCommand is a Command implementation that is used to
// enable and disable remote state management
type RemoteCommand struct {
Meta
}
func (c *RemoteCommand) Run(args []string) int {
return 0
}
func (c *RemoteCommand) Help() string {
helpText := `
Usage: terraform remote [options]
Configures Terraform to use a remote state server. This allows state
to be pulled down when necessary and then pushed to the server when
updated. In this mode, the state file does not need to be stored durably
since the remote server provides the durability.
Options:
-remote=name Name of the state file in the state storage server.
Optional, default does not use remote storage.
-remote-auth=token Authentication token for state storage server.
Optional, defaults to blank.
-remote-server=url URL of the remote storage server.
`
return strings.TrimSpace(helpText)
}
func (c *RemoteCommand) Synopsis() string {
return "Configures remote state management"
}

View File

@ -96,6 +96,12 @@ func init() {
}, nil
},
"remote": func() (cli.Command, error) {
return &command.RemoteCommand{
Meta: meta,
}, nil
},
"show": func() (cli.Command, error) {
return &command.ShowCommand{
Meta: meta,