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

292 lines
11 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 cron job Dokploy runs on a schedule.
*
* `scheduleType` selects where the command runs:
*
* * `application` — inside a running application container; set `applicationId`.
* * `compose` — inside one service of a Compose stack; set `composeId` and `serviceName`.
* * `server` — on a remote server; set `serverId`.
* * `dokploy-server` — on the Dokploy host itself.
*
* > A schedule targeting an application runs inside its container, so the container has to be running when the cron fires.
*/
export class Schedule extends pulumi.CustomResource {
/**
* Get an existing Schedule 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?: ScheduleState, opts?: pulumi.CustomResourceOptions): Schedule {
return new Schedule(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/schedule:Schedule';
/**
* Returns true if the given object is an instance of Schedule. 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 Schedule {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Schedule.__pulumiType;
}
/**
* Docker service name the schedule targets. Derived by Dokploy when omitted.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Application this schedule belongs to.
*/
declare public readonly applicationId: pulumi.Output<string | undefined>;
/**
* Command to run.
*/
declare public readonly command: pulumi.Output<string>;
/**
* Compose stack this schedule belongs to.
*/
declare public readonly composeId: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the schedule was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Standard five-field cron expression, for example `0 3 * * *`.
*/
declare public readonly cronExpression: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Whether the schedule is active.
*/
declare public readonly enabled: pulumi.Output<boolean>;
/**
* Display name of the schedule.
*/
declare public readonly name: pulumi.Output<string>;
/**
* Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
*/
declare public readonly scheduleType: pulumi.Output<string>;
/**
* Multi-line script to run instead of a single command.
*/
declare public readonly script: pulumi.Output<string | undefined>;
/**
* Server this schedule runs on.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Service inside a Compose stack to run the command in.
*/
declare public readonly serviceName: pulumi.Output<string | undefined>;
/**
* Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
*/
declare public readonly shellType: pulumi.Output<string>;
/**
* IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
*/
declare public readonly timezone: pulumi.Output<string | undefined>;
/**
* Create a Schedule 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: ScheduleArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: ScheduleArgs | ScheduleState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as ScheduleState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["command"] = state?.command;
resourceInputs["composeId"] = state?.composeId;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["cronExpression"] = state?.cronExpression;
resourceInputs["description"] = state?.description;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["name"] = state?.name;
resourceInputs["scheduleType"] = state?.scheduleType;
resourceInputs["script"] = state?.script;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["serviceName"] = state?.serviceName;
resourceInputs["shellType"] = state?.shellType;
resourceInputs["timezone"] = state?.timezone;
} else {
const args = argsOrState as ScheduleArgs | undefined;
if (args?.command === undefined && !opts.urn) {
throw new Error("Missing required property 'command'");
}
if (args?.cronExpression === undefined && !opts.urn) {
throw new Error("Missing required property 'cronExpression'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["command"] = args?.command;
resourceInputs["composeId"] = args?.composeId;
resourceInputs["cronExpression"] = args?.cronExpression;
resourceInputs["description"] = args?.description;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["name"] = args?.name;
resourceInputs["scheduleType"] = args?.scheduleType;
resourceInputs["script"] = args?.script;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["serviceName"] = args?.serviceName;
resourceInputs["shellType"] = args?.shellType;
resourceInputs["timezone"] = args?.timezone;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Schedule.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Schedule resources.
*/
export interface ScheduleState {
/**
* Docker service name the schedule targets. Derived by Dokploy when omitted.
*/
appName?: pulumi.Input<string | undefined>;
/**
* Application this schedule belongs to.
*/
applicationId?: pulumi.Input<string | undefined>;
/**
* Command to run.
*/
command?: pulumi.Input<string | undefined>;
/**
* Compose stack this schedule belongs to.
*/
composeId?: pulumi.Input<string | undefined>;
/**
* RFC 3339 timestamp of when the schedule was created.
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* Standard five-field cron expression, for example `0 3 * * *`.
*/
cronExpression?: pulumi.Input<string | undefined>;
/**
* Free-form description.
*/
description?: pulumi.Input<string | undefined>;
/**
* Whether the schedule is active.
*/
enabled?: pulumi.Input<boolean | undefined>;
/**
* Display name of the schedule.
*/
name?: pulumi.Input<string | undefined>;
/**
* Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
*/
scheduleType?: pulumi.Input<string | undefined>;
/**
* Multi-line script to run instead of a single command.
*/
script?: pulumi.Input<string | undefined>;
/**
* Server this schedule runs on.
*/
serverId?: pulumi.Input<string | undefined>;
/**
* Service inside a Compose stack to run the command in.
*/
serviceName?: pulumi.Input<string | undefined>;
/**
* Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
*/
shellType?: pulumi.Input<string | undefined>;
/**
* IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
*/
timezone?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Schedule resource.
*/
export interface ScheduleArgs {
/**
* Docker service name the schedule targets. Derived by Dokploy when omitted.
*/
appName?: pulumi.Input<string | undefined>;
/**
* Application this schedule belongs to.
*/
applicationId?: pulumi.Input<string | undefined>;
/**
* Command to run.
*/
command: pulumi.Input<string>;
/**
* Compose stack this schedule belongs to.
*/
composeId?: pulumi.Input<string | undefined>;
/**
* Standard five-field cron expression, for example `0 3 * * *`.
*/
cronExpression: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string | undefined>;
/**
* Whether the schedule is active.
*/
enabled?: pulumi.Input<boolean | undefined>;
/**
* Display name of the schedule.
*/
name?: pulumi.Input<string | undefined>;
/**
* Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
*/
scheduleType?: pulumi.Input<string | undefined>;
/**
* Multi-line script to run instead of a single command.
*/
script?: pulumi.Input<string | undefined>;
/**
* Server this schedule runs on.
*/
serverId?: pulumi.Input<string | undefined>;
/**
* Service inside a Compose stack to run the command in.
*/
serviceName?: pulumi.Input<string | undefined>;
/**
* Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
*/
shellType?: pulumi.Input<string | undefined>;
/**
* IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
*/
timezone?: pulumi.Input<string | undefined>;
}