dokploy_postgres (Data Source)
Look up a Dokploy postgres service by id, or by name within an environment. The data source does not expose the database password. It exposes each other credential attribute as sensitive.
Example Usage
data "dokploy_postgres" "example" {
id = "your-postgres-id"
}
# By name, within an environment.
data "dokploy_postgres" "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) Postgres service id. Set this attribute, or set bothenvironment_idandname.name(String) Exact postgres service name. The lookup searches withinenvironment_idand errors when zero or many postgres services match.
Read-Only
app_name(String) Internal Dokploy app name.args(List of String) Arguments for the container command, if any.command(String) Container command override, if any.cpu_limit(String) Hard CPU limit in nano-CPUs, if any.cpu_reservation(String) Reserved CPU in nano-CPUs, if any.created_at(String) Creation timestamp.database_name(String) Database name.database_user(String) Database user.docker_image(String) Docker image.external_port(Number) Exposed host port, if any.memory_limit(String) Hard memory limit in bytes, if any.memory_reservation(String) Reserved memory in bytes, if any.replicas(Number) Number of container replicas.status(String) Service status.