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

438 lines
17 KiB
Go
Generated

// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dokploy
import (
"context"
"reflect"
"errors"
"github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// 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.
type Schedule struct {
pulumi.CustomResourceState
// Docker service name the schedule targets. Derived by Dokploy when omitted.
AppName pulumi.StringOutput `pulumi:"appName"`
// Application this schedule belongs to.
ApplicationId pulumi.StringPtrOutput `pulumi:"applicationId"`
// Command to run.
Command pulumi.StringOutput `pulumi:"command"`
// Compose stack this schedule belongs to.
ComposeId pulumi.StringPtrOutput `pulumi:"composeId"`
// RFC 3339 timestamp of when the schedule was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Standard five-field cron expression, for example `0 3 * * *`.
CronExpression pulumi.StringOutput `pulumi:"cronExpression"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Whether the schedule is active.
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// Display name of the schedule.
Name pulumi.StringOutput `pulumi:"name"`
// Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
ScheduleType pulumi.StringOutput `pulumi:"scheduleType"`
// Multi-line script to run instead of a single command.
Script pulumi.StringPtrOutput `pulumi:"script"`
// Server this schedule runs on.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Service inside a Compose stack to run the command in.
ServiceName pulumi.StringPtrOutput `pulumi:"serviceName"`
// Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
ShellType pulumi.StringOutput `pulumi:"shellType"`
// IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
Timezone pulumi.StringPtrOutput `pulumi:"timezone"`
}
// NewSchedule registers a new resource with the given unique name, arguments, and options.
func NewSchedule(ctx *pulumi.Context,
name string, args *ScheduleArgs, opts ...pulumi.ResourceOption) (*Schedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Command == nil {
return nil, errors.New("invalid value for required argument 'Command'")
}
if args.CronExpression == nil {
return nil, errors.New("invalid value for required argument 'CronExpression'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Schedule
err := ctx.RegisterResource("dokploy:index/schedule:Schedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSchedule gets an existing Schedule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScheduleState, opts ...pulumi.ResourceOption) (*Schedule, error) {
var resource Schedule
err := ctx.ReadResource("dokploy:index/schedule:Schedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Schedule resources.
type scheduleState struct {
// Docker service name the schedule targets. Derived by Dokploy when omitted.
AppName *string `pulumi:"appName"`
// Application this schedule belongs to.
ApplicationId *string `pulumi:"applicationId"`
// Command to run.
Command *string `pulumi:"command"`
// Compose stack this schedule belongs to.
ComposeId *string `pulumi:"composeId"`
// RFC 3339 timestamp of when the schedule was created.
CreatedAt *string `pulumi:"createdAt"`
// Standard five-field cron expression, for example `0 3 * * *`.
CronExpression *string `pulumi:"cronExpression"`
// Free-form description.
Description *string `pulumi:"description"`
// Whether the schedule is active.
Enabled *bool `pulumi:"enabled"`
// Display name of the schedule.
Name *string `pulumi:"name"`
// Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
ScheduleType *string `pulumi:"scheduleType"`
// Multi-line script to run instead of a single command.
Script *string `pulumi:"script"`
// Server this schedule runs on.
ServerId *string `pulumi:"serverId"`
// Service inside a Compose stack to run the command in.
ServiceName *string `pulumi:"serviceName"`
// Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
ShellType *string `pulumi:"shellType"`
// IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
Timezone *string `pulumi:"timezone"`
}
type ScheduleState struct {
// Docker service name the schedule targets. Derived by Dokploy when omitted.
AppName pulumi.StringPtrInput
// Application this schedule belongs to.
ApplicationId pulumi.StringPtrInput
// Command to run.
Command pulumi.StringPtrInput
// Compose stack this schedule belongs to.
ComposeId pulumi.StringPtrInput
// RFC 3339 timestamp of when the schedule was created.
CreatedAt pulumi.StringPtrInput
// Standard five-field cron expression, for example `0 3 * * *`.
CronExpression pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Whether the schedule is active.
Enabled pulumi.BoolPtrInput
// Display name of the schedule.
Name pulumi.StringPtrInput
// Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
ScheduleType pulumi.StringPtrInput
// Multi-line script to run instead of a single command.
Script pulumi.StringPtrInput
// Server this schedule runs on.
ServerId pulumi.StringPtrInput
// Service inside a Compose stack to run the command in.
ServiceName pulumi.StringPtrInput
// Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
ShellType pulumi.StringPtrInput
// IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
Timezone pulumi.StringPtrInput
}
func (ScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleState)(nil)).Elem()
}
type scheduleArgs struct {
// Docker service name the schedule targets. Derived by Dokploy when omitted.
AppName *string `pulumi:"appName"`
// Application this schedule belongs to.
ApplicationId *string `pulumi:"applicationId"`
// Command to run.
Command string `pulumi:"command"`
// Compose stack this schedule belongs to.
ComposeId *string `pulumi:"composeId"`
// Standard five-field cron expression, for example `0 3 * * *`.
CronExpression string `pulumi:"cronExpression"`
// Free-form description.
Description *string `pulumi:"description"`
// Whether the schedule is active.
Enabled *bool `pulumi:"enabled"`
// Display name of the schedule.
Name *string `pulumi:"name"`
// Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
ScheduleType *string `pulumi:"scheduleType"`
// Multi-line script to run instead of a single command.
Script *string `pulumi:"script"`
// Server this schedule runs on.
ServerId *string `pulumi:"serverId"`
// Service inside a Compose stack to run the command in.
ServiceName *string `pulumi:"serviceName"`
// Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
ShellType *string `pulumi:"shellType"`
// IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
Timezone *string `pulumi:"timezone"`
}
// The set of arguments for constructing a Schedule resource.
type ScheduleArgs struct {
// Docker service name the schedule targets. Derived by Dokploy when omitted.
AppName pulumi.StringPtrInput
// Application this schedule belongs to.
ApplicationId pulumi.StringPtrInput
// Command to run.
Command pulumi.StringInput
// Compose stack this schedule belongs to.
ComposeId pulumi.StringPtrInput
// Standard five-field cron expression, for example `0 3 * * *`.
CronExpression pulumi.StringInput
// Free-form description.
Description pulumi.StringPtrInput
// Whether the schedule is active.
Enabled pulumi.BoolPtrInput
// Display name of the schedule.
Name pulumi.StringPtrInput
// Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
ScheduleType pulumi.StringPtrInput
// Multi-line script to run instead of a single command.
Script pulumi.StringPtrInput
// Server this schedule runs on.
ServerId pulumi.StringPtrInput
// Service inside a Compose stack to run the command in.
ServiceName pulumi.StringPtrInput
// Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
ShellType pulumi.StringPtrInput
// IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
Timezone pulumi.StringPtrInput
}
func (ScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleArgs)(nil)).Elem()
}
type ScheduleInput interface {
pulumi.Input
ToScheduleOutput() ScheduleOutput
ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput
}
func (*Schedule) ElementType() reflect.Type {
return reflect.TypeOf((**Schedule)(nil)).Elem()
}
func (i *Schedule) ToScheduleOutput() ScheduleOutput {
return i.ToScheduleOutputWithContext(context.Background())
}
func (i *Schedule) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleOutput)
}
// ScheduleArrayInput is an input type that accepts ScheduleArray and ScheduleArrayOutput values.
// You can construct a concrete instance of `ScheduleArrayInput` via:
//
// ScheduleArray{ ScheduleArgs{...} }
type ScheduleArrayInput interface {
pulumi.Input
ToScheduleArrayOutput() ScheduleArrayOutput
ToScheduleArrayOutputWithContext(context.Context) ScheduleArrayOutput
}
type ScheduleArray []ScheduleInput
func (ScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Schedule)(nil)).Elem()
}
func (i ScheduleArray) ToScheduleArrayOutput() ScheduleArrayOutput {
return i.ToScheduleArrayOutputWithContext(context.Background())
}
func (i ScheduleArray) ToScheduleArrayOutputWithContext(ctx context.Context) ScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleArrayOutput)
}
// ScheduleMapInput is an input type that accepts ScheduleMap and ScheduleMapOutput values.
// You can construct a concrete instance of `ScheduleMapInput` via:
//
// ScheduleMap{ "key": ScheduleArgs{...} }
type ScheduleMapInput interface {
pulumi.Input
ToScheduleMapOutput() ScheduleMapOutput
ToScheduleMapOutputWithContext(context.Context) ScheduleMapOutput
}
type ScheduleMap map[string]ScheduleInput
func (ScheduleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Schedule)(nil)).Elem()
}
func (i ScheduleMap) ToScheduleMapOutput() ScheduleMapOutput {
return i.ToScheduleMapOutputWithContext(context.Background())
}
func (i ScheduleMap) ToScheduleMapOutputWithContext(ctx context.Context) ScheduleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleMapOutput)
}
type ScheduleOutput struct{ *pulumi.OutputState }
func (ScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Schedule)(nil)).Elem()
}
func (o ScheduleOutput) ToScheduleOutput() ScheduleOutput {
return o
}
func (o ScheduleOutput) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput {
return o
}
// Docker service name the schedule targets. Derived by Dokploy when omitted.
func (o ScheduleOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Application this schedule belongs to.
func (o ScheduleOutput) ApplicationId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.ApplicationId }).(pulumi.StringPtrOutput)
}
// Command to run.
func (o ScheduleOutput) Command() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.Command }).(pulumi.StringOutput)
}
// Compose stack this schedule belongs to.
func (o ScheduleOutput) ComposeId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.ComposeId }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the schedule was created.
func (o ScheduleOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Standard five-field cron expression, for example `0 3 * * *`.
func (o ScheduleOutput) CronExpression() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.CronExpression }).(pulumi.StringOutput)
}
// Free-form description.
func (o ScheduleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Whether the schedule is active.
func (o ScheduleOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *Schedule) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// Display name of the schedule.
func (o ScheduleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Where the command runs. Valid values: `application`, `compose`, `server`, `dokploy-server`. Defaults to `application`.
func (o ScheduleOutput) ScheduleType() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.ScheduleType }).(pulumi.StringOutput)
}
// Multi-line script to run instead of a single command.
func (o ScheduleOutput) Script() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.Script }).(pulumi.StringPtrOutput)
}
// Server this schedule runs on.
func (o ScheduleOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Service inside a Compose stack to run the command in.
func (o ScheduleOutput) ServiceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.ServiceName }).(pulumi.StringPtrOutput)
}
// Shell used to interpret the command. Valid values: `bash`, `sh`. Defaults to `bash`.
func (o ScheduleOutput) ShellType() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.ShellType }).(pulumi.StringOutput)
}
// IANA timezone the cron expression is evaluated in, for example `Europe/Berlin`.
func (o ScheduleOutput) Timezone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.Timezone }).(pulumi.StringPtrOutput)
}
type ScheduleArrayOutput struct{ *pulumi.OutputState }
func (ScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Schedule)(nil)).Elem()
}
func (o ScheduleArrayOutput) ToScheduleArrayOutput() ScheduleArrayOutput {
return o
}
func (o ScheduleArrayOutput) ToScheduleArrayOutputWithContext(ctx context.Context) ScheduleArrayOutput {
return o
}
func (o ScheduleArrayOutput) Index(i pulumi.IntInput) ScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Schedule {
return vs[0].([]*Schedule)[vs[1].(int)]
}).(ScheduleOutput)
}
type ScheduleMapOutput struct{ *pulumi.OutputState }
func (ScheduleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Schedule)(nil)).Elem()
}
func (o ScheduleMapOutput) ToScheduleMapOutput() ScheduleMapOutput {
return o
}
func (o ScheduleMapOutput) ToScheduleMapOutputWithContext(ctx context.Context) ScheduleMapOutput {
return o
}
func (o ScheduleMapOutput) MapIndex(k pulumi.StringInput) ScheduleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Schedule {
return vs[0].(map[string]*Schedule)[vs[1].(string)]
}).(ScheduleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleInput)(nil)).Elem(), &Schedule{})
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleArrayInput)(nil)).Elem(), ScheduleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleMapInput)(nil)).Elem(), ScheduleMap{})
pulumi.RegisterOutputType(ScheduleOutput{})
pulumi.RegisterOutputType(ScheduleArrayOutput{})
pulumi.RegisterOutputType(ScheduleMapOutput{})
}