Cover what Dokploy v0.30 added
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:
@@ -1,6 +1,7 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes"
|
||||
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
@@ -19,6 +20,13 @@ type composeModel struct {
|
||||
SourceType types.String `tfsdk:"source_type" dokploy:"sourceType"`
|
||||
Command types.String `tfsdk:"command" dokploy:"command"`
|
||||
Env types.String `tfsdk:"env" dokploy:"env,nullable"`
|
||||
Icon types.String `tfsdk:"icon" dokploy:"icon,nullable"`
|
||||
|
||||
CreateEnvFile types.Bool `tfsdk:"create_env_file" dokploy:"createEnvFile"`
|
||||
|
||||
// serviceNetworks maps a service name in the stack to the networks it
|
||||
// joins, so a stack can attach per-service rather than as a whole.
|
||||
ServiceNetworks jsontypes.Normalized `tfsdk:"service_networks" dokploy:"serviceNetworks,nullable"`
|
||||
|
||||
Repository types.String `tfsdk:"repository" dokploy:"repository,nullable"`
|
||||
Owner types.String `tfsdk:"owner" dokploy:"owner,nullable"`
|
||||
@@ -97,6 +105,11 @@ func composeResource() ResourceSpec {
|
||||
"source_type": enumString("Where the Compose file comes from.", composeSources, false),
|
||||
"command": optionalComputedString("Custom `docker compose` command to run."),
|
||||
"env": optionalString("Environment variables in `KEY=value` format, one per line."),
|
||||
"icon": optionalString("Icon shown next to the stack in the Dokploy UI."),
|
||||
"create_env_file": optionalComputedBool("Write the environment variables to a `.env` file next to " +
|
||||
"the Compose file."),
|
||||
"service_networks": optionalJSON("Per-service Docker network attachments, as a JSON object mapping " +
|
||||
"each service name in the stack to an array of network IDs."),
|
||||
|
||||
"repository": optionalString("GitHub repository name."),
|
||||
"owner": optionalString("GitHub repository owner."),
|
||||
|
||||
Reference in New Issue
Block a user