wip
This commit is contained in:
parent
5fcfaffb9b
commit
2d2da6fea0
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Backends"
|
||||
sidebar_current: "docs-backends-index"
|
||||
description: |-
|
||||
A "backend" in Terraform determines how state is loaded and how an operation such as `apply` is executed. This abstraction enables non-local file state storage, remote execution, etc.
|
||||
---
|
||||
|
||||
# Backends
|
||||
|
||||
A "backend" in Terraform determines how state is loaded and how an operation
|
||||
such as `apply` is executed. This abstraction enables non-local file state
|
||||
storage, remote execution, etc.
|
||||
|
||||
By default, Terraform uses the "local" backend, which is the normal behavior
|
||||
of Terraform you're used to. This is the backend that was being invoked
|
||||
throughout the [introduction](/intro/index.html).
|
||||
|
||||
Here are some of the benefits of backends:
|
||||
|
||||
* **Working in a team**: Backends can store their state remotely and
|
||||
protect that state with locks to prevent corruption. Some backends
|
||||
such as Terraform Enterprise even automatically store a history of
|
||||
all state revisions.
|
||||
|
||||
* **Keeping sensitive information off disk**: State is retrieved from
|
||||
backends on demand and only stored in memory. If you're using a backend
|
||||
such as Amazon S3, the only location the state ever is persisted is in
|
||||
S3.
|
||||
|
||||
* **Remote operations**: For larger infrastructures or certain changes,
|
||||
`terraform apply` can take a long, long time. Some backends support
|
||||
remote operations which enable the operation to execute remotely. You can
|
||||
then turn off your computer and your operation will still complete. Paired
|
||||
with remote state storage and locking above, this also helps in team
|
||||
environments.
|
||||
|
||||
**Backends are completely optional**. You can successfully use Terraform without
|
||||
ever having to learn or use backends. However, they do solve pain points that
|
||||
afflict teams at a certain scale. If you're an individual, you can likely
|
||||
get away with never using backends.
|
||||
|
||||
Even if you only intend to use the "local" backend, it may be useful to
|
||||
learn about backends since you can also change the behavior of the local
|
||||
backend.
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Backends: Init"
|
||||
sidebar_current: "docs-backends-init"
|
||||
description: |-
|
||||
Terraform must initialize any configured backend before use. This can be done by simply running `terraform init`.
|
||||
---
|
||||
|
||||
# Backend Initialization
|
||||
|
||||
Terraform must initialize any configured backend before use. This can be
|
||||
done by simply running `terraform init`.
|
||||
|
||||
The `terraform init` command should be run by any member of your team on
|
||||
any Terraform configuration as a first step. It is safe to execute multiple
|
||||
times and performs all the setup actions required for a Terraform environment,
|
||||
including initializing the backend.
|
||||
|
||||
The `init` command must be called:
|
||||
|
||||
* On any new environment that configures a backend
|
||||
* On any change of the backend configuration (including type of backend)
|
||||
* On removing backend configuration completely
|
||||
|
||||
You don't need to remember these exact cases. Terraform will detect when
|
||||
initialization is required and error in that situation. Terraform doesn't
|
||||
auto-initialize because it may require additional information from the user,
|
||||
perform state migrations, etc.
|
||||
|
||||
The `init` command will do more than just initialize the backend. Please see
|
||||
the [init documentation](/docs/commands/init.html) for more information.
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "State: Locking"
|
||||
sidebar_current: "docs-state-locking"
|
||||
description: |-
|
||||
Terraform stores state which caches the known state of the world the last time Terraform ran.
|
||||
---
|
||||
|
||||
# State Locking
|
||||
|
||||
TODO
|
|
@ -169,6 +169,10 @@
|
|||
<a href="/docs/state/import.html">Import Existing Resources</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-state-locking") %>>
|
||||
<a href="/docs/state/locking.html">Locking</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-state-remote") %>>
|
||||
<a href="/docs/state/remote/index.html">Remote State</a>
|
||||
</li>
|
||||
|
@ -458,6 +462,27 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current(/^docs-backends/) %>>
|
||||
<a href="/docs/backends/index.html">Backends</a>
|
||||
<ul class="nav">
|
||||
<li<%= sidebar_current("docs-backends-init") %>>
|
||||
<a href="/docs/backends/init.html">Init</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-backends-usage") %>>
|
||||
<a href="/docs/backends/usage.html">Usage</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-backends-sources") %>>
|
||||
<a href="/docs/backends/sources.html">Sources</a>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current("docs-backends-create") %>>
|
||||
<a href="/docs/backends/create.html">Creating backends</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li<%= sidebar_current(/^docs-plugins/) %>>
|
||||
<a href="/docs/plugins/index.html">Plugins</a>
|
||||
<ul class="nav">
|
||||
|
|
Loading…
Reference in New Issue