Files
pulumi-dokploy/sdk/go/dokploy/destination.go
T
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

372 lines
13 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"
)
// An S3-compatible bucket that Dokploy writes database and volume backups to.
//
// > The secret access key is stored in Terraform state. Use a state backend with encryption at rest.
type Destination struct {
pulumi.CustomResourceState
// S3 access key ID.
AccessKey pulumi.StringOutput `pulumi:"accessKey"`
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags pulumi.StringArrayOutput `pulumi:"additionalFlags"`
// Bucket name.
Bucket pulumi.StringOutput `pulumi:"bucket"`
// Timestamp of when the destination was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// S3 endpoint URL.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// Display name of the destination.
Name pulumi.StringOutput `pulumi:"name"`
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName pulumi.StringPtrOutput `pulumi:"providerName"`
// Bucket region, for example `us-east-1`.
Region pulumi.StringOutput `pulumi:"region"`
// S3 secret access key.
SecretAccessKey pulumi.StringOutput `pulumi:"secretAccessKey"`
// Server this destination is scoped to.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
}
// NewDestination registers a new resource with the given unique name, arguments, and options.
func NewDestination(ctx *pulumi.Context,
name string, args *DestinationArgs, opts ...pulumi.ResourceOption) (*Destination, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccessKey == nil {
return nil, errors.New("invalid value for required argument 'AccessKey'")
}
if args.Bucket == nil {
return nil, errors.New("invalid value for required argument 'Bucket'")
}
if args.Endpoint == nil {
return nil, errors.New("invalid value for required argument 'Endpoint'")
}
if args.Region == nil {
return nil, errors.New("invalid value for required argument 'Region'")
}
if args.SecretAccessKey == nil {
return nil, errors.New("invalid value for required argument 'SecretAccessKey'")
}
if args.SecretAccessKey != nil {
args.SecretAccessKey = pulumi.ToSecret(args.SecretAccessKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"secretAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Destination
err := ctx.RegisterResource("dokploy:index/destination:Destination", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDestination gets an existing Destination 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 GetDestination(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DestinationState, opts ...pulumi.ResourceOption) (*Destination, error) {
var resource Destination
err := ctx.ReadResource("dokploy:index/destination:Destination", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Destination resources.
type destinationState struct {
// S3 access key ID.
AccessKey *string `pulumi:"accessKey"`
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags []string `pulumi:"additionalFlags"`
// Bucket name.
Bucket *string `pulumi:"bucket"`
// Timestamp of when the destination was created.
CreatedAt *string `pulumi:"createdAt"`
// S3 endpoint URL.
Endpoint *string `pulumi:"endpoint"`
// Display name of the destination.
Name *string `pulumi:"name"`
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName *string `pulumi:"providerName"`
// Bucket region, for example `us-east-1`.
Region *string `pulumi:"region"`
// S3 secret access key.
SecretAccessKey *string `pulumi:"secretAccessKey"`
// Server this destination is scoped to.
ServerId *string `pulumi:"serverId"`
}
type DestinationState struct {
// S3 access key ID.
AccessKey pulumi.StringPtrInput
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags pulumi.StringArrayInput
// Bucket name.
Bucket pulumi.StringPtrInput
// Timestamp of when the destination was created.
CreatedAt pulumi.StringPtrInput
// S3 endpoint URL.
Endpoint pulumi.StringPtrInput
// Display name of the destination.
Name pulumi.StringPtrInput
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName pulumi.StringPtrInput
// Bucket region, for example `us-east-1`.
Region pulumi.StringPtrInput
// S3 secret access key.
SecretAccessKey pulumi.StringPtrInput
// Server this destination is scoped to.
ServerId pulumi.StringPtrInput
}
func (DestinationState) ElementType() reflect.Type {
return reflect.TypeOf((*destinationState)(nil)).Elem()
}
type destinationArgs struct {
// S3 access key ID.
AccessKey string `pulumi:"accessKey"`
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags []string `pulumi:"additionalFlags"`
// Bucket name.
Bucket string `pulumi:"bucket"`
// S3 endpoint URL.
Endpoint string `pulumi:"endpoint"`
// Display name of the destination.
Name *string `pulumi:"name"`
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName *string `pulumi:"providerName"`
// Bucket region, for example `us-east-1`.
Region string `pulumi:"region"`
// S3 secret access key.
SecretAccessKey string `pulumi:"secretAccessKey"`
// Server this destination is scoped to.
ServerId *string `pulumi:"serverId"`
}
// The set of arguments for constructing a Destination resource.
type DestinationArgs struct {
// S3 access key ID.
AccessKey pulumi.StringInput
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags pulumi.StringArrayInput
// Bucket name.
Bucket pulumi.StringInput
// S3 endpoint URL.
Endpoint pulumi.StringInput
// Display name of the destination.
Name pulumi.StringPtrInput
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName pulumi.StringPtrInput
// Bucket region, for example `us-east-1`.
Region pulumi.StringInput
// S3 secret access key.
SecretAccessKey pulumi.StringInput
// Server this destination is scoped to.
ServerId pulumi.StringPtrInput
}
func (DestinationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*destinationArgs)(nil)).Elem()
}
type DestinationInput interface {
pulumi.Input
ToDestinationOutput() DestinationOutput
ToDestinationOutputWithContext(ctx context.Context) DestinationOutput
}
func (*Destination) ElementType() reflect.Type {
return reflect.TypeOf((**Destination)(nil)).Elem()
}
func (i *Destination) ToDestinationOutput() DestinationOutput {
return i.ToDestinationOutputWithContext(context.Background())
}
func (i *Destination) ToDestinationOutputWithContext(ctx context.Context) DestinationOutput {
return pulumi.ToOutputWithContext(ctx, i).(DestinationOutput)
}
// DestinationArrayInput is an input type that accepts DestinationArray and DestinationArrayOutput values.
// You can construct a concrete instance of `DestinationArrayInput` via:
//
// DestinationArray{ DestinationArgs{...} }
type DestinationArrayInput interface {
pulumi.Input
ToDestinationArrayOutput() DestinationArrayOutput
ToDestinationArrayOutputWithContext(context.Context) DestinationArrayOutput
}
type DestinationArray []DestinationInput
func (DestinationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Destination)(nil)).Elem()
}
func (i DestinationArray) ToDestinationArrayOutput() DestinationArrayOutput {
return i.ToDestinationArrayOutputWithContext(context.Background())
}
func (i DestinationArray) ToDestinationArrayOutputWithContext(ctx context.Context) DestinationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DestinationArrayOutput)
}
// DestinationMapInput is an input type that accepts DestinationMap and DestinationMapOutput values.
// You can construct a concrete instance of `DestinationMapInput` via:
//
// DestinationMap{ "key": DestinationArgs{...} }
type DestinationMapInput interface {
pulumi.Input
ToDestinationMapOutput() DestinationMapOutput
ToDestinationMapOutputWithContext(context.Context) DestinationMapOutput
}
type DestinationMap map[string]DestinationInput
func (DestinationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Destination)(nil)).Elem()
}
func (i DestinationMap) ToDestinationMapOutput() DestinationMapOutput {
return i.ToDestinationMapOutputWithContext(context.Background())
}
func (i DestinationMap) ToDestinationMapOutputWithContext(ctx context.Context) DestinationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DestinationMapOutput)
}
type DestinationOutput struct{ *pulumi.OutputState }
func (DestinationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Destination)(nil)).Elem()
}
func (o DestinationOutput) ToDestinationOutput() DestinationOutput {
return o
}
func (o DestinationOutput) ToDestinationOutputWithContext(ctx context.Context) DestinationOutput {
return o
}
// S3 access key ID.
func (o DestinationOutput) AccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.AccessKey }).(pulumi.StringOutput)
}
// Extra flags passed to the underlying `rclone` invocation.
func (o DestinationOutput) AdditionalFlags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Destination) pulumi.StringArrayOutput { return v.AdditionalFlags }).(pulumi.StringArrayOutput)
}
// Bucket name.
func (o DestinationOutput) Bucket() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Bucket }).(pulumi.StringOutput)
}
// Timestamp of when the destination was created.
func (o DestinationOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// S3 endpoint URL.
func (o DestinationOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// Display name of the destination.
func (o DestinationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
func (o DestinationOutput) ProviderName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Destination) pulumi.StringPtrOutput { return v.ProviderName }).(pulumi.StringPtrOutput)
}
// Bucket region, for example `us-east-1`.
func (o DestinationOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// S3 secret access key.
func (o DestinationOutput) SecretAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.SecretAccessKey }).(pulumi.StringOutput)
}
// Server this destination is scoped to.
func (o DestinationOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Destination) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
type DestinationArrayOutput struct{ *pulumi.OutputState }
func (DestinationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Destination)(nil)).Elem()
}
func (o DestinationArrayOutput) ToDestinationArrayOutput() DestinationArrayOutput {
return o
}
func (o DestinationArrayOutput) ToDestinationArrayOutputWithContext(ctx context.Context) DestinationArrayOutput {
return o
}
func (o DestinationArrayOutput) Index(i pulumi.IntInput) DestinationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Destination {
return vs[0].([]*Destination)[vs[1].(int)]
}).(DestinationOutput)
}
type DestinationMapOutput struct{ *pulumi.OutputState }
func (DestinationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Destination)(nil)).Elem()
}
func (o DestinationMapOutput) ToDestinationMapOutput() DestinationMapOutput {
return o
}
func (o DestinationMapOutput) ToDestinationMapOutputWithContext(ctx context.Context) DestinationMapOutput {
return o
}
func (o DestinationMapOutput) MapIndex(k pulumi.StringInput) DestinationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Destination {
return vs[0].(map[string]*Destination)[vs[1].(string)]
}).(DestinationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DestinationInput)(nil)).Elem(), &Destination{})
pulumi.RegisterInputType(reflect.TypeOf((*DestinationArrayInput)(nil)).Elem(), DestinationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DestinationMapInput)(nil)).Elem(), DestinationMap{})
pulumi.RegisterOutputType(DestinationOutput{})
pulumi.RegisterOutputType(DestinationArrayOutput{})
pulumi.RegisterOutputType(DestinationMapOutput{})
}