# dokploy_organization (Data Source)

Looks up an organization. With neither `id` nor `name` set, it returns the API key's active organization: the one that every resource of this provider lands in.

```terraform
data "dokploy_organization" "current" {}

output "organization_id" {
  value = data.dokploy_organization.current.id
}
```

~> Dokploy does not enforce name uniqueness. If two organizations share a name, this data source fails instead of a guess. Look the record up by `id` in that case.

## Example Usage

```terraform
# The active organization: the one that every resource of this provider
# lands in.
data "dokploy_organization" "current" {}

output "organization_id" {
  value = data.dokploy_organization.current.id
}

# Or look up another organization of the same owner, by name or by id.
data "dokploy_organization" "staging" {
  name = "Acme Staging"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `id` (String) Organization id. Set it for a lookup by id, set `name` for a lookup by name, or set neither for the active organization.
- `name` (String) Display name. Do not set it together with `id`.

### Read-Only

- `created_at` (String) Creation timestamp from the server.
- `default_role` (String) Role that a new member gets, or null for the Dokploy default.
- `logo` (String) URL of the logo image, or null.
- `owner_id` (String) User id of the owner.
- `slug` (String) URL slug that Dokploy generates.