skip to content
wihan.dev
view as markdown
browse the dokploy docs

dokploy_mariadb (Data Source)

Look up a Dokploy mariadb 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

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

Optional

  • environment_id (String) Id of the environment to search. Required with name.
  • id (String) MariaDB service id. Set this attribute, or set both environment_id and name.
  • name (String) Exact mariadb service name. The lookup searches within environment_id and errors when zero or many mariadb 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_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.
  • 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.