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`.
289 lines
9.3 KiB
Go
Generated
289 lines
9.3 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 published port that exposes an application directly on the host, bypassing Traefik.
|
|
type Port struct {
|
|
pulumi.CustomResourceState
|
|
|
|
// Application this port belongs to.
|
|
ApplicationId pulumi.StringOutput `pulumi:"applicationId"`
|
|
// Transport protocol. Valid values: `tcp`, `udp`.
|
|
Protocol pulumi.StringOutput `pulumi:"protocol"`
|
|
// Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
|
|
PublishMode pulumi.StringOutput `pulumi:"publishMode"`
|
|
// Port exposed on the host.
|
|
PublishedPort pulumi.IntOutput `pulumi:"publishedPort"`
|
|
// Port the container listens on.
|
|
TargetPort pulumi.IntOutput `pulumi:"targetPort"`
|
|
}
|
|
|
|
// NewPort registers a new resource with the given unique name, arguments, and options.
|
|
func NewPort(ctx *pulumi.Context,
|
|
name string, args *PortArgs, opts ...pulumi.ResourceOption) (*Port, error) {
|
|
if args == nil {
|
|
return nil, errors.New("missing one or more required arguments")
|
|
}
|
|
|
|
if args.ApplicationId == nil {
|
|
return nil, errors.New("invalid value for required argument 'ApplicationId'")
|
|
}
|
|
if args.Protocol == nil {
|
|
return nil, errors.New("invalid value for required argument 'Protocol'")
|
|
}
|
|
if args.PublishedPort == nil {
|
|
return nil, errors.New("invalid value for required argument 'PublishedPort'")
|
|
}
|
|
if args.TargetPort == nil {
|
|
return nil, errors.New("invalid value for required argument 'TargetPort'")
|
|
}
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource Port
|
|
err := ctx.RegisterResource("dokploy:index/port:Port", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetPort gets an existing Port 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 GetPort(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *PortState, opts ...pulumi.ResourceOption) (*Port, error) {
|
|
var resource Port
|
|
err := ctx.ReadResource("dokploy:index/port:Port", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering Port resources.
|
|
type portState struct {
|
|
// Application this port belongs to.
|
|
ApplicationId *string `pulumi:"applicationId"`
|
|
// Transport protocol. Valid values: `tcp`, `udp`.
|
|
Protocol *string `pulumi:"protocol"`
|
|
// Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
|
|
PublishMode *string `pulumi:"publishMode"`
|
|
// Port exposed on the host.
|
|
PublishedPort *int `pulumi:"publishedPort"`
|
|
// Port the container listens on.
|
|
TargetPort *int `pulumi:"targetPort"`
|
|
}
|
|
|
|
type PortState struct {
|
|
// Application this port belongs to.
|
|
ApplicationId pulumi.StringPtrInput
|
|
// Transport protocol. Valid values: `tcp`, `udp`.
|
|
Protocol pulumi.StringPtrInput
|
|
// Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
|
|
PublishMode pulumi.StringPtrInput
|
|
// Port exposed on the host.
|
|
PublishedPort pulumi.IntPtrInput
|
|
// Port the container listens on.
|
|
TargetPort pulumi.IntPtrInput
|
|
}
|
|
|
|
func (PortState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*portState)(nil)).Elem()
|
|
}
|
|
|
|
type portArgs struct {
|
|
// Application this port belongs to.
|
|
ApplicationId string `pulumi:"applicationId"`
|
|
// Transport protocol. Valid values: `tcp`, `udp`.
|
|
Protocol string `pulumi:"protocol"`
|
|
// Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
|
|
PublishMode *string `pulumi:"publishMode"`
|
|
// Port exposed on the host.
|
|
PublishedPort int `pulumi:"publishedPort"`
|
|
// Port the container listens on.
|
|
TargetPort int `pulumi:"targetPort"`
|
|
}
|
|
|
|
// The set of arguments for constructing a Port resource.
|
|
type PortArgs struct {
|
|
// Application this port belongs to.
|
|
ApplicationId pulumi.StringInput
|
|
// Transport protocol. Valid values: `tcp`, `udp`.
|
|
Protocol pulumi.StringInput
|
|
// Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
|
|
PublishMode pulumi.StringPtrInput
|
|
// Port exposed on the host.
|
|
PublishedPort pulumi.IntInput
|
|
// Port the container listens on.
|
|
TargetPort pulumi.IntInput
|
|
}
|
|
|
|
func (PortArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*portArgs)(nil)).Elem()
|
|
}
|
|
|
|
type PortInput interface {
|
|
pulumi.Input
|
|
|
|
ToPortOutput() PortOutput
|
|
ToPortOutputWithContext(ctx context.Context) PortOutput
|
|
}
|
|
|
|
func (*Port) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Port)(nil)).Elem()
|
|
}
|
|
|
|
func (i *Port) ToPortOutput() PortOutput {
|
|
return i.ToPortOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *Port) ToPortOutputWithContext(ctx context.Context) PortOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(PortOutput)
|
|
}
|
|
|
|
// PortArrayInput is an input type that accepts PortArray and PortArrayOutput values.
|
|
// You can construct a concrete instance of `PortArrayInput` via:
|
|
//
|
|
// PortArray{ PortArgs{...} }
|
|
type PortArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToPortArrayOutput() PortArrayOutput
|
|
ToPortArrayOutputWithContext(context.Context) PortArrayOutput
|
|
}
|
|
|
|
type PortArray []PortInput
|
|
|
|
func (PortArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Port)(nil)).Elem()
|
|
}
|
|
|
|
func (i PortArray) ToPortArrayOutput() PortArrayOutput {
|
|
return i.ToPortArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i PortArray) ToPortArrayOutputWithContext(ctx context.Context) PortArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(PortArrayOutput)
|
|
}
|
|
|
|
// PortMapInput is an input type that accepts PortMap and PortMapOutput values.
|
|
// You can construct a concrete instance of `PortMapInput` via:
|
|
//
|
|
// PortMap{ "key": PortArgs{...} }
|
|
type PortMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToPortMapOutput() PortMapOutput
|
|
ToPortMapOutputWithContext(context.Context) PortMapOutput
|
|
}
|
|
|
|
type PortMap map[string]PortInput
|
|
|
|
func (PortMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Port)(nil)).Elem()
|
|
}
|
|
|
|
func (i PortMap) ToPortMapOutput() PortMapOutput {
|
|
return i.ToPortMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i PortMap) ToPortMapOutputWithContext(ctx context.Context) PortMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(PortMapOutput)
|
|
}
|
|
|
|
type PortOutput struct{ *pulumi.OutputState }
|
|
|
|
func (PortOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Port)(nil)).Elem()
|
|
}
|
|
|
|
func (o PortOutput) ToPortOutput() PortOutput {
|
|
return o
|
|
}
|
|
|
|
func (o PortOutput) ToPortOutputWithContext(ctx context.Context) PortOutput {
|
|
return o
|
|
}
|
|
|
|
// Application this port belongs to.
|
|
func (o PortOutput) ApplicationId() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Port) pulumi.StringOutput { return v.ApplicationId }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Transport protocol. Valid values: `tcp`, `udp`.
|
|
func (o PortOutput) Protocol() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Port) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
|
|
func (o PortOutput) PublishMode() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Port) pulumi.StringOutput { return v.PublishMode }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Port exposed on the host.
|
|
func (o PortOutput) PublishedPort() pulumi.IntOutput {
|
|
return o.ApplyT(func(v *Port) pulumi.IntOutput { return v.PublishedPort }).(pulumi.IntOutput)
|
|
}
|
|
|
|
// Port the container listens on.
|
|
func (o PortOutput) TargetPort() pulumi.IntOutput {
|
|
return o.ApplyT(func(v *Port) pulumi.IntOutput { return v.TargetPort }).(pulumi.IntOutput)
|
|
}
|
|
|
|
type PortArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (PortArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Port)(nil)).Elem()
|
|
}
|
|
|
|
func (o PortArrayOutput) ToPortArrayOutput() PortArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o PortArrayOutput) ToPortArrayOutputWithContext(ctx context.Context) PortArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o PortArrayOutput) Index(i pulumi.IntInput) PortOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Port {
|
|
return vs[0].([]*Port)[vs[1].(int)]
|
|
}).(PortOutput)
|
|
}
|
|
|
|
type PortMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (PortMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Port)(nil)).Elem()
|
|
}
|
|
|
|
func (o PortMapOutput) ToPortMapOutput() PortMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o PortMapOutput) ToPortMapOutputWithContext(ctx context.Context) PortMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o PortMapOutput) MapIndex(k pulumi.StringInput) PortOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Port {
|
|
return vs[0].(map[string]*Port)[vs[1].(string)]
|
|
}).(PortOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*PortInput)(nil)).Elem(), &Port{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*PortArrayInput)(nil)).Elem(), PortArray{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*PortMapInput)(nil)).Elem(), PortMap{})
|
|
pulumi.RegisterOutputType(PortOutput{})
|
|
pulumi.RegisterOutputType(PortArrayOutput{})
|
|
pulumi.RegisterOutputType(PortMapOutput{})
|
|
}
|