# dokploy_mongo (Data Source)

Look up a Dokploy mongo service by id, or by name within an environment. The database password is intentionally not exposed; any other Sensitive credential attribute is exposed but marked Sensitive.

## Example Usage

```terraform
data "dokploy_mongo" "example" {
  id = "your-mongo-id"
}

# By name, within an environment.
data "dokploy_mongo" "by_name" {
  environment_id = data.dokploy_environment.production.id
  name           = "db"
}
```

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

### Optional

- `environment_id` (String) Id of the environment to search. Required with `name`.
- `id` (String) MongoDB service id. Set either this or both `environment_id` and `name`.
- `name` (String) Exact mongo service name, searched within `environment_id`. Errors when zero or multiple mongo services match.

### Read-Only

- `app_name` (String) Dokploy-internal app name.
- `created_at` (String) Creation timestamp.
- `database_user` (String) Database user.
- `docker_image` (String) Docker image.
- `external_port` (Number) Exposed host port, if any.
- `status` (String) Service status.