Files
pulumi-dokploy/sdk/go/dokploy/project.go
Max Vojtkov bb3c15135b Bridge terraform-provider-dokploy into a Pulumi provider
18 resources and 5 data sources mapped into the dokploy:index module, with
SDKs generated for TypeScript, Python, Go and .NET.
2026-08-08 15:28:16 +03:00

278 lines
9.4 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"
)
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{})
}