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
10 KiB
Go
Generated
289 lines
10 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 environment inside a Dokploy project, such as `staging` or `production`. Services belong to an environment rather than directly to a project.
|
|
//
|
|
// Dokploy creates a default `production` environment with every project; reference it via `dokploy_project.<name>.default_environment_id` instead of declaring it here.
|
|
type Environment struct {
|
|
pulumi.CustomResourceState
|
|
|
|
// RFC 3339 timestamp of when the environment was created.
|
|
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
|
|
// Free-form description.
|
|
Description pulumi.StringPtrOutput `pulumi:"description"`
|
|
// Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
|
|
Env pulumi.StringOutput `pulumi:"env"`
|
|
// Whether this is the project's default environment.
|
|
IsDefault pulumi.BoolOutput `pulumi:"isDefault"`
|
|
// Environment name, for example `staging`.
|
|
Name pulumi.StringOutput `pulumi:"name"`
|
|
// Project this environment belongs to.
|
|
ProjectId pulumi.StringOutput `pulumi:"projectId"`
|
|
}
|
|
|
|
// NewEnvironment registers a new resource with the given unique name, arguments, and options.
|
|
func NewEnvironment(ctx *pulumi.Context,
|
|
name string, args *EnvironmentArgs, opts ...pulumi.ResourceOption) (*Environment, error) {
|
|
if args == nil {
|
|
return nil, errors.New("missing one or more required arguments")
|
|
}
|
|
|
|
if args.ProjectId == nil {
|
|
return nil, errors.New("invalid value for required argument 'ProjectId'")
|
|
}
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource Environment
|
|
err := ctx.RegisterResource("dokploy:index/environment:Environment", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetEnvironment gets an existing Environment 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 GetEnvironment(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *EnvironmentState, opts ...pulumi.ResourceOption) (*Environment, error) {
|
|
var resource Environment
|
|
err := ctx.ReadResource("dokploy:index/environment:Environment", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering Environment resources.
|
|
type environmentState struct {
|
|
// RFC 3339 timestamp of when the environment was created.
|
|
CreatedAt *string `pulumi:"createdAt"`
|
|
// Free-form description.
|
|
Description *string `pulumi:"description"`
|
|
// Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
|
|
Env *string `pulumi:"env"`
|
|
// Whether this is the project's default environment.
|
|
IsDefault *bool `pulumi:"isDefault"`
|
|
// Environment name, for example `staging`.
|
|
Name *string `pulumi:"name"`
|
|
// Project this environment belongs to.
|
|
ProjectId *string `pulumi:"projectId"`
|
|
}
|
|
|
|
type EnvironmentState struct {
|
|
// RFC 3339 timestamp of when the environment was created.
|
|
CreatedAt pulumi.StringPtrInput
|
|
// Free-form description.
|
|
Description pulumi.StringPtrInput
|
|
// Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
|
|
Env pulumi.StringPtrInput
|
|
// Whether this is the project's default environment.
|
|
IsDefault pulumi.BoolPtrInput
|
|
// Environment name, for example `staging`.
|
|
Name pulumi.StringPtrInput
|
|
// Project this environment belongs to.
|
|
ProjectId pulumi.StringPtrInput
|
|
}
|
|
|
|
func (EnvironmentState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*environmentState)(nil)).Elem()
|
|
}
|
|
|
|
type environmentArgs struct {
|
|
// Free-form description.
|
|
Description *string `pulumi:"description"`
|
|
// Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
|
|
Env *string `pulumi:"env"`
|
|
// Environment name, for example `staging`.
|
|
Name *string `pulumi:"name"`
|
|
// Project this environment belongs to.
|
|
ProjectId string `pulumi:"projectId"`
|
|
}
|
|
|
|
// The set of arguments for constructing a Environment resource.
|
|
type EnvironmentArgs struct {
|
|
// Free-form description.
|
|
Description pulumi.StringPtrInput
|
|
// Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
|
|
Env pulumi.StringPtrInput
|
|
// Environment name, for example `staging`.
|
|
Name pulumi.StringPtrInput
|
|
// Project this environment belongs to.
|
|
ProjectId pulumi.StringInput
|
|
}
|
|
|
|
func (EnvironmentArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*environmentArgs)(nil)).Elem()
|
|
}
|
|
|
|
type EnvironmentInput interface {
|
|
pulumi.Input
|
|
|
|
ToEnvironmentOutput() EnvironmentOutput
|
|
ToEnvironmentOutputWithContext(ctx context.Context) EnvironmentOutput
|
|
}
|
|
|
|
func (*Environment) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Environment)(nil)).Elem()
|
|
}
|
|
|
|
func (i *Environment) ToEnvironmentOutput() EnvironmentOutput {
|
|
return i.ToEnvironmentOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *Environment) ToEnvironmentOutputWithContext(ctx context.Context) EnvironmentOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(EnvironmentOutput)
|
|
}
|
|
|
|
// EnvironmentArrayInput is an input type that accepts EnvironmentArray and EnvironmentArrayOutput values.
|
|
// You can construct a concrete instance of `EnvironmentArrayInput` via:
|
|
//
|
|
// EnvironmentArray{ EnvironmentArgs{...} }
|
|
type EnvironmentArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToEnvironmentArrayOutput() EnvironmentArrayOutput
|
|
ToEnvironmentArrayOutputWithContext(context.Context) EnvironmentArrayOutput
|
|
}
|
|
|
|
type EnvironmentArray []EnvironmentInput
|
|
|
|
func (EnvironmentArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Environment)(nil)).Elem()
|
|
}
|
|
|
|
func (i EnvironmentArray) ToEnvironmentArrayOutput() EnvironmentArrayOutput {
|
|
return i.ToEnvironmentArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i EnvironmentArray) ToEnvironmentArrayOutputWithContext(ctx context.Context) EnvironmentArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(EnvironmentArrayOutput)
|
|
}
|
|
|
|
// EnvironmentMapInput is an input type that accepts EnvironmentMap and EnvironmentMapOutput values.
|
|
// You can construct a concrete instance of `EnvironmentMapInput` via:
|
|
//
|
|
// EnvironmentMap{ "key": EnvironmentArgs{...} }
|
|
type EnvironmentMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToEnvironmentMapOutput() EnvironmentMapOutput
|
|
ToEnvironmentMapOutputWithContext(context.Context) EnvironmentMapOutput
|
|
}
|
|
|
|
type EnvironmentMap map[string]EnvironmentInput
|
|
|
|
func (EnvironmentMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Environment)(nil)).Elem()
|
|
}
|
|
|
|
func (i EnvironmentMap) ToEnvironmentMapOutput() EnvironmentMapOutput {
|
|
return i.ToEnvironmentMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i EnvironmentMap) ToEnvironmentMapOutputWithContext(ctx context.Context) EnvironmentMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(EnvironmentMapOutput)
|
|
}
|
|
|
|
type EnvironmentOutput struct{ *pulumi.OutputState }
|
|
|
|
func (EnvironmentOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Environment)(nil)).Elem()
|
|
}
|
|
|
|
func (o EnvironmentOutput) ToEnvironmentOutput() EnvironmentOutput {
|
|
return o
|
|
}
|
|
|
|
func (o EnvironmentOutput) ToEnvironmentOutputWithContext(ctx context.Context) EnvironmentOutput {
|
|
return o
|
|
}
|
|
|
|
// RFC 3339 timestamp of when the environment was created.
|
|
func (o EnvironmentOutput) CreatedAt() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Free-form description.
|
|
func (o EnvironmentOutput) Description() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Environment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
|
|
func (o EnvironmentOutput) Env() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.Env }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Whether this is the project's default environment.
|
|
func (o EnvironmentOutput) IsDefault() pulumi.BoolOutput {
|
|
return o.ApplyT(func(v *Environment) pulumi.BoolOutput { return v.IsDefault }).(pulumi.BoolOutput)
|
|
}
|
|
|
|
// Environment name, for example `staging`.
|
|
func (o EnvironmentOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Project this environment belongs to.
|
|
func (o EnvironmentOutput) ProjectId() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.ProjectId }).(pulumi.StringOutput)
|
|
}
|
|
|
|
type EnvironmentArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (EnvironmentArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Environment)(nil)).Elem()
|
|
}
|
|
|
|
func (o EnvironmentArrayOutput) ToEnvironmentArrayOutput() EnvironmentArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o EnvironmentArrayOutput) ToEnvironmentArrayOutputWithContext(ctx context.Context) EnvironmentArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o EnvironmentArrayOutput) Index(i pulumi.IntInput) EnvironmentOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Environment {
|
|
return vs[0].([]*Environment)[vs[1].(int)]
|
|
}).(EnvironmentOutput)
|
|
}
|
|
|
|
type EnvironmentMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (EnvironmentMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Environment)(nil)).Elem()
|
|
}
|
|
|
|
func (o EnvironmentMapOutput) ToEnvironmentMapOutput() EnvironmentMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o EnvironmentMapOutput) ToEnvironmentMapOutputWithContext(ctx context.Context) EnvironmentMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o EnvironmentMapOutput) MapIndex(k pulumi.StringInput) EnvironmentOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Environment {
|
|
return vs[0].(map[string]*Environment)[vs[1].(string)]
|
|
}).(EnvironmentOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentInput)(nil)).Elem(), &Environment{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentArrayInput)(nil)).Elem(), EnvironmentArray{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentMapInput)(nil)).Elem(), EnvironmentMap{})
|
|
pulumi.RegisterOutputType(EnvironmentOutput{})
|
|
pulumi.RegisterOutputType(EnvironmentArrayOutput{})
|
|
pulumi.RegisterOutputType(EnvironmentMapOutput{})
|
|
}
|