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
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
Optional
environment_id(String) Id of the environment to search. Required withname.id(String) MongoDB service id. Set either this or bothenvironment_idandname.name(String) Exact mongo service name, searched withinenvironment_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.