Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ Using this flow is less secure since the token is long-lived. You can provide th

## Backend configuration

To keep track of your terraform state, you can configure an [S3 backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) using [STACKIT Object Storage](https://docs.stackit.cloud/products/storage/object-storage).
### S3 Backend

> [!WARNING]
> As of now setting `use_lockfile=true` for the S3 Backend will have no effect when using STACKIT Object Storage S3 buckets.
> If you want to make use of Terraforms state locking feature refer to the PostgreSQL backend described below.

To keep track of your Terraform state, you can configure an [S3 backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) using [STACKIT Object Storage](https://docs.stackit.cloud/products/storage/object-storage).

To do so, you need an Object Storage [S3 bucket](https://docs.stackit.cloud/products/storage/object-storage/basics/concepts/#buckets) and [credentials](https://docs.stackit.cloud/products/storage/object-storage/basics/concepts/#credentials) to access it. If you need to create them, check [Create and delete Object Storage buckets](https://docs.stackit.cloud/products/storage/object-storage/how-tos/create-and-manage-object-storage-buckets/) and [Create and delete Object Storage credentials](https://docs.stackit.cloud/products/storage/object-storage/how-tos/create-and-delete-object-storage-credentials/).

Expand All @@ -149,6 +155,10 @@ terraform {

Note: AWS specific checks must be skipped as they do not work on STACKIT. For details on what those validations do, see [here](https://developer.hashicorp.com/terraform/language/settings/backends/s3#configuration).

### PostgreSQL Backend

See this [example](https://professional-service.git.onstackit.cloud/professional-service-best-practices/professional-service/src/branch/main/examples/terraform-pg-backend-state-locking) how to use a STACKIT PostgreSQL instance for your Terraform state with state locking.

## Opting into Beta Resources

To use beta resources in the STACKIT Terraform provider, follow these steps:
Expand Down
14 changes: 11 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,17 @@ To configure the key flow, follow these steps:

# Backend configuration

To keep track of your terraform state, you can configure an [S3 backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) using [STACKIT Object Storage](https://docs.stackit.cloud/products/storage/object-storage).
## S3 Backend

~> As of now setting `use_lockfile=true` for the S3 Backend will have no effect when using STACKIT Object Storage S3 buckets. If you want to make use of Terraforms state locking feature refer to the PostgreSQL backend described below.

To keep track of your Terraform state, you can configure an [S3 backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) using [STACKIT Object Storage](https://docs.stackit.cloud/products/storage/object-storage).

To do so, you need an Object Storage [S3 bucket](https://docs.stackit.cloud/products/storage/object-storage/basics/concepts/#buckets) and [credentials](https://docs.stackit.cloud/products/storage/object-storage/basics/concepts/#credentials) to access it. If you need to create them, check [Create and delete Object Storage buckets](https://docs.stackit.cloud/products/storage/object-storage/how-tos/create-and-manage-object-storage-buckets/) and [Create and delete Object Storage credentials](https://docs.stackit.cloud/products/storage/object-storage/how-tos/create-and-delete-object-storage-credentials/).

Once you have everything setup, you can configure the backend by adding the following block to your terraform configuration:
Once you have everything setup, you can configure the backend by adding the following block to your Terraform configuration:

```
```hcl
terraform {
backend "s3" {
bucket = "BUCKET_NAME"
Expand All @@ -158,6 +162,10 @@ terraform {
```

Note: AWS specific checks must be skipped as they do not work on STACKIT. For details on what those validations do, see [here](https://developer.hashicorp.com/terraform/language/settings/backends/s3#configuration).

## PostgreSQL Backend

See this [example](https://professional-service.git.onstackit.cloud/professional-service-best-practices/professional-service/src/branch/main/examples/terraform-pg-backend-state-locking) how to use a STACKIT PostgreSQL instance for your Terraform state with state locking.
<!-- schema generated by tfplugindocs -->
## Schema

Expand Down
14 changes: 11 additions & 3 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,17 @@ To configure the key flow, follow these steps:

# Backend configuration

To keep track of your terraform state, you can configure an [S3 backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) using [STACKIT Object Storage](https://docs.stackit.cloud/products/storage/object-storage).
## S3 Backend

~> As of now setting `use_lockfile=true` for the S3 Backend will have no effect when using STACKIT Object Storage S3 buckets. If you want to make use of Terraforms state locking feature refer to the PostgreSQL backend described below.

To keep track of your Terraform state, you can configure an [S3 backend](https://developer.hashicorp.com/terraform/language/settings/backends/s3) using [STACKIT Object Storage](https://docs.stackit.cloud/products/storage/object-storage).

To do so, you need an Object Storage [S3 bucket](https://docs.stackit.cloud/products/storage/object-storage/basics/concepts/#buckets) and [credentials](https://docs.stackit.cloud/products/storage/object-storage/basics/concepts/#credentials) to access it. If you need to create them, check [Create and delete Object Storage buckets](https://docs.stackit.cloud/products/storage/object-storage/how-tos/create-and-manage-object-storage-buckets/) and [Create and delete Object Storage credentials](https://docs.stackit.cloud/products/storage/object-storage/how-tos/create-and-delete-object-storage-credentials/).

Once you have everything setup, you can configure the backend by adding the following block to your terraform configuration:
Once you have everything setup, you can configure the backend by adding the following block to your Terraform configuration:

```
```hcl
terraform {
backend "s3" {
bucket = "BUCKET_NAME"
Expand All @@ -122,4 +126,8 @@ terraform {
```

Note: AWS specific checks must be skipped as they do not work on STACKIT. For details on what those validations do, see [here](https://developer.hashicorp.com/terraform/language/settings/backends/s3#configuration).

## PostgreSQL Backend

See this [example](https://professional-service.git.onstackit.cloud/professional-service-best-practices/professional-service/src/branch/main/examples/terraform-pg-backend-state-locking) how to use a STACKIT PostgreSQL instance for your Terraform state with state locking.
{{ .SchemaMarkdown | trimspace }}
Loading