{"id":15156397,"url":"https://github.com/nimbolus/terraform-backend","last_synced_at":"2025-10-24T14:30:16.563Z","repository":{"id":42482841,"uuid":"472420970","full_name":"nimbolus/terraform-backend","owner":"nimbolus","description":"A state backend server which implements the Terraform HTTP backend API with pluggable modules for authentication, storage, locking and state encryption.","archived":false,"fork":false,"pushed_at":"2024-05-07T18:39:14.000Z","size":226,"stargazers_count":46,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-31T01:41:11.025Z","etag":null,"topics":["hacktoberfest","terraform","terraform-backend","terraform-backends","terraform-http-backend"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nimbolus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-21T16:26:18.000Z","updated_at":"2024-12-10T23:56:38.000Z","dependencies_parsed_at":"2024-05-07T19:37:19.178Z","dependency_job_id":null,"html_url":"https://github.com/nimbolus/terraform-backend","commit_stats":{"total_commits":41,"total_committers":3,"mean_commits":"13.666666666666666","dds":0.3902439024390244,"last_synced_commit":"f0e53f657ca782e3f18ef125fca5ec364a7af052"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimbolus%2Fterraform-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimbolus%2Fterraform-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimbolus%2Fterraform-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimbolus%2Fterraform-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nimbolus","download_url":"https://codeload.github.com/nimbolus/terraform-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237981652,"owners_count":19397101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","terraform","terraform-backend","terraform-backends","terraform-http-backend"],"created_at":"2024-09-26T19:20:52.114Z","updated_at":"2025-10-24T14:30:16.557Z","avatar_url":"https://github.com/nimbolus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Backend Server\n\nA state backend server which implements the Terraform HTTP backend API with plugable modules for authentication, storage, locking and state encryption.\n\n\u003e :warning: **Disclaimer**: This code is in an early development state and not tested extensively for bugs and security issues. If you find some, please raise an issue or merge request.\n\nSupported authentication methods:\n- HTTP basic auth\n- JSON Web Tokens\n\nSupported storage backends:\n- local file system\n- S3\n- Postgres\n\nSupported lock backends:\n- local map\n- Redis\n- Postgres\n\nSupported KMS (encryption) backends:\n- local AES key\n- AES from HashiCorp Vault Key/Value store (v2)\n- HashiCorp Vault Transit engine\n\n## Deployment\n\nRun locally for development:\n```sh\nLOG_LEVEL=debug go run cmd/terraform-backend.go\n```\n\nor use [docker-compose](./docker-compose.yml):\n```sh\ndocker-compose up -d\n```\n\n### Default settings\n\nThe following table describes the default configuration, although the backend server will run with these values, it's not scalable and therefore only for testing purposes. \n\n| Environment Variable | Type   | Default    | Description                                                                                                          |\n|----------------------|--------|------------|----------------------------------------------------------------------------------------------------------------------|\n| LOG_LEVEL            | string | `info`     | Log level (options are: `fatal`, `info`, `warning`, `debug`, `trace`)                                                |\n| LISTEN_ADDR          | string | `:8080`    | Address the HTTP server listens on                                                                                   |\n| TLS_KEY              | string | --         | Path to TLS key file for listening with TLS (fallback to HTTP if not specified)                                      |\n| TLS_CERT             | string | --         | Path to TLS certificate file for listening with TLS (fallback to HTTP if not specified)                              |\n| STORAGE_BACKEND      | string | `fs`       | Module for state file storage (checkout [docs/storage.md](./docs/storage.md) for other options)                      |\n| STORAGE_FS_DIR       | string | `./states` | File system directory for `fs` storage module to store state files                                                   |\n| KMS_BACKEND          | string | `local`    | Module used for encryption (checkout [docs/kms.md](./docs/kms.md) for other options)                                 |\n| KMS_KEY              | string | --         | Key for `local` KMS module. If neither this nor KMS_KEY_FILE is defined, the server will generate a new one and exit |\n| KMS_KEY_FILE         | string | --         | file containing the value for KMS_KEY, will take precedence.                                                         |\n| LOCK_BACKEND         | string | `local`    | Module used for locking the state (checkout [docs/lock.md](./docs/lock.md) for other options)                        |\n| AUTH_BASIC_ENABLED   | bool   | `true`     | HTTP basic auth is enabled by default (checkout [docs/auth.md](./docs/auth.md) for other options)                    |\n| FORCE_UNLOCK_ENABLED | bool   | `true`     | Force-unlock feature enables the native Terraform behavior which unlocks the state even if no lock id was sent       |\n\n## Usage\n\nThe path to the state is: `/state/\u003cproject-id\u003e/\u003cstate-name\u003e`.\n\n**Example Terraform backend configuration**\n```hcl\nterraform {\n  backend \"http\" {\n    address        = \"http://localhost:8080/state/project1/example\"\n    lock_address   = \"http://localhost:8080/state/project1/example\"\n    unlock_address = \"http://localhost:8080/state/project1/example\"\n    username       = \"basic\"\n    password       = \"some-random-secret\"\n  }\n}\n```\n\nFor more information about username and password checkout [docs/auth.md](./docs/auth.md)\n\n## Tests\n\nRun unit tests:\n```sh\ngo test ./...\n```\n\nRun integration tests:\n```sh\ndocker-compose up -d redis postgres minio\ngo test ./... --tags integration -count=1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimbolus%2Fterraform-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnimbolus%2Fterraform-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimbolus%2Fterraform-backend/lists"}