Skip to content

Latest commit

 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ terraform-provider-laravelforge

Manage your entire Laravel Forge estate as code — servers, sites, databases, daemons, SSL & more, reconciled by OpenTofu

Release OpenTofu Registry Terraform Registry Tests License: MIT


resource "laravelforge_site" "app" {
  organization = "your-org"
  server_id    = laravelforge_server.web.id
  type         = "php"
  name         = "app.example.com"
}

That's it. Servers, sites, databases, daemons and SSL declared in HCL and reconciled by OpenTofu — not clicked together in a dashboard.

Important

Pre-1.0 / beta. Built against the new org-scoped Forge JSON:API. Reads are verified against the live API; writes (create/update/delete) are exercised by mock acceptance tests but not yet verified against the live API, and only scalar attributes are mapped — pin an exact version and test before relying on it.

📦 Install & run

terraform {
  required_providers {
    laravelforge = {
      source  = "kirchdev/laravelforge"
      version = "~> 0.1"
    }
  }
}

provider "laravelforge" {
  token = var.forge_token # or set FORGE_TOKEN
}

resource "laravelforge_site" "app" {
  organization = "your-org"
  server_id    = data.laravelforge_server.web.id
  type         = "php"
  name         = "app.example.com"
  php_version  = "php82"
}
export FORGE_TOKEN="forge_xxx"   # Forge → Account → API
tofu plan

✨ Features

  • 🏗️ Forge as code — servers, sites, databases, daemons, scheduled jobs, SSL and more in HCL.
  • 🧩 Full API coverage — ~57 resources + ~83 data sources across essentially every manageable Forge entity.
  • 🚀 OpenTofu & Terraform — published as kirchdev/laravelforge on both registries.
  • 🔐 Simple auth — one Forge token via token or FORGE_TOKEN.
  • ⚡ Modern stackterraform-plugin-framework; docs generated from the schema.

🗺️ Coverage

~57 resources + ~83 data sources covering essentially every manageable Forge entity (pure actions like reboot / restart / deploy-trigger are intentionally excluded).

Full coverage
  • Servers — server, PHP versions & config (cli/fpm/pool/opcache, max upload & execution), network, logs.
  • Sites — site, environment, deployments (script, key, push-to-deploy, history), commands, workers, redirect & security rules, SSL, load balancing, webhooks, and integration toggles (octane, horizon, pulse, reverb, laravel-scheduler, laravel-maintenance, inertia).
  • Services — daemons (background processes), scheduled jobs, firewall rules, databases, database users, database backups, nginx templates, monitors, SSH keys.
  • Organization — teams, roles & permissions, recipes, storage providers, server credentials, VPCs.
  • Data sources — a read for everything above plus providers / regions / sizes, organizations and the current user.

📚 Documentation

Per-resource docs live under docs/, generated from the schema with make docs (build + export schema + tfplugindocs).

🤝 Contributing

PRs welcome. Conventional Commits required (enforced via commitlint). Husky runs the linters/formatters on git commit.

Tip

Run make build && go vet ./... before pushing — CI will catch what husky missed.

See CONTRIBUTING.md for the full workflow.

🛣️ Versioning

Semantic Versioning via release-please — see CHANGELOG.md.

📄 License

MIT © Titus Kirch / IT-Dienstleistungen Titus Kirch

About

OpenTofu / Terraform provider for Laravel Forge.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from TitusKirch/scaffold