https://github.com/andreygubarev/terraform-backend-github
Terraform HTTP Backend with GitHub
https://github.com/andreygubarev/terraform-backend-github
terraform terraform-backend
Last synced: 9 months ago
JSON representation
Terraform HTTP Backend with GitHub
- Host: GitHub
- URL: https://github.com/andreygubarev/terraform-backend-github
- Owner: andreygubarev
- License: mit
- Created: 2023-10-16T17:58:56.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-16T08:43:51.000Z (almost 2 years ago)
- Last Synced: 2025-02-12T20:19:38.665Z (10 months ago)
- Topics: terraform, terraform-backend
- Language: Go
- Homepage: https://github.com/andreygubarev/terraform-backend-github
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform HTTP Backend backed by GitHub
Terraform HTTP backend that uses Github as a storage backend.
# Usage
Run the container using the following docker-compose snippet:
```yaml
version: '3'
services:
terraform-backend-github:
image: ghcr.io/andreygubarev/terraform-backend-github:latest
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN}
ports:
- 8080:8080
restart: unless-stopped
```
Configure the Terraform HTTP backend in your Terraform configuration:
```hcl
terraform {
backend "http" {
address = "http://localhost:8080/andreygubarev/terraform-backend/state/terraform.tfstate"
lock_address = "http://localhost:8080/andreygubarev/terraform-backend/state/terraform.tfstate.lock"
unlock_address = "http://localhost:8080/andreygubarev/terraform-backend/state/terraform.tfstate.lock"
}
}
```
# Motivation
# Reference
- https://github.com/andreygubarev/terraform-backend-github
- https://developer.hashicorp.com/terraform/language/settings/backends/http
- https://github.com/plumber-cd/terraform-backend-git/