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

281 lines
9.7 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 Dokploy project: the top-level container for environments and services.
//
// Creating a project automatically creates a default `production` environment. Its ID is exposed as `defaultEnvironmentId`, so services can be attached without declaring a separate `Environment` resource.
type Project struct {
pulumi.CustomResourceState
// RFC 3339 timestamp of when the project was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// ID of the `production` environment that Dokploy creates automatically with the project.
DefaultEnvironmentId pulumi.StringOutput `pulumi:"defaultEnvironmentId"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
Env pulumi.StringOutput `pulumi:"env"`
// Display name of the project.
Name pulumi.StringOutput `pulumi:"name"`
// Organization that owns the project.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
}
// NewProject registers a new resource with the given unique name, arguments, and options.
func NewProject(ctx *pulumi.Context,
name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error) {
if args == nil {
args = &ProjectArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Project
err := ctx.RegisterResource("dokploy:index/project:Project", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProject gets an existing Project 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 GetProject(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error) {
var resource Project
err := ctx.ReadResource("dokploy:index/project:Project", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Project resources.
type projectState struct {
// RFC 3339 timestamp of when the project was created.
CreatedAt *string `pulumi:"createdAt"`
// ID of the `production` environment that Dokploy creates automatically with the project.
DefaultEnvironmentId *string `pulumi:"defaultEnvironmentId"`
// Free-form description.
Description *string `pulumi:"description"`
// Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
Env *string `pulumi:"env"`
// Display name of the project.
Name *string `pulumi:"name"`
// Organization that owns the project.
OrganizationId *string `pulumi:"organizationId"`
}
type ProjectState struct {
// RFC 3339 timestamp of when the project was created.
CreatedAt pulumi.StringPtrInput
// ID of the `production` environment that Dokploy creates automatically with the project.
DefaultEnvironmentId pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
Env pulumi.StringPtrInput
// Display name of the project.
Name pulumi.StringPtrInput
// Organization that owns the project.
OrganizationId pulumi.StringPtrInput
}
func (ProjectState) ElementType() reflect.Type {
return reflect.TypeOf((*projectState)(nil)).Elem()
}
type projectArgs struct {
// Free-form description.
Description *string `pulumi:"description"`
// Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
Env *string `pulumi:"env"`
// Display name of the project.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a Project resource.
type ProjectArgs struct {
// Free-form description.
Description pulumi.StringPtrInput
// Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
Env pulumi.StringPtrInput
// Display name of the project.
Name pulumi.StringPtrInput
}
func (ProjectArgs) ElementType() reflect.Type {
return reflect.TypeOf((*projectArgs)(nil)).Elem()
}
type ProjectInput interface {
pulumi.Input
ToProjectOutput() ProjectOutput
ToProjectOutputWithContext(ctx context.Context) ProjectOutput
}
func (*Project) ElementType() reflect.Type {
return reflect.TypeOf((**Project)(nil)).Elem()
}
func (i *Project) ToProjectOutput() ProjectOutput {
return i.ToProjectOutputWithContext(context.Background())
}
func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProjectOutput)
}
// ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values.
// You can construct a concrete instance of `ProjectArrayInput` via:
//
// ProjectArray{ ProjectArgs{...} }
type ProjectArrayInput interface {
pulumi.Input
ToProjectArrayOutput() ProjectArrayOutput
ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput
}
type ProjectArray []ProjectInput
func (ProjectArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Project)(nil)).Elem()
}
func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput {
return i.ToProjectArrayOutputWithContext(context.Background())
}
func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProjectArrayOutput)
}
// ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values.
// You can construct a concrete instance of `ProjectMapInput` via:
//
// ProjectMap{ "key": ProjectArgs{...} }
type ProjectMapInput interface {
pulumi.Input
ToProjectMapOutput() ProjectMapOutput
ToProjectMapOutputWithContext(context.Context) ProjectMapOutput
}
type ProjectMap map[string]ProjectInput
func (ProjectMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Project)(nil)).Elem()
}
func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput {
return i.ToProjectMapOutputWithContext(context.Background())
}
func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProjectMapOutput)
}
type ProjectOutput struct{ *pulumi.OutputState }
func (ProjectOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Project)(nil)).Elem()
}
func (o ProjectOutput) ToProjectOutput() ProjectOutput {
return o
}
func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput {
return o
}
// RFC 3339 timestamp of when the project was created.
func (o ProjectOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// ID of the `production` environment that Dokploy creates automatically with the project.
func (o ProjectOutput) DefaultEnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.DefaultEnvironmentId }).(pulumi.StringOutput)
}
// Free-form description.
func (o ProjectOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
func (o ProjectOutput) Env() pulumi.StringOutput {
return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Env }).(pulumi.StringOutput)
}
// Display name of the project.
func (o ProjectOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Organization that owns the project.
func (o ProjectOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
type ProjectArrayOutput struct{ *pulumi.OutputState }
func (ProjectArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Project)(nil)).Elem()
}
func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput {
return o
}
func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput {
return o
}
func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Project {
return vs[0].([]*Project)[vs[1].(int)]
}).(ProjectOutput)
}
type ProjectMapOutput struct{ *pulumi.OutputState }
func (ProjectMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Project)(nil)).Elem()
}
func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput {
return o
}
func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput {
return o
}
func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Project {
return vs[0].(map[string]*Project)[vs[1].(string)]
}).(ProjectOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProjectInput)(nil)).Elem(), &Project{})
pulumi.RegisterInputType(reflect.TypeOf((*ProjectArrayInput)(nil)).Elem(), ProjectArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ProjectMapInput)(nil)).Elem(), ProjectMap{})
pulumi.RegisterOutputType(ProjectOutput{})
pulumi.RegisterOutputType(ProjectArrayOutput{})
pulumi.RegisterOutputType(ProjectMapOutput{})
}