All apps/OpenTofu

OpenTofu

opentofu

OpenTofu is an open-source infrastructure as code tool.

Runs as tofu|macOS, Linux, Windows|opentofu.org

Command form

ai-draft · 5 tasks · 16 fields

Initialize, plan and apply OpenTofu configurations. Backend settings, state commands, workspaces and other subcommands are outside these forms.

Opens the form; the finished command lands at your prompt, unrun
otty gui opentofu

tofu init

Initialize working directory

Download providers and modules. Backend configuration options are left out.

Initialize working directoryExample values, fixed in this page — nothing here reaches a terminal
Basic
Upgrade providers and modules
-upgrade
No color
-no-color
TasksEach one presets the form for one job
Initialize
upgradeno_color
ParametersOnly these flags are editable in the form
Upgrade providers and modules
boolean
-upgrade
No color
boolean
-no-color
Disable state locking
boolean
-lock=false

tofu plan

Create an execution plan

Preview changes. Variable assignments and target/replace addresses are included; planning modes beyond destroy and refresh-only are not.

Create an execution planExample values, fixed in this page — nothing here reaches a terminal
Basic
Variables file
file
Target address
string
Save plan to file
file
Advanced
No color
-no-color
TasksEach one presets the form for one job
Plan and save
outvar_filetargetno_color
Preview destroy
destroyvar_filetargetno_color
ParametersOnly these flags are editable in the form
Plan to destroy everything
boolean
-destroy
Refresh-only plan
boolean
-refresh-only
Skip refresh
boolean
-refresh=false
Target address
string · repeatable
-target
Variables file
path · repeatable
-var-file
Save plan to file
path
-out
Detailed exit code
boolean
-detailed-exitcode
No color
boolean
-no-color

tofu apply

Apply changes

Apply the configuration or a saved plan file. Review a plan first.

Apply changesExample values, fixed in this page — nothing here reaches a terminal
Basic
Variables file
file
Advanced
Compact warnings
-compact-warnings
TasksEach one presets the form for one job
Apply configuration
var_filecompact_warnings
Apply saved plan
planfilecompact_warnings
ParametersOnly these flags are editable in the form
Skip interactive approval
boolean
-auto-approve
Disable prompts
boolean
-input=false
Compact warnings
boolean
-compact-warnings
Variables file
path · repeatable
-var-file
Saved plan file
Leave empty to plan and apply the current configuration.
path · positional 0
SourcesEvery flag above is checked against these
docs
* `-upgrade` Upgrade all previously-selected plugins to the newest version * `-input=true` Ask for input if necessary. If false, will error if * `-no-color` Disable color codes in the command output. * `-lock=false` Disable locking of state files during state-related operations.
manual

opentofu.org

docs
Activate destroy mode using the `-destroy` command line option. Activate refresh-only mode using the `-refresh-only` command line option. - `-refresh=false` - Disables the default behavior of synchronizing the - `-target=ADDRESS` - Instructs OpenTofu to focus its planning efforts only - `-var-file=FILENAME` - Sets values for potentially many * `-detailed-exi…
manual

opentofu.org

docs
- `-auto-approve` - Skips interactive approval of plan before applying. This - `-input=false` - Disables all of OpenTofu's interactive prompts. Note that - `-compact-warnings` - Shows any warning messages in a compact form which Activate destroy mode using the `-destroy` command line option. - `-var-file=FILENAME` - Sets values for potentially many
manual

opentofu.org

Before it fills your prompt, Otty checks the installed tofu against its version. A form that does not match your version is not offered.