This project is a fully serverless Terraform HTTP Backend created with Cloudflare Workers, KV, Durable Objects, and R2.
Manually create a user by adding a JSON document in the KVNamespace bound to KEYS
. The key is the username and the value is a JSON document describing the user information.
{
"username": "username",
"password": "password",
"projects": ["project-name"]
}
Configure Terraform to use an HTTP backend with the configured username and password. The backend address is the worker hostname with the project name as the path.
terraform {
backend "http" {
address = "https://my-subdomain.workers.dev/project-name"
lock_address = "https://my-subdomain.workers.dev/project-name"
unlock_address = "https://my-subdomain.workers.dev/project-name"
username = "username"
password = "password"
}
}
# Install dependencies
$ yarn install
# Start local development server with live reload
$ yarn dev
# Run tests
$ yarn test
# Run code linting
$ yarn lint
# Update packages
$ yarn update-interactive
- fix tests when Miniflare supports R2
- project scoped permissions