Difference between revisions of "Terraform --help"

From wikieduonline
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{{lowercase}}
  terraform --help
+
  [[terraform]] --help
 
  Usage: terraform [-version] [-help] <command> [args]
 
  Usage: terraform [-version] [-help] <command> [args]
 
   
 
   
Line 10: Line 10:
 
   
 
   
 
  Common commands:
 
  Common commands:
     [[terraform apply|apply]]]              Builds or changes infrastructure
+
     [[terraform apply|apply]]              Builds or changes infrastructure
 
     [[terraform console|console]]            Interactive console for Terraform interpolations
 
     [[terraform console|console]]            Interactive console for Terraform interpolations
 
     [[terraform destroy|destroy]]            Destroy Terraform-managed infrastructure
 
     [[terraform destroy|destroy]]            Destroy Terraform-managed infrastructure
 
     [[terraform env|env]]                Workspace management
 
     [[terraform env|env]]                Workspace management
     [[terraform fmt|fmt]]               Rewrites config files to canonical format
+
     [[terraform fmt|fmt]]               Rewrites config files to canonical format
 
     [[terraform get|get]]                Download and install modules for the configuration
 
     [[terraform get|get]]                Download and install modules for the configuration
 
     [[terraform graph|graph]]              Create a visual graph of Terraform resources
 
     [[terraform graph|graph]]              Create a visual graph of Terraform resources
Line 27: Line 27:
 
     [[terraform untaint|untaint]]            Manually unmark a resource as tainted
 
     [[terraform untaint|untaint]]            Manually unmark a resource as tainted
 
     [[terraform validate|validate]]          Validates the Terraform files
 
     [[terraform validate|validate]]          Validates the Terraform files
     [[terraform version|version]]           Prints the Terraform version
+
     [[terraform version|version]]           Prints the Terraform version
 
     [[terraform workspace|workspace]]          Workspace management  
 
     [[terraform workspace|workspace]]          Workspace management  
 
   
 
   
Line 36: Line 36:
 
     [[terraform push|push]]              Obsolete command for Terraform Enterprise legacy (v1)
 
     [[terraform push|push]]              Obsolete command for Terraform Enterprise legacy (v1)
 
     [[terraform state|state]]              Advanced state management
 
     [[terraform state|state]]              Advanced state management
 
 
 
Main commands:
 
  [[terraform init|init]]          Prepare your working directory for other commands
 
  [[terraform validate|validate]]      Check whether the configuration is valid
 
  [[terraform plan|plan]]          Show changes required by the current configuration
 
  [[terraform apply|apply]]        Create or update infrastructure
 
  [[terraform destroy|destroy]]      Destroy previously-created infrastructure
 
 
All other commands:
 
  console      Try Terraform expressions at an interactive command prompt
 
  fmt          Reformat your configuration in the standard style
 
  force-unlock  Release a stuck lock on the current workspace
 
  get          Install or upgrade remote Terraform modules
 
  graph        Generate a Graphviz graph of the steps in an operation
 
  import        Associate existing infrastructure with a Terraform resource
 
  login        Obtain and save credentials for a remote host
 
  logout        Remove locally-stored credentials for a remote host
 
  output        Show output values from your root module
 
  providers    Show the providers required for this configuration
 
  refresh      Update the state to match remote systems
 
  [[terraform show|show]]          Show the current state or a saved plan
 
  [[terraform state|state]]        Advanced state management
 
  taint        Mark a resource instance as not fully functional
 
  untaint      Remove the 'tainted' state from a resource instance
 
  version      Show the current Terraform version
 
  workspace    Workspace management
 
 
Global options (use these before the subcommand, if any):
 
  -chdir=DIR    Switch to a different working directory before executing the
 
                given subcommand.
 
  -help        Show this help output, or the help for a specified subcommand.
 
  -version      An alias for the "version" subcommand.
 
 
 
 
Older versions:
 
    [[terraform apply|apply]]              Builds or changes infrastructure
 
    console            Interactive console for Terraform interpolations
 
    destroy            Destroy Terraform-managed infrastructure
 
    [[terraform fmt|fmt]]                Rewrites config files to canonical format
 
    get                Download and install modules for the configuration
 
    graph              Create a visual graph of Terraform resources
 
    import            Import existing infrastructure into Terraform
 
    init              Initialize a new or existing Terraform configuration
 
    output            Read an output from a state file
 
    plan              Generate and show an execution plan
 
    providers          Prints a tree of the providers used in the configuration
 
    push              Upload this Terraform module to Terraform Enterprise to run
 
    refresh            Update local state file against real resources
 
    [[terraform show|show]]              Inspect Terraform state or plan
 
    taint              Manually mark a resource for recreation
 
    untaint            Manually unmark a resource as tainted
 
    validate          Validates the Terraform files
 
    [[terraform version|version]]            Prints the Terraform version
 
    workspace          Workspace management
 
 
All other commands:
 
    0.12upgrade        Rewrites pre-0.12 module source code for v0.12
 
    0.13upgrade        Rewrites pre-0.13 module source code for v0.13
 
    debug              Debug output management (experimental)
 
    force-unlock      Manually unlock the terraform state
 
    push              Obsolete command for Terraform Enterprise legacy (v1)
 
    state              Advanced state management
 
  
  
 
== See also ==
 
== See also ==
* {{Terraform}}
+
* {{terraform cmd}}
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Latest revision as of 15:48, 10 July 2024

terraform --help
Usage: terraform [-version] [-help] <command> [args]

The available commands for execution are listed below.
The most common, useful commands are shown first, followed by
less common or more advanced commands. If you're just getting
started with Terraform, stick with the common commands. For the
other commands, please read the help and docs before usage.

Common commands:
    apply              Builds or changes infrastructure
    console            Interactive console for Terraform interpolations
    destroy            Destroy Terraform-managed infrastructure
    env                Workspace management
    fmt                Rewrites config files to canonical format
    get                Download and install modules for the configuration
    graph              Create a visual graph of Terraform resources
    import             Import existing infrastructure into Terraform
    init               Initialize a Terraform working directory
    output             Read an output from a state file
    plan               Generate and show an execution plan
    providers          Prints a tree of the providers used in the configuration
    refresh            Update local state file against real resources
    show               Inspect Terraform state or plan
    taint              Manually mark a resource for recreation
    untaint            Manually unmark a resource as tainted
    validate           Validates the Terraform files
    version            Prints the Terraform version
    workspace          Workspace management 

All other commands:
    0.12upgrade        Rewrites pre-0.12 module source code for v0.12
    debug              Debug output management (experimental)
    force-unlock       Manually unlock the terraform state
    push               Obsolete command for Terraform Enterprise legacy (v1)
    state              Advanced state management


See also[edit]

Advertising: