mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
command: update help text
This commit is contained in:
parent
0299e60e83
commit
a655c1619a
@ -143,20 +143,11 @@ Usage: terraform init [options] SOURCE [PATH]
|
||||
|
||||
Options:
|
||||
|
||||
-address=url URL of the remote storage server.
|
||||
Required for HTTP backend, optional for Atlas and Consul.
|
||||
-backend=atlas Specifies the type of remote backend. If not
|
||||
specified, local storage will be used.
|
||||
|
||||
-access-token=token Authentication token for state storage server.
|
||||
Required for Atlas backend, optional for Consul.
|
||||
|
||||
-backend=atlas Specifies the type of remote backend. Must be one
|
||||
of Atlas, Consul, or HTTP. Defaults to atlas.
|
||||
|
||||
-name=name Name of the state file in the state storage server.
|
||||
Required for Atlas backend.
|
||||
|
||||
-path=path Path of the remote state in Consul. Required for the
|
||||
Consul backend.
|
||||
-backend-config="k=v" Specifies configuration for the remote storage
|
||||
backend. This can be specified multiple times.
|
||||
|
||||
`
|
||||
return strings.TrimSpace(helpText)
|
||||
|
@ -38,7 +38,7 @@ func (c *RemoteCommand) Run(args []string) int {
|
||||
cmdFlags.StringVar(&c.conf.statePath, "state", DefaultStateFilename, "path")
|
||||
cmdFlags.StringVar(&c.conf.backupPath, "backup", "", "path")
|
||||
cmdFlags.StringVar(&c.remoteConf.Type, "backend", "atlas", "")
|
||||
cmdFlags.Var((*FlagKV)(&config), "config", "config")
|
||||
cmdFlags.Var((*FlagKV)(&config), "backend-config", "config")
|
||||
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
|
||||
if err := cmdFlags.Parse(args); err != nil {
|
||||
return 1
|
||||
@ -310,15 +310,12 @@ Usage: terraform remote [options]
|
||||
|
||||
Options:
|
||||
|
||||
-address=url URL of the remote storage server.
|
||||
Required for HTTP backend, optional for Atlas and Consul.
|
||||
|
||||
-access-token=token Authentication token for state storage server.
|
||||
Required for Atlas backend, optional for Consul.
|
||||
|
||||
-backend=Atlas Specifies the type of remote backend. Must be one
|
||||
of Atlas, Consul, or HTTP. Defaults to Atlas.
|
||||
|
||||
-backend-config="k=v" Specifies configuration for the remote storage
|
||||
backend. This can be specified multiple times.
|
||||
|
||||
-backup=path Path to backup the existing state file before
|
||||
modifying. Defaults to the "-state" path with
|
||||
".backup" extension. Set to "-" to disable backup.
|
||||
@ -326,15 +323,9 @@ Options:
|
||||
-disable Disables remote state management and migrates the state
|
||||
to the -state path.
|
||||
|
||||
-name=name Name of the state file in the state storage server.
|
||||
Required for Atlas backend.
|
||||
|
||||
-path=path Path of the remote state in Consul. Required for the
|
||||
Consul backend.
|
||||
|
||||
-pull=true Controls if the remote state is pulled before disabling.
|
||||
This defaults to true to ensure the latest state is cached
|
||||
before disabling.
|
||||
before disabling.
|
||||
|
||||
-state=path Path to read state. Defaults to "terraform.tfstate"
|
||||
unless remote state is enabled.
|
||||
|
@ -243,8 +243,8 @@ func TestRemote_initBlank(t *testing.T) {
|
||||
|
||||
args := []string{
|
||||
"-backend=http",
|
||||
"-config", "address=http://example.com",
|
||||
"-config", "access_token=test",
|
||||
"-backend-config", "address=http://example.com",
|
||||
"-backend-config", "access_token=test",
|
||||
}
|
||||
if code := c.Run(args); code != 0 {
|
||||
t.Fatalf("bad: \n%s", ui.ErrorWriter.String())
|
||||
@ -319,8 +319,8 @@ func TestRemote_updateRemote(t *testing.T) {
|
||||
|
||||
args := []string{
|
||||
"-backend=http",
|
||||
"-config", "address=http://example.com",
|
||||
"-config", "access_token=test",
|
||||
"-backend-config", "address=http://example.com",
|
||||
"-backend-config", "access_token=test",
|
||||
}
|
||||
if code := c.Run(args); code != 0 {
|
||||
t.Fatalf("bad: \n%s", ui.ErrorWriter.String())
|
||||
@ -374,8 +374,8 @@ func TestRemote_enableRemote(t *testing.T) {
|
||||
|
||||
args := []string{
|
||||
"-backend=http",
|
||||
"-config", "address=http://example.com",
|
||||
"-config", "access_token=test",
|
||||
"-backend-config", "address=http://example.com",
|
||||
"-backend-config", "access_token=test",
|
||||
}
|
||||
if code := c.Run(args); code != 0 {
|
||||
t.Fatalf("bad: \n%s", ui.ErrorWriter.String())
|
||||
|
Loading…
Reference in New Issue
Block a user