github.com/loicalbertin/terraform@v0.6.15-0.20170626182346-8e2583055467/website/docs/configuration/load.html.md (about)

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