dokploy_project (Resource)
A Dokploy project. Dokploy creates a default production environment with every project; service resources reference its id via the environments attribute.
Example Usage
resource "dokploy_project" "example" {
name = "my-project"
description = "Managed by Terraform"
}
output "production_environment_id" {
value = [for e in dokploy_project.example.environments : e.id if e.name == "production"][0]
}
Schema
Required
name(String) Project name.
Optional
description(String) Free-form description.
Read-Only
created_at(String) Creation timestamp (server-side).environments(Attributes List) Environments in this project, including the auto-createdproductionenvironment. (see below for nested schema)id(String) Project id.
Nested Schema for environments
Read-Only:
id(String) Environment id.name(String) Environment name.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import dokploy_project.example <projectId>