terraform

Terraform CLI

Subcommands

NameDescription
initPrepare your working directory for other commands
validateCheck whether the configuration is valid
planShow changes required by the current configuration
applyCreate or update infrastructure
destroyDestroy previously-created infrastructure
consoleTry Terraform expressions at an interactive command prompt
fmtReformat your configuration in the standard style
force-unlockRelease a stuck lock on the current workspace
getInstall or upgrade remote Terraform modules
graphGenerate a Graphviz graph of the steps in an operation
importAssociate existing infrastructure with a Terraform resource
loginObtain and save credentials for a remote hos
logoutRemove locally-stored credentials for a remote host
outputShow output values from your root module
providersShow the providers required for this configuration
refreshUpdate the state to match remote systems
showShow the current state or a saved plan
stateAdvanced state management
taintMark a resource instance as not fully functional
untaintRemove the 'tainted' state from a resource instance
workspaceWorkspace management
-install-autocompleteInstall bash/zsh tab completion
-uninstall-autocompleteUninstall bash/zsh tab completion

Options

NameDescription
-helpShow this help output, or the help for a specified subcommand
-chdir <command>Switch to a different working directory before executing the given subcommand
-versionShow the current Terraform version