website: start config docs

This commit is contained in:
Mitchell Hashimoto 2014-07-24 15:14:39 -07:00
parent 9d75352fd3
commit 8dbaf598f4
3 changed files with 104 additions and 40 deletions

View File

@ -0,0 +1,23 @@
---
layout: "docs"
page_title: "Configuration"
sidebar_current: "docs-config"
---
# Configuration
Terraform uses text files to describe infrastructure and to set variables.
These text files are called Terraform _configurations_ and end in
`.tf`. This section talks about the format of these files as well as
how they're loaded.
The format of the configuration files are able to be in two formats:
Terraform format and JSON. The Terraform format is more human-readable,
supports comments, and is the generally recommended format for most
Terraform files. The JSON format is meant for machines to create,
modify, and update, but can also be done by Terraform operators if
you prefer. Terraform format ends in `.tf` and JSON format ends in
`.tf.json`.
Click a sub-section in the navigation to the left to learn more about
Terraform configuration.

View File

@ -0,0 +1,30 @@
---
layout: "docs"
page_title: "Load Order and Semantics"
sidebar_current: "docs-config-load"
---
# Load Order and Semantics
When invoking any command that loads the Terraform configuration,
Terraform loads all configuration files within the directory
specified in alphabetical order. The flies loaded must end in
either `.tf` or `.tf.json` to specify the format that is in use.
Otherwise, the files are ignored.
[Override](/docs/configuration/override.html)
files are the exception, as they're loaded after all non-override
files, in alphabetical order.
The configuration within the loaded files are appended to each
other. This is in contrast to being merged. This means that two
resources with the same name are not merged, and will instead
cause a validation error. This is in contrast to
[overrides](/docs/configuration/override.html),
which do merge.
The order of variables, resources, etc. defined within the
configuration doesn't matter. Terraform configurations are
[declarative](http://en.wikipedia.org/wiki/Declarative_programming),
so references to other resources and variables do not depend
on the order they're defined.

View File

@ -9,6 +9,17 @@
<li<%= sidebar_current("docs-config") %>>
<a href="/docs/configuration/index.html">Configuration</a>
<ul class="nav">
<li<%= sidebar_current("docs-config-load") %>>
<a href="/docs/configuration/load.html">Load Order and Semantics</a>
</li>
<li<%= sidebar_current("docs-config-syntax") %>>
<a href="/docs/configuration/syntax.html">Configuration Syntax</a>
</li>
<li<%= sidebar_current("docs-config-override") %>>
<a href="/docs/configuration/override.html">Overrides</a>
</li>
</ul>
</li>