{"id":17204134,"url":"https://github.com/akshaymankar/terraform-http-backend-pass","last_synced_at":"2026-05-04T02:38:18.323Z","repository":{"id":56880124,"uuid":"343124931","full_name":"akshaymankar/terraform-http-backend-pass","owner":"akshaymankar","description":"Mirror of https://git.coop/akshay/terraform-http-backend-pass","archived":false,"fork":false,"pushed_at":"2023-05-29T19:38:26.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-04T08:40:58.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akshaymankar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-28T14:28:29.000Z","updated_at":"2023-05-29T19:17:21.000Z","dependencies_parsed_at":"2022-08-20T23:40:27.590Z","dependency_job_id":null,"html_url":"https://github.com/akshaymankar/terraform-http-backend-pass","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymankar%2Fterraform-http-backend-pass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymankar%2Fterraform-http-backend-pass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymankar%2Fterraform-http-backend-pass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymankar%2Fterraform-http-backend-pass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akshaymankar","download_url":"https://codeload.github.com/akshaymankar/terraform-http-backend-pass/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245437171,"owners_count":20615227,"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":[],"created_at":"2024-10-15T02:20:44.491Z","updated_at":"2026-05-04T02:38:13.294Z","avatar_url":"https://github.com/akshaymankar.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform HTTP Backend Pass\n\n**Catchy name! What does it do?**\n\nAccording to [terraform\ndocs](https://www.terraform.io/docs/language/settings/backends/index.html):\n\n\u003e Each Terraform configuration can specify a backend, which defines where and\n\u003e how operations are performed, where state snapshots are stored, etc.\n\nThere are a few backends which terraform provides, none of which are very\ncustomizable. The [http\nbackend](https://www.terraform.io/docs/language/settings/backends/http.html),\nhowever, provides a way to define where (and how) state snapshots are stored. It\nadditionally allows for a locking the state while some operation is being\nperfomed.\n\nThis project aims to provide a backend to store the terraform state in a git\nrepository. As the state can contain sensitive information, it should be\nencrypted before storing, for which [`pass`](https://www.passwordstore.org/) is\nused.\n\n## How to use\n\n1. Install the backend in one of these ways:\n   - Using [Stack](https://docs.haskellstack.org/en/stable/README/):\n     ```bash\n     stack install terraform-http-backend-pass\n     ```\n   - Using [Cabal](https://www.haskell.org/cabal/):\n     ```bash\n     cabal install terraform-http-backend-pass\n     ```\n   - Using [nix](https://nixos.org/):\n     ```bash\n     nix registry add terraform-http-backend-pass git+https://git.coop/akshay/terraform-http-backend-pass\n     nix build 'terraform-http-backend-pass#' --profile $HOME/.nix-profile\n     ```\n2. Create a pass repository:\n   ```bash\n   export PASSWORD_STORE_DIR=/desired/path/to/store\n   pass init \u003cgpg-keys\u003e\n   pass git init\n   ```\n3. Push the repository somewhere, set push upstream:\n   ```bash\n   export PASSWORD_STORE_DIR=/desired/path/to/store\n   pass git remote add origin \u003cremote-url\u003e\n   pass git push -u origin master\n   ```\n4. Start the backend:\n   ```bash\n   terraform-http-backend-pass --repositoryPath /desired/path/to/store --port 8888 \n   ```\n5. Setup terraform with backend information:\n   ```tf\n   terraform {\n     backend \"http\" {\n       # Or, something else if the server is not running on localhost\n       address = \"http://localhost:8888\"\n     }\n   }\n   ```\n   The address can also be specified dynamically using the `-backend-config`\n   option while running `terraform init`\n6. Use terraform as usual:\n   ```bash\n   terraform init\n   terraform apply\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaymankar%2Fterraform-http-backend-pass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakshaymankar%2Fterraform-http-backend-pass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaymankar%2Fterraform-http-backend-pass/lists"}