github.com/bengesoff/terraform@v0.3.1-0.20141018223233-b25a53629922/website/source/docs/configuration/load.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Load Order and Semantics"
     4  sidebar_current: "docs-config-load"
     5  ---
     6  
     7  # Load Order and Semantics
     8  
     9  When invoking any command that loads the Terraform configuration,
    10  Terraform loads all configuration files within the directory
    11  specified in alphabetical order.
    12  
    13  The files loaded must end in
    14  either `.tf` or `.tf.json` to specify the format that is in use.
    15  Otherwise, the files are ignored. Multiple file formats can
    16  be present in the same directory; it is okay to have one Terraform
    17  configuration file be Terraform syntax and another be JSON.
    18  
    19  [Override](/docs/configuration/override.html)
    20  files are the exception, as they're loaded after all non-override
    21  files, in alphabetical order.
    22  
    23  The configuration within the loaded files are appended to each
    24  other. This is in contrast to being merged. This means that two
    25  resources with the same name are not merged, and will instead
    26  cause a validation error. This is in contrast to
    27  [overrides](/docs/configuration/override.html),
    28  which do merge.
    29  
    30  The order of variables, resources, etc. defined within the
    31  configuration doesn't matter. Terraform configurations are
    32  [declarative](http://en.wikipedia.org/wiki/Declarative_programming),
    33  so references to other resources and variables do not depend
    34  on the order they're defined.