# dokploy_mariadb (Data Source)

Look up a Dokploy mariadb 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_mariadb" "example" {
  id = "your-mariadb-id"
}

# By name, within an environment.
data "dokploy_mariadb" "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) MariaDB service id. Set either this or both `environment_id` and `name`.
- `name` (String) Exact mariadb service name, searched within `environment_id`. Errors when zero or multiple mariadb services match.

### Read-Only

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