|
1 | 1 | # Welcome |
2 | 2 |
|
3 | | -This project provides an HTTP backend for [Terraform](https://www.terraform.io), and [OpenTofu](https://opentofu.org/), to save the state data in a [MongoDB](https://www.mongodb.com/) database. |
| 3 | +A simple, standards-compliant HTTP backend for [Terraform](https://www.terraform.io) (and [Terraform](https://www.terraform.io)) that stores state files in MongoDB. |
4 | 4 |
|
5 | | -As the state is a JSON content, it just makes sense to use the best-in-class technology to store it! |
| 5 | +!!! tip |
| 6 | + |
| 7 | + Instead of relying on vendor-specific storage or local files, this backend lets you use MongoDB - a mature, horizontally scalable document database - as the storage layer for your Terraform state. |
| 8 | + |
| 9 | + Since Terraform state is already JSON, MongoDB is a natural and efficient fit. |
6 | 10 |
|
7 | 11 | ## Key features |
8 | 12 |
|
9 | | -1. Highly available, performant, no vendor lock-in, storage system |
10 | | -2. Secured access to sensitive information, with tenant isolation |
11 | | -3. Integrate real data in your infrastructure management system |
| 13 | +- **Full Terraform HTTP backend compliance** - works out-of-the-box with terraform `{ backend "http" }` (and OpenTofu) |
| 14 | +- **Leverages MongoDB strengths** - high availability, replication, sharding, and strong performance for JSON documents |
| 15 | +- **No vendor lock-in** - you control your MongoDB cluster (self-hosted, Atlas, Cosmos DB, etc.) |
| 16 | +- **Fine-grained access control** - per-workspace (tenant) isolation |
| 17 | +- **State file encryption at rest** - optional server-side encryption using MongoDB's native encrypted storage engine or client-side encryption |
| 18 | +- **Locking support implemented** - Terraform checks and prevents concurrent modifications |
| 19 | +- **Minimal dependencies** - simple open-source code, shipped in an image using SUSE BCI for security and performance |
| 20 | +- **Audit trail** - all state operations logged with workspace, user/agent, and timestamp |
12 | 21 |
|
13 | | -## High-level view |
| 22 | +## When to use this backend |
14 | 23 |
|
15 | | - |
| 24 | +- You already run MongoDB in your organization |
| 25 | +- You want a highly available, globally distributed state store without adding another vendor |
| 26 | +- You need strong RBAC and encryption controls that MongoDB already provides |
| 27 | +- You prefer running one binary in Kubernetes or as a Docker container instead of managing S3 |
| 28 | +- You want to use the valuable Terraform state information in your infrastructure management system |
| 29 | +- You want to simplify the infrastructure automation with a single, highly available source of truth |
0 commit comments