Cover what Dokploy v0.30 added
build / build (push) Successful in 3m56s
release / release (push) Successful in 15m2s

Six new resources, all backed by endpoints that did not exist before v0.30.0
and verified end-to-end against a live v0.30.2 instance:

  dokploy_network         Docker networks, now first-class. Services attach
                          through network_ids, which is what deprecates
                          Compose's isolated_deployment upstream.
  dokploy_dns_provider    Cloudflare or Route53, so adding a domain creates
                          its DNS record.
  dokploy_vault_provider  Env values resolved from HashiCorp Vault, Infisical,
                          AWS, Doppler, Azure or Scaleway at deploy time, so
                          the secret never lands in Dokploy or in state.
  dokploy_schedule        Cron jobs in a container, a stack, or on a server.
  dokploy_volume_backup   Scheduled backups of a named volume — the companion
                          to a mount that persists.
  dokploy_libsql          The sixth managed database engine.

libsql.create is the strictest endpoint in the API: eleven keys required to
be present, several only meaningfully null, no generated service name, and it
returns `true` rather than the row. CreateDefaults and ListIDs absorb all
three so the resource behaves like every other database.

Also filled the gaps a field-by-field diff against the live schema turned up:
domain gains `enabled` (the v0.30.0 park-a-domain toggle), compose gains
create_env_file, icon and service_networks, application gains icon and
preview_require_collaborator_permissions, and mounts accept libsql.

DNS and vault credentials are masked by Dokploy on read, so `config` is
tagged noread and keeps the configured value, as the basic-auth password
already does.
This commit is contained in:
max-voitcov
2026-08-26 00:40:27 +03:00
parent 3ddce62647
commit 2d1caf6e73
23 changed files with 1297 additions and 12 deletions
+70
View File
@@ -0,0 +1,70 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dokploy_libsql Resource - dokploy"
subcategory: ""
description: |-
A managed libSQL instance running on Dokploy.
~> Creating this resource provisions the service definition but does not start a deployment. Deploy it from the Dokploy UI or CLI.
~> Credentials are stored in Terraform state. Use a state backend with encryption at rest.
libSQL runs as a sqld server. A primary node owns the data; a replica node follows a primary named by sqld_primary_url.
---
# dokploy_libsql (Resource)
A managed libSQL instance running on Dokploy.
~> Creating this resource provisions the service definition but does **not** start a deployment. Deploy it from the Dokploy UI or CLI.
~> Credentials are stored in Terraform state. Use a state backend with encryption at rest.
libSQL runs as a `sqld` server. A `primary` node owns the data; a `replica` node follows a primary named by `sqld_primary_url`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `database_password` (String, Sensitive) Password for the database user.
- `database_user` (String) Database user to create.
- `docker_image` (String) libSQL server image to run, for example `ghcr.io/tursodatabase/libsql-server:latest`.
- `environment_id` (String) Environment this database belongs to.
- `name` (String) Display name of the database.
### Optional
- `app_name` (String) Unique Docker service name. Generated from `name` when omitted, because Dokploy's libSQL endpoint does not generate one. Changing it forces a new database.
- `command` (String) Override the container entrypoint command.
- `cpu_limit` (String) Hard CPU limit, for example `1`.
- `cpu_reservation` (String) Soft CPU reservation, for example `0.5`.
- `description` (String) Free-form description.
- `detach_dokploy_network` (Boolean) Detach the service from the shared `dokploy-network`.
- `enable_namespaces` (Boolean) Serve multiple logical databases from one instance through libSQL namespaces.
- `endpoint_spec_swarm` (String) Docker Swarm endpoint specification, as a JSON object.
- `env` (String) Environment variables in `KEY=value` format, one per line.
- `external_admin_port` (Number) Host port exposing the admin API.
- `external_grpc_port` (Number) Host port exposing the gRPC replication endpoint.
- `external_port` (Number) Host port exposing the HTTP API.
- `health_check_swarm` (String) Docker Swarm health check configuration, as a JSON object.
- `labels_swarm` (String) Docker Swarm service labels, as a JSON object.
- `memory_limit` (String) Hard memory limit, for example `512m`.
- `memory_reservation` (String) Soft memory reservation, for example `256m`.
- `mode_swarm` (String) Docker Swarm service mode, as a JSON object.
- `network_ids` (List of String) IDs of additional Docker networks to attach.
- `network_swarm` (String) Docker Swarm network attachments, as a JSON array.
- `placement_swarm` (String) Docker Swarm placement constraints, as a JSON object.
- `replicas` (Number) Number of replicas to run.
- `restart_policy_swarm` (String) Docker Swarm restart policy, as a JSON object.
- `rollback_config_swarm` (String) Docker Swarm rollback configuration, as a JSON object.
- `server_id` (String) Remote server to deploy on. Omit to use the Dokploy host itself.
- `sqld_node` (String) Role this node plays in a libSQL cluster. Valid values: `primary`, `replica`. Defaults to `primary`.
- `sqld_primary_url` (String) URL of the primary node, when `sqld_node` is `replica`.
- `stop_grace_period_swarm` (Number) Grace period in nanoseconds before a container is killed.
- `update_config_swarm` (String) Docker Swarm rolling update configuration, as a JSON object.
### Read-Only
- `application_status` (String) Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
- `created_at` (String) RFC 3339 timestamp of when the database was created.
- `id` (String) Unique libSQL identifier.