# 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

```terraform
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 generated by tfplugindocs -->
## 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-created `production` environment. (see [below for nested schema](#nestedatt--environments))
- `id` (String) Project id.

<a id="nestedatt--environments"></a>
### 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](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
terraform import dokploy_project.example <projectId>
```