Managed Terraform state using the http
backend, backed by
Cloudflare Workers. Oh, and it supports locking 🔒.
terraform {
backend "http" {
address = "https://apigw.eragon.xyz/tfstate/states/your-project-name"
lock_address = "https://apigw.eragon.xyz/tfstate/states/your-project-name/lock"
lock_method = "PUT" # also supports default "LOCK"
unlock_address = "https://apigw.eragon.xyz/tfstate/states/your-project-name/lock"
unlock_method = "DELETE" # also supports default "UNLOCK"
username = "<CF_ACCESS_CLIENT_ID.access>"
password = "<CF_ACCESS_CLIENT_SECRET>"
}
}
Got yourself in a tfstatetastrophy? The following commands may help.
NOTE: These can be destructive, so be careful!
# Get current lock info
curl https://apigw.eragon.xyz/tfstate/states/your-project-name/lock
# Manually remove the lock (similar to `terraform force-unlock`)
curl -X DELETE https://apigw.eragon.xyz/tfstate/states/your-project-name/lock
Double check you are using UPPER case values for lock_method
and unlock_method
.