Skip to content

Commit 3436a6e

Browse files
committed
chore: Update documentation fixes
1 parent 87e8f0f commit 3436a6e

File tree

2 files changed

+38
-17
lines changed

2 files changed

+38
-17
lines changed

released/terraform-be/README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# Backend as S3
2-
3-
The Terraform S3 [backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) allows you to store the Terraform state files in an Amazon S3 bucket, providing a centralized, reliable, and durable storage solution.
4-
5-
## Example Configuration
6-
7-
```terraform
8-
terraform {
9-
backend "s3" {
10-
bucket = "<Name of your S3 bucket>"
11-
key = "terraform/state"
12-
region = "<Region>"
13-
encrypt = true
14-
acl = "bucket-owner-full-control"
15-
}
16-
}
17-
```
1+
# Terraform Remote Backend Configuration
2+
3+
In Terraform, a *backend* determines where the state data files are stored. This state data is crucial for tracking the resources managed by Terraform. There are different configuration options to define these backends. They are described in the [Terraform documentation](https://developer.hashicorp.com/terraform/language/settings/backends/configuration).
4+
5+
The default configuration is the [local backend](https://developer.hashicorp.com/terraform/language/settings/backends/local) namely the local file system. However, this is not recommended for productive usage due to the lack of options to collaborate and securely store the state. Hence, it is common to use a remote backend.
6+
7+
## Available Backends
8+
9+
In general, Terraform supports a lot of generic and vendor-specific backends out of the box. You find an overview of the available backends in the [Terraform documentation](https://developer.hashicorp.com/terraform/language/settings#configuring-a-terraform-backend).
10+
11+
These built-in backends serve different purposes, from acting as remote disks for state files to supporting state locking, which helps prevent conflicts and ensures consistency during operations. It is important to note that you cannot load additional backends as plugins; only the listed built-in backends are available.
12+
13+
In the following section we will walk through different configurations.
14+
15+
### Local Backend
16+
17+
As mentioned the default backend stores state as a local file on disk. It is suitable for single-user environments e.g. when developing new configurations. You find more details in the [Terraform documentation](https://developer.hashicorp.com/terraform/language/settings/backends/local).
18+
19+
### Kubernetes Backend
20+
21+
The [Kubernetes backend](https://developer.hashicorp.com/terraform/language/settings/backends/kubernetes) stores state in a Kubernetes secret and supports state locking using a Lease resource. It allows for secure and collaborative state management in Kubernetes environments. You find a sample technical setup in the directory [k8sasbackend](./k8sasbackend/README.md)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Backend as S3
2+
3+
The Terraform S3 [backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) allows you to store the Terraform state files in an Amazon S3 bucket, providing a centralized, reliable, and durable storage solution.
4+
5+
## Example Configuration
6+
7+
```terraform
8+
terraform {
9+
backend "s3" {
10+
bucket = "<Name of your S3 bucket>"
11+
key = "terraform/state"
12+
region = "<Region>"
13+
encrypt = true
14+
acl = "bucket-owner-full-control"
15+
}
16+
}
17+
```

0 commit comments

Comments
 (0)