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

362 lines
14 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"
"github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A Docker network managed by Dokploy.
//
// Attach services to it with `networkIds` on `Application`, `Compose` and the database resources. Every service also joins the shared `dokploy-network` unless `detachDokployNetwork` is set.
//
// > Docker networks are immutable. Dokploy has no update endpoint, so changing any attribute replaces the network — which detaches the services currently using it until they redeploy.
type Network struct {
pulumi.CustomResourceState
// Allow standalone containers to attach to an overlay network.
Attachable pulumi.BoolOutput `pulumi:"attachable"`
// RFC 3339 timestamp of when the network was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`.
Driver pulumi.StringOutput `pulumi:"driver"`
// Enable IPv4 address allocation.
EnableIpv4 pulumi.BoolOutput `pulumi:"enableIpv4"`
// Enable IPv6 address allocation.
EnableIpv6 pulumi.BoolOutput `pulumi:"enableIpv6"`
// Isolate the network from external access.
Internal pulumi.BoolOutput `pulumi:"internal"`
// Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
Ipam pulumi.StringPtrOutput `pulumi:"ipam"`
// Maximum transmission unit for the network. Leave unset to use Docker's default.
Mtu pulumi.IntPtrOutput `pulumi:"mtu"`
// Name of the Docker network.
Name pulumi.StringOutput `pulumi:"name"`
// Organization that owns the network.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// Remote server to create the network on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
}
// NewNetwork registers a new resource with the given unique name, arguments, and options.
func NewNetwork(ctx *pulumi.Context,
name string, args *NetworkArgs, opts ...pulumi.ResourceOption) (*Network, error) {
if args == nil {
args = &NetworkArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Network
err := ctx.RegisterResource("dokploy:index/network:Network", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNetwork gets an existing Network 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 GetNetwork(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NetworkState, opts ...pulumi.ResourceOption) (*Network, error) {
var resource Network
err := ctx.ReadResource("dokploy:index/network:Network", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Network resources.
type networkState struct {
// Allow standalone containers to attach to an overlay network.
Attachable *bool `pulumi:"attachable"`
// RFC 3339 timestamp of when the network was created.
CreatedAt *string `pulumi:"createdAt"`
// Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`.
Driver *string `pulumi:"driver"`
// Enable IPv4 address allocation.
EnableIpv4 *bool `pulumi:"enableIpv4"`
// Enable IPv6 address allocation.
EnableIpv6 *bool `pulumi:"enableIpv6"`
// Isolate the network from external access.
Internal *bool `pulumi:"internal"`
// Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
Ipam *string `pulumi:"ipam"`
// Maximum transmission unit for the network. Leave unset to use Docker's default.
Mtu *int `pulumi:"mtu"`
// Name of the Docker network.
Name *string `pulumi:"name"`
// Organization that owns the network.
OrganizationId *string `pulumi:"organizationId"`
// Remote server to create the network on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
}
type NetworkState struct {
// Allow standalone containers to attach to an overlay network.
Attachable pulumi.BoolPtrInput
// RFC 3339 timestamp of when the network was created.
CreatedAt pulumi.StringPtrInput
// Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`.
Driver pulumi.StringPtrInput
// Enable IPv4 address allocation.
EnableIpv4 pulumi.BoolPtrInput
// Enable IPv6 address allocation.
EnableIpv6 pulumi.BoolPtrInput
// Isolate the network from external access.
Internal pulumi.BoolPtrInput
// Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
Ipam pulumi.StringPtrInput
// Maximum transmission unit for the network. Leave unset to use Docker's default.
Mtu pulumi.IntPtrInput
// Name of the Docker network.
Name pulumi.StringPtrInput
// Organization that owns the network.
OrganizationId pulumi.StringPtrInput
// Remote server to create the network on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
}
func (NetworkState) ElementType() reflect.Type {
return reflect.TypeOf((*networkState)(nil)).Elem()
}
type networkArgs struct {
// Allow standalone containers to attach to an overlay network.
Attachable *bool `pulumi:"attachable"`
// Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`.
Driver *string `pulumi:"driver"`
// Enable IPv4 address allocation.
EnableIpv4 *bool `pulumi:"enableIpv4"`
// Enable IPv6 address allocation.
EnableIpv6 *bool `pulumi:"enableIpv6"`
// Isolate the network from external access.
Internal *bool `pulumi:"internal"`
// Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
Ipam *string `pulumi:"ipam"`
// Maximum transmission unit for the network. Leave unset to use Docker's default.
Mtu *int `pulumi:"mtu"`
// Name of the Docker network.
Name *string `pulumi:"name"`
// Remote server to create the network on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
}
// The set of arguments for constructing a Network resource.
type NetworkArgs struct {
// Allow standalone containers to attach to an overlay network.
Attachable pulumi.BoolPtrInput
// Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`.
Driver pulumi.StringPtrInput
// Enable IPv4 address allocation.
EnableIpv4 pulumi.BoolPtrInput
// Enable IPv6 address allocation.
EnableIpv6 pulumi.BoolPtrInput
// Isolate the network from external access.
Internal pulumi.BoolPtrInput
// Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
Ipam pulumi.StringPtrInput
// Maximum transmission unit for the network. Leave unset to use Docker's default.
Mtu pulumi.IntPtrInput
// Name of the Docker network.
Name pulumi.StringPtrInput
// Remote server to create the network on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
}
func (NetworkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*networkArgs)(nil)).Elem()
}
type NetworkInput interface {
pulumi.Input
ToNetworkOutput() NetworkOutput
ToNetworkOutputWithContext(ctx context.Context) NetworkOutput
}
func (*Network) ElementType() reflect.Type {
return reflect.TypeOf((**Network)(nil)).Elem()
}
func (i *Network) ToNetworkOutput() NetworkOutput {
return i.ToNetworkOutputWithContext(context.Background())
}
func (i *Network) ToNetworkOutputWithContext(ctx context.Context) NetworkOutput {
return pulumi.ToOutputWithContext(ctx, i).(NetworkOutput)
}
// NetworkArrayInput is an input type that accepts NetworkArray and NetworkArrayOutput values.
// You can construct a concrete instance of `NetworkArrayInput` via:
//
// NetworkArray{ NetworkArgs{...} }
type NetworkArrayInput interface {
pulumi.Input
ToNetworkArrayOutput() NetworkArrayOutput
ToNetworkArrayOutputWithContext(context.Context) NetworkArrayOutput
}
type NetworkArray []NetworkInput
func (NetworkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Network)(nil)).Elem()
}
func (i NetworkArray) ToNetworkArrayOutput() NetworkArrayOutput {
return i.ToNetworkArrayOutputWithContext(context.Background())
}
func (i NetworkArray) ToNetworkArrayOutputWithContext(ctx context.Context) NetworkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NetworkArrayOutput)
}
// NetworkMapInput is an input type that accepts NetworkMap and NetworkMapOutput values.
// You can construct a concrete instance of `NetworkMapInput` via:
//
// NetworkMap{ "key": NetworkArgs{...} }
type NetworkMapInput interface {
pulumi.Input
ToNetworkMapOutput() NetworkMapOutput
ToNetworkMapOutputWithContext(context.Context) NetworkMapOutput
}
type NetworkMap map[string]NetworkInput
func (NetworkMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Network)(nil)).Elem()
}
func (i NetworkMap) ToNetworkMapOutput() NetworkMapOutput {
return i.ToNetworkMapOutputWithContext(context.Background())
}
func (i NetworkMap) ToNetworkMapOutputWithContext(ctx context.Context) NetworkMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NetworkMapOutput)
}
type NetworkOutput struct{ *pulumi.OutputState }
func (NetworkOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Network)(nil)).Elem()
}
func (o NetworkOutput) ToNetworkOutput() NetworkOutput {
return o
}
func (o NetworkOutput) ToNetworkOutputWithContext(ctx context.Context) NetworkOutput {
return o
}
// Allow standalone containers to attach to an overlay network.
func (o NetworkOutput) Attachable() pulumi.BoolOutput {
return o.ApplyT(func(v *Network) pulumi.BoolOutput { return v.Attachable }).(pulumi.BoolOutput)
}
// RFC 3339 timestamp of when the network was created.
func (o NetworkOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Network driver. Use `overlay` for multi-node Swarm clusters and `bridge` for a single host. Valid values: `bridge`, `overlay`.
func (o NetworkOutput) Driver() pulumi.StringOutput {
return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.Driver }).(pulumi.StringOutput)
}
// Enable IPv4 address allocation.
func (o NetworkOutput) EnableIpv4() pulumi.BoolOutput {
return o.ApplyT(func(v *Network) pulumi.BoolOutput { return v.EnableIpv4 }).(pulumi.BoolOutput)
}
// Enable IPv6 address allocation.
func (o NetworkOutput) EnableIpv6() pulumi.BoolOutput {
return o.ApplyT(func(v *Network) pulumi.BoolOutput { return v.EnableIpv6 }).(pulumi.BoolOutput)
}
// Isolate the network from external access.
func (o NetworkOutput) Internal() pulumi.BoolOutput {
return o.ApplyT(func(v *Network) pulumi.BoolOutput { return v.Internal }).(pulumi.BoolOutput)
}
// Custom IP address management, as a JSON object with `subnet`, `gateway` and `ipRange` keys. Leave unset to let Docker choose a subnet.
func (o NetworkOutput) Ipam() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Network) pulumi.StringPtrOutput { return v.Ipam }).(pulumi.StringPtrOutput)
}
// Maximum transmission unit for the network. Leave unset to use Docker's default.
func (o NetworkOutput) Mtu() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Network) pulumi.IntPtrOutput { return v.Mtu }).(pulumi.IntPtrOutput)
}
// Name of the Docker network.
func (o NetworkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Organization that owns the network.
func (o NetworkOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *Network) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
// Remote server to create the network on. Omit to use the Dokploy host itself.
func (o NetworkOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Network) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
type NetworkArrayOutput struct{ *pulumi.OutputState }
func (NetworkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Network)(nil)).Elem()
}
func (o NetworkArrayOutput) ToNetworkArrayOutput() NetworkArrayOutput {
return o
}
func (o NetworkArrayOutput) ToNetworkArrayOutputWithContext(ctx context.Context) NetworkArrayOutput {
return o
}
func (o NetworkArrayOutput) Index(i pulumi.IntInput) NetworkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Network {
return vs[0].([]*Network)[vs[1].(int)]
}).(NetworkOutput)
}
type NetworkMapOutput struct{ *pulumi.OutputState }
func (NetworkMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Network)(nil)).Elem()
}
func (o NetworkMapOutput) ToNetworkMapOutput() NetworkMapOutput {
return o
}
func (o NetworkMapOutput) ToNetworkMapOutputWithContext(ctx context.Context) NetworkMapOutput {
return o
}
func (o NetworkMapOutput) MapIndex(k pulumi.StringInput) NetworkOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Network {
return vs[0].(map[string]*Network)[vs[1].(string)]
}).(NetworkOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NetworkInput)(nil)).Elem(), &Network{})
pulumi.RegisterInputType(reflect.TypeOf((*NetworkArrayInput)(nil)).Elem(), NetworkArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NetworkMapInput)(nil)).Elem(), NetworkMap{})
pulumi.RegisterOutputType(NetworkOutput{})
pulumi.RegisterOutputType(NetworkArrayOutput{})
pulumi.RegisterOutputType(NetworkMapOutput{})
}