Fix #1375 - missing cli command options (#1448)

Signed-off-by: SaiCharanReddy Adla <saicharanreddy.adla@fmr.com>
Signed-off-by: SaiCharanReddyAdla <163337878+SaiCharanReddyAdla@users.noreply.github.com>
This commit is contained in:
SaiCharanReddyAdla 2024-04-25 17:59:47 +05:30 committed by GitHub
parent 2132317d1b
commit a4fb0f3fa3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 1 deletions

View File

@ -28,6 +28,20 @@ For configurations using
`tofu console` accepts the legacy command line option
[`-state`](../../language/settings/backends/local.mdx#command-line-arguments).
This command also accepts the following options for tofu console:
- `-var 'NAME=VALUE'` - Sets a value for a single
[input variable](/docs/language/values/variables) declared in the
root module of the configuration. Use this option multiple times to set
more than one variable. Refer to
[Input Variables on the Command Line](#input-variables-on-the-command-line) for more information.
- `-var-file=FILENAME` - Sets values for potentially many
[input variables](/docs/language/values/variables) declared in the
root module of the configuration, using definitions from a
["tfvars" file](/docs/language/values/variables#variable-definitions-tfvars-files).
Use this option multiple times to include values from more than one file.
## Scripting
The `tofu console` command can be used in non-interactive scripts
@ -116,4 +130,4 @@ Test various functions:
```
> cidrnetmask("172.16.0.0/12")
"255.240.0.0"
```
```

View File

@ -46,4 +46,19 @@ pushing state, the destination state will be overwritten.
For configurations using the [`cloud` backend](../../../cli/cloud/index.mdx) or the [`remote` backend](../../../language/settings/backends/remote.mdx)
only, `tofu state push`
also accepts the option
[`-ignore-remote-version`](/docs/cli/cloud/command-line-arguments#ignore-remote-version).
This command also accepts the following options for tofu state push:
- `-lock=false` - Don't hold a state lock during the operation. This is
dangerous if others might concurrently run commands against the same
workspace.
- `-lock-timeout=DURATION` - Unless locking is disabled with `-lock=false`,
instructs OpenTofu to retry acquiring a lock for a period of time before
returning an error. The duration syntax is a number followed by a time
unit letter, such as "3s" for three seconds.
[`-ignore-remote-version`](../../../cli/cloud/command-line-arguments.mdx#ignore-remote-version).