# dokploy_mount (Data Source)

Looks up a volume, bind or file mount of a service that already exists in Dokploy:

```terraform
data "dokploy_mount" "data" {
  service_id   = data.dokploy_application.web.id
  service_type = "application"
  mount_path   = "/data"
}
```

~> Dokploy does not enforce uniqueness for this record. If two mount records match the lookup attributes, this data source fails instead of a guess. Look the record up by `id` in that case.

## Example Usage

```terraform
data "dokploy_mount" "example" {
  id = "your-mount-id"
}

# Look a mount up by the service and the path in the container.
data "dokploy_mount" "data" {
  service_id   = data.dokploy_application.web.id
  service_type = "application"
  mount_path   = "/data"
}
```

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

### Optional

- `host_path` (String) Path on the host of a bind mount. A lookup can use it as a filter.
- `id` (String) Mount id. Set it for a lookup by id, or leave it unset and set `service_id` with the distinguishing attributes.
- `mount_path` (String) Path inside the container. A lookup can use it as a filter.
- `service_id` (String) Id of the service that owns the mount. Set it with `service_type` and `mount_path` or `host_path`.
- `service_type` (String) Type of the service: `application`, `compose`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis` or `libsql`.

### Read-Only

- `content` (String) Content of a file mount, or null.
- `file_path` (String) Path of a file mount, or null.
- `type` (String) Mount type: `bind`, `volume` or `file`.
- `volume_name` (String) Volume name of a volume mount, or null.