Terraform HTTP backend that uses Github as a storage backend.
Run the container using the following docker-compose snippet:
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:
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"
}
}