command/remote: Adding skeleton
This commit is contained in:
parent
1bee8b08af
commit
b3871c0c5a
|
@ -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"
|
||||||
|
}
|
|
@ -96,6 +96,12 @@ func init() {
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"remote": func() (cli.Command, error) {
|
||||||
|
return &command.RemoteCommand{
|
||||||
|
Meta: meta,
|
||||||
|
}, nil
|
||||||
|
},
|
||||||
|
|
||||||
"show": func() (cli.Command, error) {
|
"show": func() (cli.Command, error) {
|
||||||
return &command.ShowCommand{
|
return &command.ShowCommand{
|
||||||
Meta: meta,
|
Meta: meta,
|
||||||
|
|
Loading…
Reference in New Issue