Bridge what Dokploy v0.30 added, and let the docs through
build / build (push) Failing after 11m22s
release / plugin (push) Failing after 31m35s
release / sdks (push) Has been skipped

Six new resources from terraform-provider-dokploy v0.2.0 -- Network,
DnsProvider, VaultProvider, Schedule, VolumeBackup and Libsql -- plus the new
properties on Domain (`enabled`), Compose (`serviceNetworks`, `createEnvFile`,
`icon`) and Application. Verified with `pulumi up` against a live v0.30.2
instance: create, preview-clean, and destroy.

The upstream provider also now refuses a volume Mount with no `volumeName`,
which Dokploy would otherwise turn into an anonymous Docker volume recreated
on every deploy. That surfaces here at preview time, before anything exists.

Two things made that fix nearly invisible to Pulumi users, so this commit
fixes the second one: the bridge resolves the upstream `docs/` through the Go
module cache, where a locally `replace`d dependency never lands, so tfgen was
emitting every resource with no description at all. UpstreamRepoPath now
points at the checkout and all 445 inputs carry documentation -- with names
rendered per language, so Python readers see `volume_name` where TypeScript
readers see `volumeName`.
This commit is contained in:
max-voitcov
2026-08-26 00:46:32 +03:00
parent ad3e908c98
commit 73386ba0ff
137 changed files with 19660 additions and 5183 deletions
@@ -37,6 +37,9 @@
}
}
},
"dokploy_dns_provider": {
"current": "dokploy:index/dnsProvider:DnsProvider"
},
"dokploy_domain": {
"current": "dokploy:index/domain:Domain",
"fields": {
@@ -48,6 +51,14 @@
"dokploy_environment": {
"current": "dokploy:index/environment:Environment"
},
"dokploy_libsql": {
"current": "dokploy:index/libsql:Libsql",
"fields": {
"network_ids": {
"maxItemsOne": false
}
}
},
"dokploy_mariadb": {
"current": "dokploy:index/mariaDb:MariaDb",
"fields": {
@@ -84,6 +95,9 @@
}
}
},
"dokploy_network": {
"current": "dokploy:index/network:Network"
},
"dokploy_port": {
"current": "dokploy:index/port:Port"
},
@@ -118,11 +132,20 @@
"dokploy_registry": {
"current": "dokploy:index/registry:Registry"
},
"dokploy_schedule": {
"current": "dokploy:index/schedule:Schedule"
},
"dokploy_security": {
"current": "dokploy:index/security:Security"
},
"dokploy_ssh_key": {
"current": "dokploy:index/sshKey:SshKey"
},
"dokploy_vault_provider": {
"current": "dokploy:index/vaultProvider:VaultProvider"
},
"dokploy_volume_backup": {
"current": "dokploy:index/volumeBackup:VolumeBackup"
}
},
"datasources": {
File diff suppressed because it is too large Load Diff
+34
View File
@@ -7,6 +7,7 @@ package dokploy
import (
_ "embed"
"os"
pfbridge "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
@@ -67,6 +68,16 @@ func Provider(version string) tfbridge.ProviderInfo {
TFProviderVersion: version,
MetadataInfo: tfbridge.NewProviderMetadata(bridgeMetadata),
// Where tfgen reads the upstream `docs/` from when generating schema
// descriptions. Without it the bridge looks in the Go module cache,
// finds nothing for a `replace`d local dependency, and every resource
// reaches Pulumi users undocumented -- including the warnings that
// matter, such as a volume mount needing a name to persist anything.
//
// Only read at tfgen time, and the result is baked into the
// checked-in schema.json, so a consumer never needs this path.
UpstreamRepoPath: upstreamRepoPath(),
// The upstream provider is plugin-framework based, so opt in to the
// bridge's accurate preview and raw state handling.
EnableAccurateBridgePreview: true,
@@ -99,6 +110,7 @@ func Provider(version string) tfbridge.ProviderInfo {
"dokploy_mariadb": res("MariaDb"),
"dokploy_mongo": res("Mongo"),
"dokploy_redis": res("Redis"),
"dokploy_libsql": res("Libsql"),
// Networking and service attachments.
"dokploy_domain": res("Domain"),
@@ -112,6 +124,18 @@ func Provider(version string) tfbridge.ProviderInfo {
"dokploy_ssh_key": res("SshKey"),
"dokploy_certificate": res("Certificate"),
"dokploy_destination": res("Destination"),
// Docker networks, added in Dokploy v0.30.0. Services attach to
// them through `networkIds`.
"dokploy_network": res("Network"),
// Scheduling, added in Dokploy v0.30.0.
"dokploy_schedule": res("Schedule"),
"dokploy_volume_backup": res("VolumeBackup"),
// External integrations, added in Dokploy v0.30.0.
"dokploy_dns_provider": res("DnsProvider"),
"dokploy_vault_provider": res("VaultProvider"),
},
DataSources: map[string]*tfbridge.DataSourceInfo{
@@ -156,6 +180,16 @@ func Provider(version string) tfbridge.ProviderInfo {
return prov
}
// upstreamRepoPath locates the terraform-provider-dokploy checkout that
// `go.mod` replaces in. It is overridable so a CI job that lays the two repos
// out differently can still generate documented schemas.
func upstreamRepoPath() string {
if override := os.Getenv("DOKPLOY_TF_PROVIDER_PATH"); override != "" {
return override
}
return "../dokploy-teraform"
}
// pythonInfo exists because PyProject is an anonymous struct field and cannot
// be set inside a composite literal.
func pythonInfo() *tfbridge.PythonInfo {