Files
max-voitcov 73386ba0ff
build / build (push) Failing after 11m22s
release / plugin (push) Failing after 31m35s
release / sdks (push) Has been skipped
Bridge what Dokploy v0.30 added, and let the docs through
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`.
2026-08-26 00:46:32 +03:00

363 lines
14 KiB
TypeScript
Generated

// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
/**
* A scheduled backup of a Docker volume to a configured `dokploy.Destination`.
*
* This is the counterpart to a `dokploy.Mount` with `type = "volume"`: the mount gives the volume a stable name, and this resource copies its contents off the host on a schedule.
*
* Set exactly one of the `*_id` attributes to say which service owns the volume.
*/
export class VolumeBackup extends pulumi.CustomResource {
/**
* Get an existing VolumeBackup resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VolumeBackupState, opts?: pulumi.CustomResourceOptions): VolumeBackup {
return new VolumeBackup(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/volumeBackup:VolumeBackup';
/**
* Returns true if the given object is an instance of VolumeBackup. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is VolumeBackup {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === VolumeBackup.__pulumiType;
}
/**
* Docker service name that owns the volume. Derived by Dokploy when omitted.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Application that owns the volume.
*/
declare public readonly applicationId: pulumi.Output<string | undefined>;
/**
* Compose stack that owns the volume.
*/
declare public readonly composeId: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the backup job was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Standard five-field cron expression, for example `0 4 * * *`.
*/
declare public readonly cronExpression: pulumi.Output<string>;
/**
* Backup destination (S3-compatible bucket) to upload to.
*/
declare public readonly destinationId: pulumi.Output<string>;
/**
* Whether the backup schedule is active.
*/
declare public readonly enabled: pulumi.Output<boolean>;
/**
* Number of backups to retain. Older ones are pruned.
*/
declare public readonly keepLatestCount: pulumi.Output<number>;
/**
* libSQL instance that owns the volume.
*/
declare public readonly libsqlId: pulumi.Output<string | undefined>;
/**
* MariaDB instance that owns the volume.
*/
declare public readonly mariadbId: pulumi.Output<string | undefined>;
/**
* MongoDB instance that owns the volume.
*/
declare public readonly mongoId: pulumi.Output<string | undefined>;
/**
* MySQL instance that owns the volume.
*/
declare public readonly mysqlId: pulumi.Output<string | undefined>;
/**
* Display name of the backup job.
*/
declare public readonly name: pulumi.Output<string>;
/**
* PostgreSQL instance that owns the volume.
*/
declare public readonly postgresId: pulumi.Output<string | undefined>;
/**
* Path prefix inside the destination bucket, for example `backups/shop/`.
*/
declare public readonly prefix: pulumi.Output<string>;
/**
* Redis instance that owns the volume.
*/
declare public readonly redisId: pulumi.Output<string | undefined>;
/**
* Service inside a Compose stack that owns the volume.
*/
declare public readonly serviceName: pulumi.Output<string | undefined>;
/**
* The kind of service that owns the volume. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`, `libsql`. Defaults to `application`.
*/
declare public readonly serviceType: pulumi.Output<string>;
/**
* Stop the service while the backup runs. Slower, but guarantees a consistent copy of data that is being written to.
*/
declare public readonly turnOff: pulumi.Output<boolean>;
/**
* Name of the Docker volume to back up.
*/
declare public readonly volumeName: pulumi.Output<string>;
/**
* Create a VolumeBackup resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VolumeBackupArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: VolumeBackupArgs | VolumeBackupState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as VolumeBackupState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["composeId"] = state?.composeId;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["cronExpression"] = state?.cronExpression;
resourceInputs["destinationId"] = state?.destinationId;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["keepLatestCount"] = state?.keepLatestCount;
resourceInputs["libsqlId"] = state?.libsqlId;
resourceInputs["mariadbId"] = state?.mariadbId;
resourceInputs["mongoId"] = state?.mongoId;
resourceInputs["mysqlId"] = state?.mysqlId;
resourceInputs["name"] = state?.name;
resourceInputs["postgresId"] = state?.postgresId;
resourceInputs["prefix"] = state?.prefix;
resourceInputs["redisId"] = state?.redisId;
resourceInputs["serviceName"] = state?.serviceName;
resourceInputs["serviceType"] = state?.serviceType;
resourceInputs["turnOff"] = state?.turnOff;
resourceInputs["volumeName"] = state?.volumeName;
} else {
const args = argsOrState as VolumeBackupArgs | undefined;
if (args?.cronExpression === undefined && !opts.urn) {
throw new Error("Missing required property 'cronExpression'");
}
if (args?.destinationId === undefined && !opts.urn) {
throw new Error("Missing required property 'destinationId'");
}
if (args?.prefix === undefined && !opts.urn) {
throw new Error("Missing required property 'prefix'");
}
if (args?.volumeName === undefined && !opts.urn) {
throw new Error("Missing required property 'volumeName'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["composeId"] = args?.composeId;
resourceInputs["cronExpression"] = args?.cronExpression;
resourceInputs["destinationId"] = args?.destinationId;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["keepLatestCount"] = args?.keepLatestCount;
resourceInputs["libsqlId"] = args?.libsqlId;
resourceInputs["mariadbId"] = args?.mariadbId;
resourceInputs["mongoId"] = args?.mongoId;
resourceInputs["mysqlId"] = args?.mysqlId;
resourceInputs["name"] = args?.name;
resourceInputs["postgresId"] = args?.postgresId;
resourceInputs["prefix"] = args?.prefix;
resourceInputs["redisId"] = args?.redisId;
resourceInputs["serviceName"] = args?.serviceName;
resourceInputs["serviceType"] = args?.serviceType;
resourceInputs["turnOff"] = args?.turnOff;
resourceInputs["volumeName"] = args?.volumeName;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VolumeBackup.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering VolumeBackup resources.
*/
export interface VolumeBackupState {
/**
* Docker service name that owns the volume. Derived by Dokploy when omitted.
*/
appName?: pulumi.Input<string | undefined>;
/**
* Application that owns the volume.
*/
applicationId?: pulumi.Input<string | undefined>;
/**
* Compose stack that owns the volume.
*/
composeId?: pulumi.Input<string | undefined>;
/**
* RFC 3339 timestamp of when the backup job was created.
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* Standard five-field cron expression, for example `0 4 * * *`.
*/
cronExpression?: pulumi.Input<string | undefined>;
/**
* Backup destination (S3-compatible bucket) to upload to.
*/
destinationId?: pulumi.Input<string | undefined>;
/**
* Whether the backup schedule is active.
*/
enabled?: pulumi.Input<boolean | undefined>;
/**
* Number of backups to retain. Older ones are pruned.
*/
keepLatestCount?: pulumi.Input<number | undefined>;
/**
* libSQL instance that owns the volume.
*/
libsqlId?: pulumi.Input<string | undefined>;
/**
* MariaDB instance that owns the volume.
*/
mariadbId?: pulumi.Input<string | undefined>;
/**
* MongoDB instance that owns the volume.
*/
mongoId?: pulumi.Input<string | undefined>;
/**
* MySQL instance that owns the volume.
*/
mysqlId?: pulumi.Input<string | undefined>;
/**
* Display name of the backup job.
*/
name?: pulumi.Input<string | undefined>;
/**
* PostgreSQL instance that owns the volume.
*/
postgresId?: pulumi.Input<string | undefined>;
/**
* Path prefix inside the destination bucket, for example `backups/shop/`.
*/
prefix?: pulumi.Input<string | undefined>;
/**
* Redis instance that owns the volume.
*/
redisId?: pulumi.Input<string | undefined>;
/**
* Service inside a Compose stack that owns the volume.
*/
serviceName?: pulumi.Input<string | undefined>;
/**
* The kind of service that owns the volume. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`, `libsql`. Defaults to `application`.
*/
serviceType?: pulumi.Input<string | undefined>;
/**
* Stop the service while the backup runs. Slower, but guarantees a consistent copy of data that is being written to.
*/
turnOff?: pulumi.Input<boolean | undefined>;
/**
* Name of the Docker volume to back up.
*/
volumeName?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a VolumeBackup resource.
*/
export interface VolumeBackupArgs {
/**
* Docker service name that owns the volume. Derived by Dokploy when omitted.
*/
appName?: pulumi.Input<string | undefined>;
/**
* Application that owns the volume.
*/
applicationId?: pulumi.Input<string | undefined>;
/**
* Compose stack that owns the volume.
*/
composeId?: pulumi.Input<string | undefined>;
/**
* Standard five-field cron expression, for example `0 4 * * *`.
*/
cronExpression: pulumi.Input<string>;
/**
* Backup destination (S3-compatible bucket) to upload to.
*/
destinationId: pulumi.Input<string>;
/**
* Whether the backup schedule is active.
*/
enabled?: pulumi.Input<boolean | undefined>;
/**
* Number of backups to retain. Older ones are pruned.
*/
keepLatestCount?: pulumi.Input<number | undefined>;
/**
* libSQL instance that owns the volume.
*/
libsqlId?: pulumi.Input<string | undefined>;
/**
* MariaDB instance that owns the volume.
*/
mariadbId?: pulumi.Input<string | undefined>;
/**
* MongoDB instance that owns the volume.
*/
mongoId?: pulumi.Input<string | undefined>;
/**
* MySQL instance that owns the volume.
*/
mysqlId?: pulumi.Input<string | undefined>;
/**
* Display name of the backup job.
*/
name?: pulumi.Input<string | undefined>;
/**
* PostgreSQL instance that owns the volume.
*/
postgresId?: pulumi.Input<string | undefined>;
/**
* Path prefix inside the destination bucket, for example `backups/shop/`.
*/
prefix: pulumi.Input<string>;
/**
* Redis instance that owns the volume.
*/
redisId?: pulumi.Input<string | undefined>;
/**
* Service inside a Compose stack that owns the volume.
*/
serviceName?: pulumi.Input<string | undefined>;
/**
* The kind of service that owns the volume. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`, `libsql`. Defaults to `application`.
*/
serviceType?: pulumi.Input<string | undefined>;
/**
* Stop the service while the backup runs. Slower, but guarantees a consistent copy of data that is being written to.
*/
turnOff?: pulumi.Input<boolean | undefined>;
/**
* Name of the Docker volume to back up.
*/
volumeName: pulumi.Input<string>;
}