Terraform COMMANDS
Here is a list of some commonly used Terraform commands, along with a brief description and example for each:
terraform init: Prepare your working directory for other commands. Example:terraform initterraform validate: Check whether the configuration is valid. Example:terraform validateterraform plan: Show changes required by the current configuration. Example:terraform planterraform apply: Create or update infrastructure. Example:terraform applyterraform destroy: Destroy previously-created infrastructure. Example:terraform destroyterraform console: Try Terraform expressions at an interactive command prompt. Example:terraform consoleterraform fmt: Reformat your configuration in the standard style. Example:terraform fmtterraform force-unlock: Release a stuck lock on the current workspace. Example:terraform force-unlock LOCK_IDterraform get: Install or upgrade remote Terraform modules. Example:terraform getterraform graph: Generate a Graphviz graph of the steps in an operation. Example:terraform graphterraform import: Associate existing infrastructure with a Terraform resource. Example:terraform import ADDRESS IDterraform login: Obtain and save credentials for a remote host. Example:terraform loginterraform logout: Remove locally-stored credentials for a remote host. Example:terraform logoutterraform output: Show output values from your root module. Example:terraform outputterraform providers: Show the providers required for this configuration. Example:terraform providersterraform refresh: Update the state to match remote systems. Example:terraform refreshterraform show: Show the current state or a saved plan. Example:terraform showterraform state: Advanced state management. Example:terraform state listterraform taint: Mark a resource instance as not fully functional. Example:terraform taint ADDRESSterrafrom untaint: Remove the ‘tainted’ state from a resource instance. Example:terrafrom untaint ADDRESSterrafrom version: Show the current Terraform version. Example:terrafrom version