Skip to main content
This article is based on the README.md, docs, examples, and CHANGELOG of laravel/terraform-provider-laravel. It reflects v1.5.1 (released November 25, 2026). The provider is currently in beta and may change between releases.

What is the Terraform provider?

laravel/terraform-provider-laravel is a Terraform provider for managing Laravel Cloud infrastructure. You can describe configurations that you previously set up by hand in the dashboard or with the Laravel Cloud CLI as code, then review the changes with terraform plan and apply them with terraform apply. With this provider, you can keep application and environment definitions together with databases, caches, storage buckets, WebSocket servers, domains, and scheduled commands in a single configuration.

Requirements

  • Terraform 1.0 or later
  • Go 1.25 or later (only needed to build the provider from source)

Installation

Add the provider to required_providers and run terraform init.

Authentication

The API token is resolved in this order:
  1. The token argument in the provider block
  2. The LARAVEL_CLOUD_API_TOKEN environment variable
  3. The token saved by cloud auth (~/.config/cloud/config.json)
If none of these are set, a local terraform plan works without exporting anything as long as you are logged in with the Laravel Cloud CLI. If you are logged in to more than one organization, the provider asks you to set the token because it cannot tell which organization you want to manage.
If you write the token directly in the provider block, it leaks when you commit the configuration file. Pass it through an environment variable or a secrets manager instead.

Main resources

Resources fall into these groups. Data sources are available for reading existing values. For example, laravel_cloud_regions, laravel_cloud_instance_sizes, and laravel_cloud_database_presets let you look up valid values before you write resources.

Minimal example

This minimal configuration defines an application and a production environment. Change php_version and node_version to match your environment.
php_version is sent as 8.4:1, and the API reports the major version as php_major_version. You can check it in an output value.

Handling API limits

The Laravel Cloud API applies rate limits per organization. The provider adjusts request spacing with these two values, so a large apply is less likely to fail.
  • max_requests_per_minute: the upper limit on API requests the provider sends. The default is 100. Laravel Cloud allows 120 requests per minute per organization, shared across tokens and runs.
  • max_create_requests_per_minute: the upper limit on create requests for applications, environments, instances, databases, buckets, caches, and similar resources. The default is 25.
If several Terraform runs use the same organization at the same time, lower these values so their combined requests stay under the limit. Setting a value to 0 turns off the provider-side limit.

Development and testing

The repository provides these tasks.
Acceptance tests run against the live Laravel Cloud API, so you need a test organization and a token.

Notes

  • v1.0.0 was released on September 18, 2026, and the current version is v1.5.1. Releases are frequent, and resources and data sources have been added within the v1.x series.
  • You can check the official change history in CHANGELOG.md. Because the provider is in beta, always review the terraform plan output before applying to production.
  • When you move existing Laravel Cloud resources from manual setup to Terraform, you can bring them in with terraform import. This makes it easier to check the differences.
Last modified on November 25, 2026