github.com/hobbeswalsh/terraform@v0.3.7-0.20150619183303-ad17cf55a0fa/website/source/docs/commands/init.html.markdown (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Command: init"
     4  sidebar_current: "docs-commands-init"
     5  description: |-
     6    The `terraform init` command is used to initialize a Terraform configuration using another module as a skeleton.
     7  ---
     8  
     9  # Command: init
    10  
    11  The `terraform init` command is used to initialize a Terraform configuration
    12  using another
    13  [module](/docs/modules/index.html)
    14  as a skeleton.
    15  
    16  ## Usage
    17  
    18  Usage: `terraform init [options] SOURCE [DIR]`
    19  
    20  Init will download the module from SOURCE and copy it into the DIR
    21  (which defaults to the current working directory). Version control
    22  information from the module (such as Git history) will not be copied.
    23  
    24  The directory being initialized must be empty of all Terraform configurations.
    25  If the module has other files which conflict with what is already in the
    26  directory, they _will be overwritten_.
    27  
    28  The command-line options available are a subset of the ones for the
    29  [remote command](/docs/commands/remote.html), and are used to initialize
    30  a remote state configuration if provided.
    31  
    32  The command-line flags are all optional. The list of available flags are:
    33  
    34  * `-address=url` - URL of the remote storage server. Required for HTTP backend,
    35    optional for Atlas and Consul.
    36  
    37  * `-access-token=token` - Authentication token for state storage server.
    38    Required for Atlas backend, optional for Consul.
    39  
    40  * `-backend=atlas` - Specifies the type of remote backend. Must be one
    41    of Atlas, Consul, or HTTP. Defaults to atlas.
    42  
    43  * `-name=name` - Name of the state file in the state storage server.
    44    Required for Atlas backend.
    45  
    46  * `-path=path` - Path of the remote state in Consul. Required for the Consul backend.
    47