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.
This commit is contained in:
2026-08-08 15:28:16 +03:00
commit bb3c15135b
175 changed files with 61774 additions and 0 deletions

1650
sdk/go/dokploy/application.go generated Normal file

File diff suppressed because it is too large Load Diff

299
sdk/go/dokploy/certificate.go generated Normal file
View File

@@ -0,0 +1,299 @@
// 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"
)
type Certificate struct {
pulumi.CustomResourceState
// Whether Dokploy should renew this certificate automatically.
AutoRenew pulumi.BoolOutput `pulumi:"autoRenew"`
// PEM-encoded certificate chain.
CertificateData pulumi.StringOutput `pulumi:"certificateData"`
// Path where Dokploy writes the certificate on disk.
CertificatePath pulumi.StringOutput `pulumi:"certificatePath"`
// Display name of the certificate.
Name pulumi.StringOutput `pulumi:"name"`
// PEM-encoded private key.
PrivateKey pulumi.StringOutput `pulumi:"privateKey"`
// Server this certificate is installed on.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
}
// NewCertificate registers a new resource with the given unique name, arguments, and options.
func NewCertificate(ctx *pulumi.Context,
name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CertificateData == nil {
return nil, errors.New("invalid value for required argument 'CertificateData'")
}
if args.PrivateKey == nil {
return nil, errors.New("invalid value for required argument 'PrivateKey'")
}
if args.PrivateKey != nil {
args.PrivateKey = pulumi.ToSecret(args.PrivateKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"privateKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Certificate
err := ctx.RegisterResource("dokploy:index/certificate:Certificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCertificate gets an existing Certificate 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 GetCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error) {
var resource Certificate
err := ctx.ReadResource("dokploy:index/certificate:Certificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Certificate resources.
type certificateState struct {
// Whether Dokploy should renew this certificate automatically.
AutoRenew *bool `pulumi:"autoRenew"`
// PEM-encoded certificate chain.
CertificateData *string `pulumi:"certificateData"`
// Path where Dokploy writes the certificate on disk.
CertificatePath *string `pulumi:"certificatePath"`
// Display name of the certificate.
Name *string `pulumi:"name"`
// PEM-encoded private key.
PrivateKey *string `pulumi:"privateKey"`
// Server this certificate is installed on.
ServerId *string `pulumi:"serverId"`
}
type CertificateState struct {
// Whether Dokploy should renew this certificate automatically.
AutoRenew pulumi.BoolPtrInput
// PEM-encoded certificate chain.
CertificateData pulumi.StringPtrInput
// Path where Dokploy writes the certificate on disk.
CertificatePath pulumi.StringPtrInput
// Display name of the certificate.
Name pulumi.StringPtrInput
// PEM-encoded private key.
PrivateKey pulumi.StringPtrInput
// Server this certificate is installed on.
ServerId pulumi.StringPtrInput
}
func (CertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*certificateState)(nil)).Elem()
}
type certificateArgs struct {
// Whether Dokploy should renew this certificate automatically.
AutoRenew *bool `pulumi:"autoRenew"`
// PEM-encoded certificate chain.
CertificateData string `pulumi:"certificateData"`
// Display name of the certificate.
Name *string `pulumi:"name"`
// PEM-encoded private key.
PrivateKey string `pulumi:"privateKey"`
// Server this certificate is installed on.
ServerId *string `pulumi:"serverId"`
}
// The set of arguments for constructing a Certificate resource.
type CertificateArgs struct {
// Whether Dokploy should renew this certificate automatically.
AutoRenew pulumi.BoolPtrInput
// PEM-encoded certificate chain.
CertificateData pulumi.StringInput
// Display name of the certificate.
Name pulumi.StringPtrInput
// PEM-encoded private key.
PrivateKey pulumi.StringInput
// Server this certificate is installed on.
ServerId pulumi.StringPtrInput
}
func (CertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*certificateArgs)(nil)).Elem()
}
type CertificateInput interface {
pulumi.Input
ToCertificateOutput() CertificateOutput
ToCertificateOutputWithContext(ctx context.Context) CertificateOutput
}
func (*Certificate) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (i *Certificate) ToCertificateOutput() CertificateOutput {
return i.ToCertificateOutputWithContext(context.Background())
}
func (i *Certificate) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateOutput)
}
// CertificateArrayInput is an input type that accepts CertificateArray and CertificateArrayOutput values.
// You can construct a concrete instance of `CertificateArrayInput` via:
//
// CertificateArray{ CertificateArgs{...} }
type CertificateArrayInput interface {
pulumi.Input
ToCertificateArrayOutput() CertificateArrayOutput
ToCertificateArrayOutputWithContext(context.Context) CertificateArrayOutput
}
type CertificateArray []CertificateInput
func (CertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (i CertificateArray) ToCertificateArrayOutput() CertificateArrayOutput {
return i.ToCertificateArrayOutputWithContext(context.Background())
}
func (i CertificateArray) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateArrayOutput)
}
// CertificateMapInput is an input type that accepts CertificateMap and CertificateMapOutput values.
// You can construct a concrete instance of `CertificateMapInput` via:
//
// CertificateMap{ "key": CertificateArgs{...} }
type CertificateMapInput interface {
pulumi.Input
ToCertificateMapOutput() CertificateMapOutput
ToCertificateMapOutputWithContext(context.Context) CertificateMapOutput
}
type CertificateMap map[string]CertificateInput
func (CertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (i CertificateMap) ToCertificateMapOutput() CertificateMapOutput {
return i.ToCertificateMapOutputWithContext(context.Background())
}
func (i CertificateMap) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateMapOutput)
}
type CertificateOutput struct{ *pulumi.OutputState }
func (CertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (o CertificateOutput) ToCertificateOutput() CertificateOutput {
return o
}
func (o CertificateOutput) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return o
}
// Whether Dokploy should renew this certificate automatically.
func (o CertificateOutput) AutoRenew() pulumi.BoolOutput {
return o.ApplyT(func(v *Certificate) pulumi.BoolOutput { return v.AutoRenew }).(pulumi.BoolOutput)
}
// PEM-encoded certificate chain.
func (o CertificateOutput) CertificateData() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.CertificateData }).(pulumi.StringOutput)
}
// Path where Dokploy writes the certificate on disk.
func (o CertificateOutput) CertificatePath() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.CertificatePath }).(pulumi.StringOutput)
}
// Display name of the certificate.
func (o CertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// PEM-encoded private key.
func (o CertificateOutput) PrivateKey() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.PrivateKey }).(pulumi.StringOutput)
}
// Server this certificate is installed on.
func (o CertificateOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
type CertificateArrayOutput struct{ *pulumi.OutputState }
func (CertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (o CertificateArrayOutput) ToCertificateArrayOutput() CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) Index(i pulumi.IntInput) CertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].([]*Certificate)[vs[1].(int)]
}).(CertificateOutput)
}
type CertificateMapOutput struct{ *pulumi.OutputState }
func (CertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (o CertificateMapOutput) ToCertificateMapOutput() CertificateMapOutput {
return o
}
func (o CertificateMapOutput) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return o
}
func (o CertificateMapOutput) MapIndex(k pulumi.StringInput) CertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].(map[string]*Certificate)[vs[1].(string)]
}).(CertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CertificateInput)(nil)).Elem(), &Certificate{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateArrayInput)(nil)).Elem(), CertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateMapInput)(nil)).Elem(), CertificateMap{})
pulumi.RegisterOutputType(CertificateOutput{})
pulumi.RegisterOutputType(CertificateArrayOutput{})
pulumi.RegisterOutputType(CertificateMapOutput{})
}

855
sdk/go/dokploy/compose.go generated Normal file
View File

@@ -0,0 +1,855 @@
// 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"
)
type Compose struct {
pulumi.CustomResourceState
// Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
AppName pulumi.StringOutput `pulumi:"appName"`
// Deploy automatically when the configured trigger fires.
AutoDeploy pulumi.BoolOutput `pulumi:"autoDeploy"`
// Bitbucket branch to deploy.
BitbucketBranch pulumi.StringPtrOutput `pulumi:"bitbucketBranch"`
// ID of the configured Bitbucket provider connection.
BitbucketId pulumi.StringPtrOutput `pulumi:"bitbucketId"`
// Bitbucket repository owner.
BitbucketOwner pulumi.StringPtrOutput `pulumi:"bitbucketOwner"`
// Bitbucket repository name.
BitbucketRepository pulumi.StringPtrOutput `pulumi:"bitbucketRepository"`
// Bitbucket repository slug.
BitbucketRepositorySlug pulumi.StringPtrOutput `pulumi:"bitbucketRepositorySlug"`
// GitHub branch to deploy.
Branch pulumi.StringPtrOutput `pulumi:"branch"`
// Custom `docker compose` command to run.
Command pulumi.StringOutput `pulumi:"command"`
// Inline Compose file contents. Used when `sourceType` is `raw`.
ComposeFile pulumi.StringOutput `pulumi:"composeFile"`
// Path to the Compose file within the repository.
ComposePath pulumi.StringOutput `pulumi:"composePath"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ComposeStatus pulumi.StringOutput `pulumi:"composeStatus"`
// Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
ComposeType pulumi.StringOutput `pulumi:"composeType"`
// RFC 3339 timestamp of when the stack was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Branch to deploy for a custom Git remote.
CustomGitBranch pulumi.StringPtrOutput `pulumi:"customGitBranch"`
// SSH key used to clone a private custom Git remote.
CustomGitSshKeyId pulumi.StringPtrOutput `pulumi:"customGitSshKeyId"`
// Git remote URL, when `sourceType` is `git`.
CustomGitUrl pulumi.StringPtrOutput `pulumi:"customGitUrl"`
// Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
DeleteVolumes pulumi.BoolPtrOutput `pulumi:"deleteVolumes"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Clone Git submodules when checking out the repository.
EnableSubmodules pulumi.BoolOutput `pulumi:"enableSubmodules"`
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrOutput `pulumi:"env"`
// Environment this stack belongs to.
EnvironmentId pulumi.StringOutput `pulumi:"environmentId"`
// Gitea branch to deploy.
GiteaBranch pulumi.StringPtrOutput `pulumi:"giteaBranch"`
// ID of the configured Gitea provider connection.
GiteaId pulumi.StringPtrOutput `pulumi:"giteaId"`
// Gitea repository owner.
GiteaOwner pulumi.StringPtrOutput `pulumi:"giteaOwner"`
// Gitea repository name.
GiteaRepository pulumi.StringPtrOutput `pulumi:"giteaRepository"`
// ID of the configured GitHub provider connection.
GithubId pulumi.StringPtrOutput `pulumi:"githubId"`
// GitLab branch to deploy.
GitlabBranch pulumi.StringPtrOutput `pulumi:"gitlabBranch"`
// ID of the configured GitLab provider connection.
GitlabId pulumi.StringPtrOutput `pulumi:"gitlabId"`
// GitLab repository owner.
GitlabOwner pulumi.StringPtrOutput `pulumi:"gitlabOwner"`
// Full GitLab namespace path.
GitlabPathNamespace pulumi.StringPtrOutput `pulumi:"gitlabPathNamespace"`
// Numeric GitLab project ID.
GitlabProjectId pulumi.IntPtrOutput `pulumi:"gitlabProjectId"`
// GitLab repository name.
GitlabRepository pulumi.StringPtrOutput `pulumi:"gitlabRepository"`
// Run the stack on its own isolated Docker network.
IsolatedDeployment pulumi.BoolOutput `pulumi:"isolatedDeployment"`
// Prefix volume names for isolated deployments. Retained for backwards compatibility.
IsolatedDeploymentsVolume pulumi.BoolOutput `pulumi:"isolatedDeploymentsVolume"`
// Display name of the stack.
Name pulumi.StringOutput `pulumi:"name"`
// GitHub repository owner.
Owner pulumi.StringPtrOutput `pulumi:"owner"`
// Append a random suffix to service and volume names.
Randomize pulumi.BoolOutput `pulumi:"randomize"`
// GitHub repository name.
Repository pulumi.StringPtrOutput `pulumi:"repository"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
SourceType pulumi.StringOutput `pulumi:"sourceType"`
// Suffix appended to generated resource names.
Suffix pulumi.StringOutput `pulumi:"suffix"`
// What triggers an automatic deployment. Valid values: `push`, `tag`.
TriggerType pulumi.StringOutput `pulumi:"triggerType"`
// Glob patterns that limit which changed paths trigger an automatic deployment.
WatchPaths pulumi.StringArrayOutput `pulumi:"watchPaths"`
}
// NewCompose registers a new resource with the given unique name, arguments, and options.
func NewCompose(ctx *pulumi.Context,
name string, args *ComposeArgs, opts ...pulumi.ResourceOption) (*Compose, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EnvironmentId == nil {
return nil, errors.New("invalid value for required argument 'EnvironmentId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Compose
err := ctx.RegisterResource("dokploy:index/compose:Compose", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCompose gets an existing Compose 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 GetCompose(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ComposeState, opts ...pulumi.ResourceOption) (*Compose, error) {
var resource Compose
err := ctx.ReadResource("dokploy:index/compose:Compose", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Compose resources.
type composeState struct {
// Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
AppName *string `pulumi:"appName"`
// Deploy automatically when the configured trigger fires.
AutoDeploy *bool `pulumi:"autoDeploy"`
// Bitbucket branch to deploy.
BitbucketBranch *string `pulumi:"bitbucketBranch"`
// ID of the configured Bitbucket provider connection.
BitbucketId *string `pulumi:"bitbucketId"`
// Bitbucket repository owner.
BitbucketOwner *string `pulumi:"bitbucketOwner"`
// Bitbucket repository name.
BitbucketRepository *string `pulumi:"bitbucketRepository"`
// Bitbucket repository slug.
BitbucketRepositorySlug *string `pulumi:"bitbucketRepositorySlug"`
// GitHub branch to deploy.
Branch *string `pulumi:"branch"`
// Custom `docker compose` command to run.
Command *string `pulumi:"command"`
// Inline Compose file contents. Used when `sourceType` is `raw`.
ComposeFile *string `pulumi:"composeFile"`
// Path to the Compose file within the repository.
ComposePath *string `pulumi:"composePath"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ComposeStatus *string `pulumi:"composeStatus"`
// Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
ComposeType *string `pulumi:"composeType"`
// RFC 3339 timestamp of when the stack was created.
CreatedAt *string `pulumi:"createdAt"`
// Branch to deploy for a custom Git remote.
CustomGitBranch *string `pulumi:"customGitBranch"`
// SSH key used to clone a private custom Git remote.
CustomGitSshKeyId *string `pulumi:"customGitSshKeyId"`
// Git remote URL, when `sourceType` is `git`.
CustomGitUrl *string `pulumi:"customGitUrl"`
// Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
DeleteVolumes *bool `pulumi:"deleteVolumes"`
// Free-form description.
Description *string `pulumi:"description"`
// Clone Git submodules when checking out the repository.
EnableSubmodules *bool `pulumi:"enableSubmodules"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this stack belongs to.
EnvironmentId *string `pulumi:"environmentId"`
// Gitea branch to deploy.
GiteaBranch *string `pulumi:"giteaBranch"`
// ID of the configured Gitea provider connection.
GiteaId *string `pulumi:"giteaId"`
// Gitea repository owner.
GiteaOwner *string `pulumi:"giteaOwner"`
// Gitea repository name.
GiteaRepository *string `pulumi:"giteaRepository"`
// ID of the configured GitHub provider connection.
GithubId *string `pulumi:"githubId"`
// GitLab branch to deploy.
GitlabBranch *string `pulumi:"gitlabBranch"`
// ID of the configured GitLab provider connection.
GitlabId *string `pulumi:"gitlabId"`
// GitLab repository owner.
GitlabOwner *string `pulumi:"gitlabOwner"`
// Full GitLab namespace path.
GitlabPathNamespace *string `pulumi:"gitlabPathNamespace"`
// Numeric GitLab project ID.
GitlabProjectId *int `pulumi:"gitlabProjectId"`
// GitLab repository name.
GitlabRepository *string `pulumi:"gitlabRepository"`
// Run the stack on its own isolated Docker network.
IsolatedDeployment *bool `pulumi:"isolatedDeployment"`
// Prefix volume names for isolated deployments. Retained for backwards compatibility.
IsolatedDeploymentsVolume *bool `pulumi:"isolatedDeploymentsVolume"`
// Display name of the stack.
Name *string `pulumi:"name"`
// GitHub repository owner.
Owner *string `pulumi:"owner"`
// Append a random suffix to service and volume names.
Randomize *bool `pulumi:"randomize"`
// GitHub repository name.
Repository *string `pulumi:"repository"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
SourceType *string `pulumi:"sourceType"`
// Suffix appended to generated resource names.
Suffix *string `pulumi:"suffix"`
// What triggers an automatic deployment. Valid values: `push`, `tag`.
TriggerType *string `pulumi:"triggerType"`
// Glob patterns that limit which changed paths trigger an automatic deployment.
WatchPaths []string `pulumi:"watchPaths"`
}
type ComposeState struct {
// Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
AppName pulumi.StringPtrInput
// Deploy automatically when the configured trigger fires.
AutoDeploy pulumi.BoolPtrInput
// Bitbucket branch to deploy.
BitbucketBranch pulumi.StringPtrInput
// ID of the configured Bitbucket provider connection.
BitbucketId pulumi.StringPtrInput
// Bitbucket repository owner.
BitbucketOwner pulumi.StringPtrInput
// Bitbucket repository name.
BitbucketRepository pulumi.StringPtrInput
// Bitbucket repository slug.
BitbucketRepositorySlug pulumi.StringPtrInput
// GitHub branch to deploy.
Branch pulumi.StringPtrInput
// Custom `docker compose` command to run.
Command pulumi.StringPtrInput
// Inline Compose file contents. Used when `sourceType` is `raw`.
ComposeFile pulumi.StringPtrInput
// Path to the Compose file within the repository.
ComposePath pulumi.StringPtrInput
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ComposeStatus pulumi.StringPtrInput
// Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
ComposeType pulumi.StringPtrInput
// RFC 3339 timestamp of when the stack was created.
CreatedAt pulumi.StringPtrInput
// Branch to deploy for a custom Git remote.
CustomGitBranch pulumi.StringPtrInput
// SSH key used to clone a private custom Git remote.
CustomGitSshKeyId pulumi.StringPtrInput
// Git remote URL, when `sourceType` is `git`.
CustomGitUrl pulumi.StringPtrInput
// Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
DeleteVolumes pulumi.BoolPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Clone Git submodules when checking out the repository.
EnableSubmodules pulumi.BoolPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this stack belongs to.
EnvironmentId pulumi.StringPtrInput
// Gitea branch to deploy.
GiteaBranch pulumi.StringPtrInput
// ID of the configured Gitea provider connection.
GiteaId pulumi.StringPtrInput
// Gitea repository owner.
GiteaOwner pulumi.StringPtrInput
// Gitea repository name.
GiteaRepository pulumi.StringPtrInput
// ID of the configured GitHub provider connection.
GithubId pulumi.StringPtrInput
// GitLab branch to deploy.
GitlabBranch pulumi.StringPtrInput
// ID of the configured GitLab provider connection.
GitlabId pulumi.StringPtrInput
// GitLab repository owner.
GitlabOwner pulumi.StringPtrInput
// Full GitLab namespace path.
GitlabPathNamespace pulumi.StringPtrInput
// Numeric GitLab project ID.
GitlabProjectId pulumi.IntPtrInput
// GitLab repository name.
GitlabRepository pulumi.StringPtrInput
// Run the stack on its own isolated Docker network.
IsolatedDeployment pulumi.BoolPtrInput
// Prefix volume names for isolated deployments. Retained for backwards compatibility.
IsolatedDeploymentsVolume pulumi.BoolPtrInput
// Display name of the stack.
Name pulumi.StringPtrInput
// GitHub repository owner.
Owner pulumi.StringPtrInput
// Append a random suffix to service and volume names.
Randomize pulumi.BoolPtrInput
// GitHub repository name.
Repository pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
SourceType pulumi.StringPtrInput
// Suffix appended to generated resource names.
Suffix pulumi.StringPtrInput
// What triggers an automatic deployment. Valid values: `push`, `tag`.
TriggerType pulumi.StringPtrInput
// Glob patterns that limit which changed paths trigger an automatic deployment.
WatchPaths pulumi.StringArrayInput
}
func (ComposeState) ElementType() reflect.Type {
return reflect.TypeOf((*composeState)(nil)).Elem()
}
type composeArgs struct {
// Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
AppName *string `pulumi:"appName"`
// Deploy automatically when the configured trigger fires.
AutoDeploy *bool `pulumi:"autoDeploy"`
// Bitbucket branch to deploy.
BitbucketBranch *string `pulumi:"bitbucketBranch"`
// ID of the configured Bitbucket provider connection.
BitbucketId *string `pulumi:"bitbucketId"`
// Bitbucket repository owner.
BitbucketOwner *string `pulumi:"bitbucketOwner"`
// Bitbucket repository name.
BitbucketRepository *string `pulumi:"bitbucketRepository"`
// Bitbucket repository slug.
BitbucketRepositorySlug *string `pulumi:"bitbucketRepositorySlug"`
// GitHub branch to deploy.
Branch *string `pulumi:"branch"`
// Custom `docker compose` command to run.
Command *string `pulumi:"command"`
// Inline Compose file contents. Used when `sourceType` is `raw`.
ComposeFile *string `pulumi:"composeFile"`
// Path to the Compose file within the repository.
ComposePath *string `pulumi:"composePath"`
// Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
ComposeType *string `pulumi:"composeType"`
// Branch to deploy for a custom Git remote.
CustomGitBranch *string `pulumi:"customGitBranch"`
// SSH key used to clone a private custom Git remote.
CustomGitSshKeyId *string `pulumi:"customGitSshKeyId"`
// Git remote URL, when `sourceType` is `git`.
CustomGitUrl *string `pulumi:"customGitUrl"`
// Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
DeleteVolumes *bool `pulumi:"deleteVolumes"`
// Free-form description.
Description *string `pulumi:"description"`
// Clone Git submodules when checking out the repository.
EnableSubmodules *bool `pulumi:"enableSubmodules"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this stack belongs to.
EnvironmentId string `pulumi:"environmentId"`
// Gitea branch to deploy.
GiteaBranch *string `pulumi:"giteaBranch"`
// ID of the configured Gitea provider connection.
GiteaId *string `pulumi:"giteaId"`
// Gitea repository owner.
GiteaOwner *string `pulumi:"giteaOwner"`
// Gitea repository name.
GiteaRepository *string `pulumi:"giteaRepository"`
// ID of the configured GitHub provider connection.
GithubId *string `pulumi:"githubId"`
// GitLab branch to deploy.
GitlabBranch *string `pulumi:"gitlabBranch"`
// ID of the configured GitLab provider connection.
GitlabId *string `pulumi:"gitlabId"`
// GitLab repository owner.
GitlabOwner *string `pulumi:"gitlabOwner"`
// Full GitLab namespace path.
GitlabPathNamespace *string `pulumi:"gitlabPathNamespace"`
// Numeric GitLab project ID.
GitlabProjectId *int `pulumi:"gitlabProjectId"`
// GitLab repository name.
GitlabRepository *string `pulumi:"gitlabRepository"`
// Run the stack on its own isolated Docker network.
IsolatedDeployment *bool `pulumi:"isolatedDeployment"`
// Prefix volume names for isolated deployments. Retained for backwards compatibility.
IsolatedDeploymentsVolume *bool `pulumi:"isolatedDeploymentsVolume"`
// Display name of the stack.
Name *string `pulumi:"name"`
// GitHub repository owner.
Owner *string `pulumi:"owner"`
// Append a random suffix to service and volume names.
Randomize *bool `pulumi:"randomize"`
// GitHub repository name.
Repository *string `pulumi:"repository"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
SourceType *string `pulumi:"sourceType"`
// Suffix appended to generated resource names.
Suffix *string `pulumi:"suffix"`
// What triggers an automatic deployment. Valid values: `push`, `tag`.
TriggerType *string `pulumi:"triggerType"`
// Glob patterns that limit which changed paths trigger an automatic deployment.
WatchPaths []string `pulumi:"watchPaths"`
}
// The set of arguments for constructing a Compose resource.
type ComposeArgs struct {
// Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
AppName pulumi.StringPtrInput
// Deploy automatically when the configured trigger fires.
AutoDeploy pulumi.BoolPtrInput
// Bitbucket branch to deploy.
BitbucketBranch pulumi.StringPtrInput
// ID of the configured Bitbucket provider connection.
BitbucketId pulumi.StringPtrInput
// Bitbucket repository owner.
BitbucketOwner pulumi.StringPtrInput
// Bitbucket repository name.
BitbucketRepository pulumi.StringPtrInput
// Bitbucket repository slug.
BitbucketRepositorySlug pulumi.StringPtrInput
// GitHub branch to deploy.
Branch pulumi.StringPtrInput
// Custom `docker compose` command to run.
Command pulumi.StringPtrInput
// Inline Compose file contents. Used when `sourceType` is `raw`.
ComposeFile pulumi.StringPtrInput
// Path to the Compose file within the repository.
ComposePath pulumi.StringPtrInput
// Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
ComposeType pulumi.StringPtrInput
// Branch to deploy for a custom Git remote.
CustomGitBranch pulumi.StringPtrInput
// SSH key used to clone a private custom Git remote.
CustomGitSshKeyId pulumi.StringPtrInput
// Git remote URL, when `sourceType` is `git`.
CustomGitUrl pulumi.StringPtrInput
// Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
DeleteVolumes pulumi.BoolPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Clone Git submodules when checking out the repository.
EnableSubmodules pulumi.BoolPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this stack belongs to.
EnvironmentId pulumi.StringInput
// Gitea branch to deploy.
GiteaBranch pulumi.StringPtrInput
// ID of the configured Gitea provider connection.
GiteaId pulumi.StringPtrInput
// Gitea repository owner.
GiteaOwner pulumi.StringPtrInput
// Gitea repository name.
GiteaRepository pulumi.StringPtrInput
// ID of the configured GitHub provider connection.
GithubId pulumi.StringPtrInput
// GitLab branch to deploy.
GitlabBranch pulumi.StringPtrInput
// ID of the configured GitLab provider connection.
GitlabId pulumi.StringPtrInput
// GitLab repository owner.
GitlabOwner pulumi.StringPtrInput
// Full GitLab namespace path.
GitlabPathNamespace pulumi.StringPtrInput
// Numeric GitLab project ID.
GitlabProjectId pulumi.IntPtrInput
// GitLab repository name.
GitlabRepository pulumi.StringPtrInput
// Run the stack on its own isolated Docker network.
IsolatedDeployment pulumi.BoolPtrInput
// Prefix volume names for isolated deployments. Retained for backwards compatibility.
IsolatedDeploymentsVolume pulumi.BoolPtrInput
// Display name of the stack.
Name pulumi.StringPtrInput
// GitHub repository owner.
Owner pulumi.StringPtrInput
// Append a random suffix to service and volume names.
Randomize pulumi.BoolPtrInput
// GitHub repository name.
Repository pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
SourceType pulumi.StringPtrInput
// Suffix appended to generated resource names.
Suffix pulumi.StringPtrInput
// What triggers an automatic deployment. Valid values: `push`, `tag`.
TriggerType pulumi.StringPtrInput
// Glob patterns that limit which changed paths trigger an automatic deployment.
WatchPaths pulumi.StringArrayInput
}
func (ComposeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*composeArgs)(nil)).Elem()
}
type ComposeInput interface {
pulumi.Input
ToComposeOutput() ComposeOutput
ToComposeOutputWithContext(ctx context.Context) ComposeOutput
}
func (*Compose) ElementType() reflect.Type {
return reflect.TypeOf((**Compose)(nil)).Elem()
}
func (i *Compose) ToComposeOutput() ComposeOutput {
return i.ToComposeOutputWithContext(context.Background())
}
func (i *Compose) ToComposeOutputWithContext(ctx context.Context) ComposeOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComposeOutput)
}
// ComposeArrayInput is an input type that accepts ComposeArray and ComposeArrayOutput values.
// You can construct a concrete instance of `ComposeArrayInput` via:
//
// ComposeArray{ ComposeArgs{...} }
type ComposeArrayInput interface {
pulumi.Input
ToComposeArrayOutput() ComposeArrayOutput
ToComposeArrayOutputWithContext(context.Context) ComposeArrayOutput
}
type ComposeArray []ComposeInput
func (ComposeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Compose)(nil)).Elem()
}
func (i ComposeArray) ToComposeArrayOutput() ComposeArrayOutput {
return i.ToComposeArrayOutputWithContext(context.Background())
}
func (i ComposeArray) ToComposeArrayOutputWithContext(ctx context.Context) ComposeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComposeArrayOutput)
}
// ComposeMapInput is an input type that accepts ComposeMap and ComposeMapOutput values.
// You can construct a concrete instance of `ComposeMapInput` via:
//
// ComposeMap{ "key": ComposeArgs{...} }
type ComposeMapInput interface {
pulumi.Input
ToComposeMapOutput() ComposeMapOutput
ToComposeMapOutputWithContext(context.Context) ComposeMapOutput
}
type ComposeMap map[string]ComposeInput
func (ComposeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Compose)(nil)).Elem()
}
func (i ComposeMap) ToComposeMapOutput() ComposeMapOutput {
return i.ToComposeMapOutputWithContext(context.Background())
}
func (i ComposeMap) ToComposeMapOutputWithContext(ctx context.Context) ComposeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComposeMapOutput)
}
type ComposeOutput struct{ *pulumi.OutputState }
func (ComposeOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Compose)(nil)).Elem()
}
func (o ComposeOutput) ToComposeOutput() ComposeOutput {
return o
}
func (o ComposeOutput) ToComposeOutputWithContext(ctx context.Context) ComposeOutput {
return o
}
// Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
func (o ComposeOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Deploy automatically when the configured trigger fires.
func (o ComposeOutput) AutoDeploy() pulumi.BoolOutput {
return o.ApplyT(func(v *Compose) pulumi.BoolOutput { return v.AutoDeploy }).(pulumi.BoolOutput)
}
// Bitbucket branch to deploy.
func (o ComposeOutput) BitbucketBranch() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.BitbucketBranch }).(pulumi.StringPtrOutput)
}
// ID of the configured Bitbucket provider connection.
func (o ComposeOutput) BitbucketId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.BitbucketId }).(pulumi.StringPtrOutput)
}
// Bitbucket repository owner.
func (o ComposeOutput) BitbucketOwner() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.BitbucketOwner }).(pulumi.StringPtrOutput)
}
// Bitbucket repository name.
func (o ComposeOutput) BitbucketRepository() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.BitbucketRepository }).(pulumi.StringPtrOutput)
}
// Bitbucket repository slug.
func (o ComposeOutput) BitbucketRepositorySlug() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.BitbucketRepositorySlug }).(pulumi.StringPtrOutput)
}
// GitHub branch to deploy.
func (o ComposeOutput) Branch() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.Branch }).(pulumi.StringPtrOutput)
}
// Custom `docker compose` command to run.
func (o ComposeOutput) Command() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.Command }).(pulumi.StringOutput)
}
// Inline Compose file contents. Used when `sourceType` is `raw`.
func (o ComposeOutput) ComposeFile() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.ComposeFile }).(pulumi.StringOutput)
}
// Path to the Compose file within the repository.
func (o ComposeOutput) ComposePath() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.ComposePath }).(pulumi.StringOutput)
}
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
func (o ComposeOutput) ComposeStatus() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.ComposeStatus }).(pulumi.StringOutput)
}
// Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
func (o ComposeOutput) ComposeType() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.ComposeType }).(pulumi.StringOutput)
}
// RFC 3339 timestamp of when the stack was created.
func (o ComposeOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Branch to deploy for a custom Git remote.
func (o ComposeOutput) CustomGitBranch() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.CustomGitBranch }).(pulumi.StringPtrOutput)
}
// SSH key used to clone a private custom Git remote.
func (o ComposeOutput) CustomGitSshKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.CustomGitSshKeyId }).(pulumi.StringPtrOutput)
}
// Git remote URL, when `sourceType` is `git`.
func (o ComposeOutput) CustomGitUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.CustomGitUrl }).(pulumi.StringPtrOutput)
}
// Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
func (o ComposeOutput) DeleteVolumes() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.BoolPtrOutput { return v.DeleteVolumes }).(pulumi.BoolPtrOutput)
}
// Free-form description.
func (o ComposeOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Clone Git submodules when checking out the repository.
func (o ComposeOutput) EnableSubmodules() pulumi.BoolOutput {
return o.ApplyT(func(v *Compose) pulumi.BoolOutput { return v.EnableSubmodules }).(pulumi.BoolOutput)
}
// Environment variables in `KEY=value` format, one per line.
func (o ComposeOutput) Env() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
}
// Environment this stack belongs to.
func (o ComposeOutput) EnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
}
// Gitea branch to deploy.
func (o ComposeOutput) GiteaBranch() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GiteaBranch }).(pulumi.StringPtrOutput)
}
// ID of the configured Gitea provider connection.
func (o ComposeOutput) GiteaId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GiteaId }).(pulumi.StringPtrOutput)
}
// Gitea repository owner.
func (o ComposeOutput) GiteaOwner() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GiteaOwner }).(pulumi.StringPtrOutput)
}
// Gitea repository name.
func (o ComposeOutput) GiteaRepository() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GiteaRepository }).(pulumi.StringPtrOutput)
}
// ID of the configured GitHub provider connection.
func (o ComposeOutput) GithubId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GithubId }).(pulumi.StringPtrOutput)
}
// GitLab branch to deploy.
func (o ComposeOutput) GitlabBranch() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GitlabBranch }).(pulumi.StringPtrOutput)
}
// ID of the configured GitLab provider connection.
func (o ComposeOutput) GitlabId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GitlabId }).(pulumi.StringPtrOutput)
}
// GitLab repository owner.
func (o ComposeOutput) GitlabOwner() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GitlabOwner }).(pulumi.StringPtrOutput)
}
// Full GitLab namespace path.
func (o ComposeOutput) GitlabPathNamespace() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GitlabPathNamespace }).(pulumi.StringPtrOutput)
}
// Numeric GitLab project ID.
func (o ComposeOutput) GitlabProjectId() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.IntPtrOutput { return v.GitlabProjectId }).(pulumi.IntPtrOutput)
}
// GitLab repository name.
func (o ComposeOutput) GitlabRepository() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.GitlabRepository }).(pulumi.StringPtrOutput)
}
// Run the stack on its own isolated Docker network.
func (o ComposeOutput) IsolatedDeployment() pulumi.BoolOutput {
return o.ApplyT(func(v *Compose) pulumi.BoolOutput { return v.IsolatedDeployment }).(pulumi.BoolOutput)
}
// Prefix volume names for isolated deployments. Retained for backwards compatibility.
func (o ComposeOutput) IsolatedDeploymentsVolume() pulumi.BoolOutput {
return o.ApplyT(func(v *Compose) pulumi.BoolOutput { return v.IsolatedDeploymentsVolume }).(pulumi.BoolOutput)
}
// Display name of the stack.
func (o ComposeOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// GitHub repository owner.
func (o ComposeOutput) Owner() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.Owner }).(pulumi.StringPtrOutput)
}
// Append a random suffix to service and volume names.
func (o ComposeOutput) Randomize() pulumi.BoolOutput {
return o.ApplyT(func(v *Compose) pulumi.BoolOutput { return v.Randomize }).(pulumi.BoolOutput)
}
// GitHub repository name.
func (o ComposeOutput) Repository() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.Repository }).(pulumi.StringPtrOutput)
}
// Remote server to deploy on. Omit to use the Dokploy host itself.
func (o ComposeOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Compose) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
func (o ComposeOutput) SourceType() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.SourceType }).(pulumi.StringOutput)
}
// Suffix appended to generated resource names.
func (o ComposeOutput) Suffix() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.Suffix }).(pulumi.StringOutput)
}
// What triggers an automatic deployment. Valid values: `push`, `tag`.
func (o ComposeOutput) TriggerType() pulumi.StringOutput {
return o.ApplyT(func(v *Compose) pulumi.StringOutput { return v.TriggerType }).(pulumi.StringOutput)
}
// Glob patterns that limit which changed paths trigger an automatic deployment.
func (o ComposeOutput) WatchPaths() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Compose) pulumi.StringArrayOutput { return v.WatchPaths }).(pulumi.StringArrayOutput)
}
type ComposeArrayOutput struct{ *pulumi.OutputState }
func (ComposeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Compose)(nil)).Elem()
}
func (o ComposeArrayOutput) ToComposeArrayOutput() ComposeArrayOutput {
return o
}
func (o ComposeArrayOutput) ToComposeArrayOutputWithContext(ctx context.Context) ComposeArrayOutput {
return o
}
func (o ComposeArrayOutput) Index(i pulumi.IntInput) ComposeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Compose {
return vs[0].([]*Compose)[vs[1].(int)]
}).(ComposeOutput)
}
type ComposeMapOutput struct{ *pulumi.OutputState }
func (ComposeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Compose)(nil)).Elem()
}
func (o ComposeMapOutput) ToComposeMapOutput() ComposeMapOutput {
return o
}
func (o ComposeMapOutput) ToComposeMapOutputWithContext(ctx context.Context) ComposeMapOutput {
return o
}
func (o ComposeMapOutput) MapIndex(k pulumi.StringInput) ComposeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Compose {
return vs[0].(map[string]*Compose)[vs[1].(string)]
}).(ComposeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ComposeInput)(nil)).Elem(), &Compose{})
pulumi.RegisterInputType(reflect.TypeOf((*ComposeArrayInput)(nil)).Elem(), ComposeArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ComposeMapInput)(nil)).Elem(), ComposeMap{})
pulumi.RegisterOutputType(ComposeOutput{})
pulumi.RegisterOutputType(ComposeArrayOutput{})
pulumi.RegisterOutputType(ComposeMapOutput{})
}

56
sdk/go/dokploy/config/config.go generated Normal file
View File

@@ -0,0 +1,56 @@
// 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 config
import (
"github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
var _ = internal.GetEnvOrDefault
// API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
func GetApiKey(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "dokploy:apiKey")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "DOKPLOY_API_KEY"); d != nil {
value = d.(string)
}
return value
}
// Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
func GetHost(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "dokploy:host")
if err == nil {
return v
}
var value string
if d := internal.GetEnvOrDefault(nil, nil, "DOKPLOY_HOST"); d != nil {
value = d.(string)
}
return value
}
// Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
func GetInsecureSkipVerify(ctx *pulumi.Context) bool {
return config.GetBool(ctx, "dokploy:insecureSkipVerify")
}
// Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
func GetTimeoutSeconds(ctx *pulumi.Context) int {
v, err := config.TryInt(ctx, "dokploy:timeoutSeconds")
if err == nil {
return v
}
var value int
if d := internal.GetEnvOrDefault(nil, internal.ParseEnvInt, "DOKPLOY_TIMEOUT_SECONDS"); d != nil {
value = d.(int)
}
return value
}

368
sdk/go/dokploy/destination.go generated Normal file
View File

@@ -0,0 +1,368 @@
// 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"
)
type Destination struct {
pulumi.CustomResourceState
// S3 access key ID.
AccessKey pulumi.StringOutput `pulumi:"accessKey"`
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags pulumi.StringArrayOutput `pulumi:"additionalFlags"`
// Bucket name.
Bucket pulumi.StringOutput `pulumi:"bucket"`
// Timestamp of when the destination was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// S3 endpoint URL.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// Display name of the destination.
Name pulumi.StringOutput `pulumi:"name"`
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName pulumi.StringPtrOutput `pulumi:"providerName"`
// Bucket region, for example `us-east-1`.
Region pulumi.StringOutput `pulumi:"region"`
// S3 secret access key.
SecretAccessKey pulumi.StringOutput `pulumi:"secretAccessKey"`
// Server this destination is scoped to.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
}
// NewDestination registers a new resource with the given unique name, arguments, and options.
func NewDestination(ctx *pulumi.Context,
name string, args *DestinationArgs, opts ...pulumi.ResourceOption) (*Destination, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccessKey == nil {
return nil, errors.New("invalid value for required argument 'AccessKey'")
}
if args.Bucket == nil {
return nil, errors.New("invalid value for required argument 'Bucket'")
}
if args.Endpoint == nil {
return nil, errors.New("invalid value for required argument 'Endpoint'")
}
if args.Region == nil {
return nil, errors.New("invalid value for required argument 'Region'")
}
if args.SecretAccessKey == nil {
return nil, errors.New("invalid value for required argument 'SecretAccessKey'")
}
if args.SecretAccessKey != nil {
args.SecretAccessKey = pulumi.ToSecret(args.SecretAccessKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"secretAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Destination
err := ctx.RegisterResource("dokploy:index/destination:Destination", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDestination gets an existing Destination 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 GetDestination(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DestinationState, opts ...pulumi.ResourceOption) (*Destination, error) {
var resource Destination
err := ctx.ReadResource("dokploy:index/destination:Destination", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Destination resources.
type destinationState struct {
// S3 access key ID.
AccessKey *string `pulumi:"accessKey"`
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags []string `pulumi:"additionalFlags"`
// Bucket name.
Bucket *string `pulumi:"bucket"`
// Timestamp of when the destination was created.
CreatedAt *string `pulumi:"createdAt"`
// S3 endpoint URL.
Endpoint *string `pulumi:"endpoint"`
// Display name of the destination.
Name *string `pulumi:"name"`
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName *string `pulumi:"providerName"`
// Bucket region, for example `us-east-1`.
Region *string `pulumi:"region"`
// S3 secret access key.
SecretAccessKey *string `pulumi:"secretAccessKey"`
// Server this destination is scoped to.
ServerId *string `pulumi:"serverId"`
}
type DestinationState struct {
// S3 access key ID.
AccessKey pulumi.StringPtrInput
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags pulumi.StringArrayInput
// Bucket name.
Bucket pulumi.StringPtrInput
// Timestamp of when the destination was created.
CreatedAt pulumi.StringPtrInput
// S3 endpoint URL.
Endpoint pulumi.StringPtrInput
// Display name of the destination.
Name pulumi.StringPtrInput
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName pulumi.StringPtrInput
// Bucket region, for example `us-east-1`.
Region pulumi.StringPtrInput
// S3 secret access key.
SecretAccessKey pulumi.StringPtrInput
// Server this destination is scoped to.
ServerId pulumi.StringPtrInput
}
func (DestinationState) ElementType() reflect.Type {
return reflect.TypeOf((*destinationState)(nil)).Elem()
}
type destinationArgs struct {
// S3 access key ID.
AccessKey string `pulumi:"accessKey"`
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags []string `pulumi:"additionalFlags"`
// Bucket name.
Bucket string `pulumi:"bucket"`
// S3 endpoint URL.
Endpoint string `pulumi:"endpoint"`
// Display name of the destination.
Name *string `pulumi:"name"`
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName *string `pulumi:"providerName"`
// Bucket region, for example `us-east-1`.
Region string `pulumi:"region"`
// S3 secret access key.
SecretAccessKey string `pulumi:"secretAccessKey"`
// Server this destination is scoped to.
ServerId *string `pulumi:"serverId"`
}
// The set of arguments for constructing a Destination resource.
type DestinationArgs struct {
// S3 access key ID.
AccessKey pulumi.StringInput
// Extra flags passed to the underlying `rclone` invocation.
AdditionalFlags pulumi.StringArrayInput
// Bucket name.
Bucket pulumi.StringInput
// S3 endpoint URL.
Endpoint pulumi.StringInput
// Display name of the destination.
Name pulumi.StringPtrInput
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
ProviderName pulumi.StringPtrInput
// Bucket region, for example `us-east-1`.
Region pulumi.StringInput
// S3 secret access key.
SecretAccessKey pulumi.StringInput
// Server this destination is scoped to.
ServerId pulumi.StringPtrInput
}
func (DestinationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*destinationArgs)(nil)).Elem()
}
type DestinationInput interface {
pulumi.Input
ToDestinationOutput() DestinationOutput
ToDestinationOutputWithContext(ctx context.Context) DestinationOutput
}
func (*Destination) ElementType() reflect.Type {
return reflect.TypeOf((**Destination)(nil)).Elem()
}
func (i *Destination) ToDestinationOutput() DestinationOutput {
return i.ToDestinationOutputWithContext(context.Background())
}
func (i *Destination) ToDestinationOutputWithContext(ctx context.Context) DestinationOutput {
return pulumi.ToOutputWithContext(ctx, i).(DestinationOutput)
}
// DestinationArrayInput is an input type that accepts DestinationArray and DestinationArrayOutput values.
// You can construct a concrete instance of `DestinationArrayInput` via:
//
// DestinationArray{ DestinationArgs{...} }
type DestinationArrayInput interface {
pulumi.Input
ToDestinationArrayOutput() DestinationArrayOutput
ToDestinationArrayOutputWithContext(context.Context) DestinationArrayOutput
}
type DestinationArray []DestinationInput
func (DestinationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Destination)(nil)).Elem()
}
func (i DestinationArray) ToDestinationArrayOutput() DestinationArrayOutput {
return i.ToDestinationArrayOutputWithContext(context.Background())
}
func (i DestinationArray) ToDestinationArrayOutputWithContext(ctx context.Context) DestinationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DestinationArrayOutput)
}
// DestinationMapInput is an input type that accepts DestinationMap and DestinationMapOutput values.
// You can construct a concrete instance of `DestinationMapInput` via:
//
// DestinationMap{ "key": DestinationArgs{...} }
type DestinationMapInput interface {
pulumi.Input
ToDestinationMapOutput() DestinationMapOutput
ToDestinationMapOutputWithContext(context.Context) DestinationMapOutput
}
type DestinationMap map[string]DestinationInput
func (DestinationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Destination)(nil)).Elem()
}
func (i DestinationMap) ToDestinationMapOutput() DestinationMapOutput {
return i.ToDestinationMapOutputWithContext(context.Background())
}
func (i DestinationMap) ToDestinationMapOutputWithContext(ctx context.Context) DestinationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DestinationMapOutput)
}
type DestinationOutput struct{ *pulumi.OutputState }
func (DestinationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Destination)(nil)).Elem()
}
func (o DestinationOutput) ToDestinationOutput() DestinationOutput {
return o
}
func (o DestinationOutput) ToDestinationOutputWithContext(ctx context.Context) DestinationOutput {
return o
}
// S3 access key ID.
func (o DestinationOutput) AccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.AccessKey }).(pulumi.StringOutput)
}
// Extra flags passed to the underlying `rclone` invocation.
func (o DestinationOutput) AdditionalFlags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Destination) pulumi.StringArrayOutput { return v.AdditionalFlags }).(pulumi.StringArrayOutput)
}
// Bucket name.
func (o DestinationOutput) Bucket() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Bucket }).(pulumi.StringOutput)
}
// Timestamp of when the destination was created.
func (o DestinationOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// S3 endpoint URL.
func (o DestinationOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// Display name of the destination.
func (o DestinationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
func (o DestinationOutput) ProviderName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Destination) pulumi.StringPtrOutput { return v.ProviderName }).(pulumi.StringPtrOutput)
}
// Bucket region, for example `us-east-1`.
func (o DestinationOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// S3 secret access key.
func (o DestinationOutput) SecretAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Destination) pulumi.StringOutput { return v.SecretAccessKey }).(pulumi.StringOutput)
}
// Server this destination is scoped to.
func (o DestinationOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Destination) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
type DestinationArrayOutput struct{ *pulumi.OutputState }
func (DestinationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Destination)(nil)).Elem()
}
func (o DestinationArrayOutput) ToDestinationArrayOutput() DestinationArrayOutput {
return o
}
func (o DestinationArrayOutput) ToDestinationArrayOutputWithContext(ctx context.Context) DestinationArrayOutput {
return o
}
func (o DestinationArrayOutput) Index(i pulumi.IntInput) DestinationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Destination {
return vs[0].([]*Destination)[vs[1].(int)]
}).(DestinationOutput)
}
type DestinationMapOutput struct{ *pulumi.OutputState }
func (DestinationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Destination)(nil)).Elem()
}
func (o DestinationMapOutput) ToDestinationMapOutput() DestinationMapOutput {
return o
}
func (o DestinationMapOutput) ToDestinationMapOutputWithContext(ctx context.Context) DestinationMapOutput {
return o
}
func (o DestinationMapOutput) MapIndex(k pulumi.StringInput) DestinationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Destination {
return vs[0].(map[string]*Destination)[vs[1].(string)]
}).(DestinationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DestinationInput)(nil)).Elem(), &Destination{})
pulumi.RegisterInputType(reflect.TypeOf((*DestinationArrayInput)(nil)).Elem(), DestinationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DestinationMapInput)(nil)).Elem(), DestinationMap{})
pulumi.RegisterOutputType(DestinationOutput{})
pulumi.RegisterOutputType(DestinationArrayOutput{})
pulumi.RegisterOutputType(DestinationMapOutput{})
}

2
sdk/go/dokploy/doc.go generated Normal file
View File

@@ -0,0 +1,2 @@
// A Pulumi package for creating and managing Dokploy resources
package dokploy

454
sdk/go/dokploy/domain.go generated Normal file
View File

@@ -0,0 +1,454 @@
// 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"
)
type Domain struct {
pulumi.CustomResourceState
// Application this domain routes to.
ApplicationId pulumi.StringPtrOutput `pulumi:"applicationId"`
// How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
CertificateType pulumi.StringOutput `pulumi:"certificateType"`
// Compose stack this domain routes to.
ComposeId pulumi.StringPtrOutput `pulumi:"composeId"`
// RFC 3339 timestamp of when the domain was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Traefik certificate resolver name, when `certificateType` is `custom`.
CustomCertResolver pulumi.StringPtrOutput `pulumi:"customCertResolver"`
// Traefik entrypoint to bind, when not using the defaults.
CustomEntrypoint pulumi.StringPtrOutput `pulumi:"customEntrypoint"`
// What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
DomainType pulumi.StringOutput `pulumi:"domainType"`
// Protect this domain with Dokploy's forward auth.
ForwardAuthEnabled pulumi.BoolOutput `pulumi:"forwardAuthEnabled"`
// Fully-qualified hostname, for example `api.example.com`.
Host pulumi.StringOutput `pulumi:"host"`
// Serve the domain over HTTPS and redirect HTTP traffic to it.
Https pulumi.BoolOutput `pulumi:"https"`
// Path the request is rewritten to before it reaches the container, defaults to `/`.
InternalPath pulumi.StringOutput `pulumi:"internalPath"`
// Names of Traefik middlewares to apply.
Middlewares pulumi.StringArrayOutput `pulumi:"middlewares"`
// Path prefix this domain routes, defaults to `/`.
Path pulumi.StringOutput `pulumi:"path"`
// Container port that receives the traffic, defaults to `3000`.
Port pulumi.IntOutput `pulumi:"port"`
// Preview deployment this domain routes to.
PreviewDeploymentId pulumi.StringPtrOutput `pulumi:"previewDeploymentId"`
// Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
ServiceName pulumi.StringPtrOutput `pulumi:"serviceName"`
// Strip `path` from the request before forwarding it.
StripPath pulumi.BoolOutput `pulumi:"stripPath"`
}
// NewDomain registers a new resource with the given unique name, arguments, and options.
func NewDomain(ctx *pulumi.Context,
name string, args *DomainArgs, opts ...pulumi.ResourceOption) (*Domain, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Host == nil {
return nil, errors.New("invalid value for required argument 'Host'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Domain
err := ctx.RegisterResource("dokploy:index/domain:Domain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDomain gets an existing Domain 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 GetDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DomainState, opts ...pulumi.ResourceOption) (*Domain, error) {
var resource Domain
err := ctx.ReadResource("dokploy:index/domain:Domain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Domain resources.
type domainState struct {
// Application this domain routes to.
ApplicationId *string `pulumi:"applicationId"`
// How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
CertificateType *string `pulumi:"certificateType"`
// Compose stack this domain routes to.
ComposeId *string `pulumi:"composeId"`
// RFC 3339 timestamp of when the domain was created.
CreatedAt *string `pulumi:"createdAt"`
// Traefik certificate resolver name, when `certificateType` is `custom`.
CustomCertResolver *string `pulumi:"customCertResolver"`
// Traefik entrypoint to bind, when not using the defaults.
CustomEntrypoint *string `pulumi:"customEntrypoint"`
// What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
DomainType *string `pulumi:"domainType"`
// Protect this domain with Dokploy's forward auth.
ForwardAuthEnabled *bool `pulumi:"forwardAuthEnabled"`
// Fully-qualified hostname, for example `api.example.com`.
Host *string `pulumi:"host"`
// Serve the domain over HTTPS and redirect HTTP traffic to it.
Https *bool `pulumi:"https"`
// Path the request is rewritten to before it reaches the container, defaults to `/`.
InternalPath *string `pulumi:"internalPath"`
// Names of Traefik middlewares to apply.
Middlewares []string `pulumi:"middlewares"`
// Path prefix this domain routes, defaults to `/`.
Path *string `pulumi:"path"`
// Container port that receives the traffic, defaults to `3000`.
Port *int `pulumi:"port"`
// Preview deployment this domain routes to.
PreviewDeploymentId *string `pulumi:"previewDeploymentId"`
// Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
ServiceName *string `pulumi:"serviceName"`
// Strip `path` from the request before forwarding it.
StripPath *bool `pulumi:"stripPath"`
}
type DomainState struct {
// Application this domain routes to.
ApplicationId pulumi.StringPtrInput
// How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
CertificateType pulumi.StringPtrInput
// Compose stack this domain routes to.
ComposeId pulumi.StringPtrInput
// RFC 3339 timestamp of when the domain was created.
CreatedAt pulumi.StringPtrInput
// Traefik certificate resolver name, when `certificateType` is `custom`.
CustomCertResolver pulumi.StringPtrInput
// Traefik entrypoint to bind, when not using the defaults.
CustomEntrypoint pulumi.StringPtrInput
// What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
DomainType pulumi.StringPtrInput
// Protect this domain with Dokploy's forward auth.
ForwardAuthEnabled pulumi.BoolPtrInput
// Fully-qualified hostname, for example `api.example.com`.
Host pulumi.StringPtrInput
// Serve the domain over HTTPS and redirect HTTP traffic to it.
Https pulumi.BoolPtrInput
// Path the request is rewritten to before it reaches the container, defaults to `/`.
InternalPath pulumi.StringPtrInput
// Names of Traefik middlewares to apply.
Middlewares pulumi.StringArrayInput
// Path prefix this domain routes, defaults to `/`.
Path pulumi.StringPtrInput
// Container port that receives the traffic, defaults to `3000`.
Port pulumi.IntPtrInput
// Preview deployment this domain routes to.
PreviewDeploymentId pulumi.StringPtrInput
// Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
ServiceName pulumi.StringPtrInput
// Strip `path` from the request before forwarding it.
StripPath pulumi.BoolPtrInput
}
func (DomainState) ElementType() reflect.Type {
return reflect.TypeOf((*domainState)(nil)).Elem()
}
type domainArgs struct {
// Application this domain routes to.
ApplicationId *string `pulumi:"applicationId"`
// How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
CertificateType *string `pulumi:"certificateType"`
// Compose stack this domain routes to.
ComposeId *string `pulumi:"composeId"`
// Traefik certificate resolver name, when `certificateType` is `custom`.
CustomCertResolver *string `pulumi:"customCertResolver"`
// Traefik entrypoint to bind, when not using the defaults.
CustomEntrypoint *string `pulumi:"customEntrypoint"`
// What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
DomainType *string `pulumi:"domainType"`
// Protect this domain with Dokploy's forward auth.
ForwardAuthEnabled *bool `pulumi:"forwardAuthEnabled"`
// Fully-qualified hostname, for example `api.example.com`.
Host string `pulumi:"host"`
// Serve the domain over HTTPS and redirect HTTP traffic to it.
Https *bool `pulumi:"https"`
// Path the request is rewritten to before it reaches the container, defaults to `/`.
InternalPath *string `pulumi:"internalPath"`
// Names of Traefik middlewares to apply.
Middlewares []string `pulumi:"middlewares"`
// Path prefix this domain routes, defaults to `/`.
Path *string `pulumi:"path"`
// Container port that receives the traffic, defaults to `3000`.
Port *int `pulumi:"port"`
// Preview deployment this domain routes to.
PreviewDeploymentId *string `pulumi:"previewDeploymentId"`
// Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
ServiceName *string `pulumi:"serviceName"`
// Strip `path` from the request before forwarding it.
StripPath *bool `pulumi:"stripPath"`
}
// The set of arguments for constructing a Domain resource.
type DomainArgs struct {
// Application this domain routes to.
ApplicationId pulumi.StringPtrInput
// How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
CertificateType pulumi.StringPtrInput
// Compose stack this domain routes to.
ComposeId pulumi.StringPtrInput
// Traefik certificate resolver name, when `certificateType` is `custom`.
CustomCertResolver pulumi.StringPtrInput
// Traefik entrypoint to bind, when not using the defaults.
CustomEntrypoint pulumi.StringPtrInput
// What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
DomainType pulumi.StringPtrInput
// Protect this domain with Dokploy's forward auth.
ForwardAuthEnabled pulumi.BoolPtrInput
// Fully-qualified hostname, for example `api.example.com`.
Host pulumi.StringInput
// Serve the domain over HTTPS and redirect HTTP traffic to it.
Https pulumi.BoolPtrInput
// Path the request is rewritten to before it reaches the container, defaults to `/`.
InternalPath pulumi.StringPtrInput
// Names of Traefik middlewares to apply.
Middlewares pulumi.StringArrayInput
// Path prefix this domain routes, defaults to `/`.
Path pulumi.StringPtrInput
// Container port that receives the traffic, defaults to `3000`.
Port pulumi.IntPtrInput
// Preview deployment this domain routes to.
PreviewDeploymentId pulumi.StringPtrInput
// Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
ServiceName pulumi.StringPtrInput
// Strip `path` from the request before forwarding it.
StripPath pulumi.BoolPtrInput
}
func (DomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*domainArgs)(nil)).Elem()
}
type DomainInput interface {
pulumi.Input
ToDomainOutput() DomainOutput
ToDomainOutputWithContext(ctx context.Context) DomainOutput
}
func (*Domain) ElementType() reflect.Type {
return reflect.TypeOf((**Domain)(nil)).Elem()
}
func (i *Domain) ToDomainOutput() DomainOutput {
return i.ToDomainOutputWithContext(context.Background())
}
func (i *Domain) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainOutput)
}
// DomainArrayInput is an input type that accepts DomainArray and DomainArrayOutput values.
// You can construct a concrete instance of `DomainArrayInput` via:
//
// DomainArray{ DomainArgs{...} }
type DomainArrayInput interface {
pulumi.Input
ToDomainArrayOutput() DomainArrayOutput
ToDomainArrayOutputWithContext(context.Context) DomainArrayOutput
}
type DomainArray []DomainInput
func (DomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Domain)(nil)).Elem()
}
func (i DomainArray) ToDomainArrayOutput() DomainArrayOutput {
return i.ToDomainArrayOutputWithContext(context.Background())
}
func (i DomainArray) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainArrayOutput)
}
// DomainMapInput is an input type that accepts DomainMap and DomainMapOutput values.
// You can construct a concrete instance of `DomainMapInput` via:
//
// DomainMap{ "key": DomainArgs{...} }
type DomainMapInput interface {
pulumi.Input
ToDomainMapOutput() DomainMapOutput
ToDomainMapOutputWithContext(context.Context) DomainMapOutput
}
type DomainMap map[string]DomainInput
func (DomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
}
func (i DomainMap) ToDomainMapOutput() DomainMapOutput {
return i.ToDomainMapOutputWithContext(context.Background())
}
func (i DomainMap) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainMapOutput)
}
type DomainOutput struct{ *pulumi.OutputState }
func (DomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Domain)(nil)).Elem()
}
func (o DomainOutput) ToDomainOutput() DomainOutput {
return o
}
func (o DomainOutput) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
return o
}
// Application this domain routes to.
func (o DomainOutput) ApplicationId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.ApplicationId }).(pulumi.StringPtrOutput)
}
// How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
func (o DomainOutput) CertificateType() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.CertificateType }).(pulumi.StringOutput)
}
// Compose stack this domain routes to.
func (o DomainOutput) ComposeId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.ComposeId }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the domain was created.
func (o DomainOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Traefik certificate resolver name, when `certificateType` is `custom`.
func (o DomainOutput) CustomCertResolver() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.CustomCertResolver }).(pulumi.StringPtrOutput)
}
// Traefik entrypoint to bind, when not using the defaults.
func (o DomainOutput) CustomEntrypoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.CustomEntrypoint }).(pulumi.StringPtrOutput)
}
// What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
func (o DomainOutput) DomainType() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.DomainType }).(pulumi.StringOutput)
}
// Protect this domain with Dokploy's forward auth.
func (o DomainOutput) ForwardAuthEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolOutput { return v.ForwardAuthEnabled }).(pulumi.BoolOutput)
}
// Fully-qualified hostname, for example `api.example.com`.
func (o DomainOutput) Host() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Host }).(pulumi.StringOutput)
}
// Serve the domain over HTTPS and redirect HTTP traffic to it.
func (o DomainOutput) Https() pulumi.BoolOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolOutput { return v.Https }).(pulumi.BoolOutput)
}
// Path the request is rewritten to before it reaches the container, defaults to `/`.
func (o DomainOutput) InternalPath() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.InternalPath }).(pulumi.StringOutput)
}
// Names of Traefik middlewares to apply.
func (o DomainOutput) Middlewares() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Domain) pulumi.StringArrayOutput { return v.Middlewares }).(pulumi.StringArrayOutput)
}
// Path prefix this domain routes, defaults to `/`.
func (o DomainOutput) Path() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Path }).(pulumi.StringOutput)
}
// Container port that receives the traffic, defaults to `3000`.
func (o DomainOutput) Port() pulumi.IntOutput {
return o.ApplyT(func(v *Domain) pulumi.IntOutput { return v.Port }).(pulumi.IntOutput)
}
// Preview deployment this domain routes to.
func (o DomainOutput) PreviewDeploymentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.PreviewDeploymentId }).(pulumi.StringPtrOutput)
}
// Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
func (o DomainOutput) ServiceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.ServiceName }).(pulumi.StringPtrOutput)
}
// Strip `path` from the request before forwarding it.
func (o DomainOutput) StripPath() pulumi.BoolOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolOutput { return v.StripPath }).(pulumi.BoolOutput)
}
type DomainArrayOutput struct{ *pulumi.OutputState }
func (DomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Domain)(nil)).Elem()
}
func (o DomainArrayOutput) ToDomainArrayOutput() DomainArrayOutput {
return o
}
func (o DomainArrayOutput) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
return o
}
func (o DomainArrayOutput) Index(i pulumi.IntInput) DomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Domain {
return vs[0].([]*Domain)[vs[1].(int)]
}).(DomainOutput)
}
type DomainMapOutput struct{ *pulumi.OutputState }
func (DomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
}
func (o DomainMapOutput) ToDomainMapOutput() DomainMapOutput {
return o
}
func (o DomainMapOutput) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
return o
}
func (o DomainMapOutput) MapIndex(k pulumi.StringInput) DomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Domain {
return vs[0].(map[string]*Domain)[vs[1].(string)]
}).(DomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DomainInput)(nil)).Elem(), &Domain{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainArrayInput)(nil)).Elem(), DomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainMapInput)(nil)).Elem(), DomainMap{})
pulumi.RegisterOutputType(DomainOutput{})
pulumi.RegisterOutputType(DomainArrayOutput{})
pulumi.RegisterOutputType(DomainMapOutput{})
}

285
sdk/go/dokploy/environment.go generated Normal file
View File

@@ -0,0 +1,285 @@
// 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"
)
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{})
}

113
sdk/go/dokploy/getApplication.go generated Normal file
View File

@@ -0,0 +1,113 @@
// 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"
)
func LookupApplication(ctx *pulumi.Context, args *LookupApplicationArgs, opts ...pulumi.InvokeOption) (*LookupApplicationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupApplicationResult
err := ctx.Invoke("dokploy:index/getApplication:getApplication", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApplication.
type LookupApplicationArgs struct {
Id string `pulumi:"id"`
}
// A collection of values returned by getApplication.
type LookupApplicationResult struct {
AppName string `pulumi:"appName"`
ApplicationStatus string `pulumi:"applicationStatus"`
BuildType string `pulumi:"buildType"`
CreatedAt string `pulumi:"createdAt"`
Description string `pulumi:"description"`
EnvironmentId string `pulumi:"environmentId"`
Id string `pulumi:"id"`
Name string `pulumi:"name"`
SourceType string `pulumi:"sourceType"`
}
func LookupApplicationOutput(ctx *pulumi.Context, args LookupApplicationOutputArgs, opts ...pulumi.InvokeOption) LookupApplicationResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupApplicationResultOutput, error) {
args := v.(LookupApplicationArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("dokploy:index/getApplication:getApplication", args, LookupApplicationResultOutput{}, options).(LookupApplicationResultOutput), nil
}).(LookupApplicationResultOutput)
}
// A collection of arguments for invoking getApplication.
type LookupApplicationOutputArgs struct {
Id pulumi.StringInput `pulumi:"id"`
}
func (LookupApplicationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApplicationArgs)(nil)).Elem()
}
// A collection of values returned by getApplication.
type LookupApplicationResultOutput struct{ *pulumi.OutputState }
func (LookupApplicationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApplicationResult)(nil)).Elem()
}
func (o LookupApplicationResultOutput) ToLookupApplicationResultOutput() LookupApplicationResultOutput {
return o
}
func (o LookupApplicationResultOutput) ToLookupApplicationResultOutputWithContext(ctx context.Context) LookupApplicationResultOutput {
return o
}
func (o LookupApplicationResultOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.AppName }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) ApplicationStatus() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.ApplicationStatus }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) BuildType() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.BuildType }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.Description }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) EnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.EnvironmentId }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) SourceType() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.SourceType }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupApplicationResultOutput{})
}

103
sdk/go/dokploy/getEnvironment.go generated Normal file
View File

@@ -0,0 +1,103 @@
// 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"
)
func LookupEnvironment(ctx *pulumi.Context, args *LookupEnvironmentArgs, opts ...pulumi.InvokeOption) (*LookupEnvironmentResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupEnvironmentResult
err := ctx.Invoke("dokploy:index/getEnvironment:getEnvironment", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getEnvironment.
type LookupEnvironmentArgs struct {
Id string `pulumi:"id"`
}
// A collection of values returned by getEnvironment.
type LookupEnvironmentResult struct {
CreatedAt string `pulumi:"createdAt"`
Description string `pulumi:"description"`
Env string `pulumi:"env"`
Id string `pulumi:"id"`
IsDefault bool `pulumi:"isDefault"`
Name string `pulumi:"name"`
ProjectId string `pulumi:"projectId"`
}
func LookupEnvironmentOutput(ctx *pulumi.Context, args LookupEnvironmentOutputArgs, opts ...pulumi.InvokeOption) LookupEnvironmentResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupEnvironmentResultOutput, error) {
args := v.(LookupEnvironmentArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("dokploy:index/getEnvironment:getEnvironment", args, LookupEnvironmentResultOutput{}, options).(LookupEnvironmentResultOutput), nil
}).(LookupEnvironmentResultOutput)
}
// A collection of arguments for invoking getEnvironment.
type LookupEnvironmentOutputArgs struct {
Id pulumi.StringInput `pulumi:"id"`
}
func (LookupEnvironmentOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEnvironmentArgs)(nil)).Elem()
}
// A collection of values returned by getEnvironment.
type LookupEnvironmentResultOutput struct{ *pulumi.OutputState }
func (LookupEnvironmentResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEnvironmentResult)(nil)).Elem()
}
func (o LookupEnvironmentResultOutput) ToLookupEnvironmentResultOutput() LookupEnvironmentResultOutput {
return o
}
func (o LookupEnvironmentResultOutput) ToLookupEnvironmentResultOutputWithContext(ctx context.Context) LookupEnvironmentResultOutput {
return o
}
func (o LookupEnvironmentResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
func (o LookupEnvironmentResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.Description }).(pulumi.StringOutput)
}
func (o LookupEnvironmentResultOutput) Env() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.Env }).(pulumi.StringOutput)
}
func (o LookupEnvironmentResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupEnvironmentResultOutput) IsDefault() pulumi.BoolOutput {
return o.ApplyT(func(v LookupEnvironmentResult) bool { return v.IsDefault }).(pulumi.BoolOutput)
}
func (o LookupEnvironmentResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupEnvironmentResultOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.ProjectId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupEnvironmentResultOutput{})
}

108
sdk/go/dokploy/getProject.go generated Normal file
View File

@@ -0,0 +1,108 @@
// 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"
)
func LookupProject(ctx *pulumi.Context, args *LookupProjectArgs, opts ...pulumi.InvokeOption) (*LookupProjectResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupProjectResult
err := ctx.Invoke("dokploy:index/getProject:getProject", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getProject.
type LookupProjectArgs struct {
Id string `pulumi:"id"`
}
// A collection of values returned by getProject.
type LookupProjectResult struct {
CreatedAt string `pulumi:"createdAt"`
DefaultEnvironmentId string `pulumi:"defaultEnvironmentId"`
Description string `pulumi:"description"`
Env string `pulumi:"env"`
Environments []GetProjectEnvironment `pulumi:"environments"`
Id string `pulumi:"id"`
Name string `pulumi:"name"`
OrganizationId string `pulumi:"organizationId"`
}
func LookupProjectOutput(ctx *pulumi.Context, args LookupProjectOutputArgs, opts ...pulumi.InvokeOption) LookupProjectResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupProjectResultOutput, error) {
args := v.(LookupProjectArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("dokploy:index/getProject:getProject", args, LookupProjectResultOutput{}, options).(LookupProjectResultOutput), nil
}).(LookupProjectResultOutput)
}
// A collection of arguments for invoking getProject.
type LookupProjectOutputArgs struct {
Id pulumi.StringInput `pulumi:"id"`
}
func (LookupProjectOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProjectArgs)(nil)).Elem()
}
// A collection of values returned by getProject.
type LookupProjectResultOutput struct{ *pulumi.OutputState }
func (LookupProjectResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProjectResult)(nil)).Elem()
}
func (o LookupProjectResultOutput) ToLookupProjectResultOutput() LookupProjectResultOutput {
return o
}
func (o LookupProjectResultOutput) ToLookupProjectResultOutputWithContext(ctx context.Context) LookupProjectResultOutput {
return o
}
func (o LookupProjectResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
func (o LookupProjectResultOutput) DefaultEnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectResult) string { return v.DefaultEnvironmentId }).(pulumi.StringOutput)
}
func (o LookupProjectResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectResult) string { return v.Description }).(pulumi.StringOutput)
}
func (o LookupProjectResultOutput) Env() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectResult) string { return v.Env }).(pulumi.StringOutput)
}
func (o LookupProjectResultOutput) Environments() GetProjectEnvironmentArrayOutput {
return o.ApplyT(func(v LookupProjectResult) []GetProjectEnvironment { return v.Environments }).(GetProjectEnvironmentArrayOutput)
}
func (o LookupProjectResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupProjectResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupProjectResultOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v LookupProjectResult) string { return v.OrganizationId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupProjectResultOutput{})
}

57
sdk/go/dokploy/getProjects.go generated Normal file
View File

@@ -0,0 +1,57 @@
// 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"
)
func GetProjects(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetProjectsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetProjectsResult
err := ctx.Invoke("dokploy:index/getProjects:getProjects", nil, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of values returned by getProjects.
type GetProjectsResult struct {
Projects []GetProjectsProject `pulumi:"projects"`
}
func GetProjectsOutput(ctx *pulumi.Context, opts ...pulumi.InvokeOption) GetProjectsResultOutput {
return pulumi.ToOutput(0).ApplyT(func(int) (GetProjectsResultOutput, error) {
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("dokploy:index/getProjects:getProjects", nil, GetProjectsResultOutput{}, options).(GetProjectsResultOutput), nil
}).(GetProjectsResultOutput)
}
// A collection of values returned by getProjects.
type GetProjectsResultOutput struct{ *pulumi.OutputState }
func (GetProjectsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetProjectsResult)(nil)).Elem()
}
func (o GetProjectsResultOutput) ToGetProjectsResultOutput() GetProjectsResultOutput {
return o
}
func (o GetProjectsResultOutput) ToGetProjectsResultOutputWithContext(ctx context.Context) GetProjectsResultOutput {
return o
}
func (o GetProjectsResultOutput) Projects() GetProjectsProjectArrayOutput {
return o.ApplyT(func(v GetProjectsResult) []GetProjectsProject { return v.Projects }).(GetProjectsProjectArrayOutput)
}
func init() {
pulumi.RegisterOutputType(GetProjectsResultOutput{})
}

57
sdk/go/dokploy/getServers.go generated Normal file
View File

@@ -0,0 +1,57 @@
// 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"
)
func GetServers(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetServersResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetServersResult
err := ctx.Invoke("dokploy:index/getServers:getServers", nil, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of values returned by getServers.
type GetServersResult struct {
Servers []GetServersServer `pulumi:"servers"`
}
func GetServersOutput(ctx *pulumi.Context, opts ...pulumi.InvokeOption) GetServersResultOutput {
return pulumi.ToOutput(0).ApplyT(func(int) (GetServersResultOutput, error) {
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("dokploy:index/getServers:getServers", nil, GetServersResultOutput{}, options).(GetServersResultOutput), nil
}).(GetServersResultOutput)
}
// A collection of values returned by getServers.
type GetServersResultOutput struct{ *pulumi.OutputState }
func (GetServersResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServersResult)(nil)).Elem()
}
func (o GetServersResultOutput) ToGetServersResultOutput() GetServersResultOutput {
return o
}
func (o GetServersResultOutput) ToGetServersResultOutputWithContext(ctx context.Context) GetServersResultOutput {
return o
}
func (o GetServersResultOutput) Servers() GetServersServerArrayOutput {
return o.ApplyT(func(v GetServersResult) []GetServersServer { return v.Servers }).(GetServersServerArrayOutput)
}
func init() {
pulumi.RegisterOutputType(GetServersResultOutput{})
}

185
sdk/go/dokploy/init.go generated Normal file
View File

@@ -0,0 +1,185 @@
// 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 (
"fmt"
"github.com/blang/semver"
"github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "dokploy:index/application:Application":
r = &Application{}
case "dokploy:index/certificate:Certificate":
r = &Certificate{}
case "dokploy:index/compose:Compose":
r = &Compose{}
case "dokploy:index/destination:Destination":
r = &Destination{}
case "dokploy:index/domain:Domain":
r = &Domain{}
case "dokploy:index/environment:Environment":
r = &Environment{}
case "dokploy:index/mariaDb:MariaDb":
r = &MariaDb{}
case "dokploy:index/mongo:Mongo":
r = &Mongo{}
case "dokploy:index/mount:Mount":
r = &Mount{}
case "dokploy:index/mySql:MySql":
r = &MySql{}
case "dokploy:index/port:Port":
r = &Port{}
case "dokploy:index/postgres:Postgres":
r = &Postgres{}
case "dokploy:index/project:Project":
r = &Project{}
case "dokploy:index/redirect:Redirect":
r = &Redirect{}
case "dokploy:index/redis:Redis":
r = &Redis{}
case "dokploy:index/registry:Registry":
r = &Registry{}
case "dokploy:index/security:Security":
r = &Security{}
case "dokploy:index/sshKey:SshKey":
r = &SshKey{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
type pkg struct {
version semver.Version
}
func (p *pkg) Version() semver.Version {
return p.version
}
func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) {
if typ != "pulumi:providers:dokploy" {
return nil, fmt.Errorf("unknown provider type: %s", typ)
}
r := &Provider{}
err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return r, err
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"dokploy",
"index/application",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/certificate",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/compose",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/destination",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/domain",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/environment",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/mariaDb",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/mongo",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/mount",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/mySql",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/port",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/postgres",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/project",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/redirect",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/redis",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/registry",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/security",
&module{version},
)
pulumi.RegisterResourceModule(
"dokploy",
"index/sshKey",
&module{version},
)
pulumi.RegisterResourcePackage(
"dokploy",
&pkg{version},
)
}

184
sdk/go/dokploy/internal/pulumiUtilities.go generated Normal file
View File

@@ -0,0 +1,184 @@
// 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 internal
import (
"fmt"
"os"
"reflect"
"regexp"
"strconv"
"strings"
"github.com/blang/semver"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/internals"
)
type envParser func(v string) interface{}
func ParseEnvBool(v string) interface{} {
b, err := strconv.ParseBool(v)
if err != nil {
return nil
}
return b
}
func ParseEnvInt(v string) interface{} {
i, err := strconv.ParseInt(v, 0, 0)
if err != nil {
return nil
}
return int(i)
}
func ParseEnvFloat(v string) interface{} {
f, err := strconv.ParseFloat(v, 64)
if err != nil {
return nil
}
return f
}
func ParseEnvStringArray(v string) interface{} {
var result pulumi.StringArray
for _, item := range strings.Split(v, ";") {
result = append(result, pulumi.String(item))
}
return result
}
func GetEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} {
for _, v := range vars {
if value, ok := os.LookupEnv(v); ok {
if parser != nil {
return parser(value)
}
return value
}
}
return def
}
// PkgVersion uses reflection to determine the version of the current package.
// If a version cannot be determined, v1 will be assumed. The second return
// value is always nil.
func PkgVersion() (semver.Version, error) {
// emptyVersion defaults to v0.0.0
if !SdkVersion.Equals(semver.Version{}) {
return SdkVersion, nil
}
type sentinal struct{}
pkgPath := reflect.TypeOf(sentinal{}).PkgPath()
re := regexp.MustCompile("^.*/pulumi-dokploy/sdk(/v\\d+)?")
if match := re.FindStringSubmatch(pkgPath); match != nil {
vStr := match[1]
if len(vStr) == 0 { // If the version capture group was empty, default to v1.
return semver.Version{Major: 1}, nil
}
return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil
}
return semver.Version{Major: 1}, nil
}
// isZero is a null safe check for if a value is it's types zero value.
func IsZero(v interface{}) bool {
if v == nil {
return true
}
return reflect.ValueOf(v).IsZero()
}
func CallPlain(
ctx *pulumi.Context,
tok string,
args pulumi.Input,
output pulumi.Output,
self pulumi.Resource,
property string,
resultPtr reflect.Value,
errorPtr *error,
opts ...pulumi.InvokeOption,
) {
res, err := callPlainInner(ctx, tok, args, output, self, opts...)
if err != nil {
*errorPtr = err
return
}
v := reflect.ValueOf(res)
// extract res.property field if asked to do so
if property != "" {
v = v.FieldByName("Res")
}
// return by setting the result pointer; this style of returns shortens the generated code without generics
resultPtr.Elem().Set(v)
}
func callPlainInner(
ctx *pulumi.Context,
tok string,
args pulumi.Input,
output pulumi.Output,
self pulumi.Resource,
opts ...pulumi.InvokeOption,
) (any, error) {
o, err := ctx.Call(tok, args, output, self, opts...)
if err != nil {
return nil, err
}
outputData, err := internals.UnsafeAwaitOutput(ctx.Context(), o)
if err != nil {
return nil, err
}
// Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
known := outputData.Known
value := outputData.Value
secret := outputData.Secret
problem := ""
if !known {
problem = "an unknown value"
} else if secret {
problem = "a secret value"
}
if problem != "" {
return nil, fmt.Errorf("Plain resource method %q incorrectly returned %s. "+
"This is an error in the provider, please report this to the provider developer.",
tok, problem)
}
return value, nil
}
// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource.
func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption {
defaults := []pulumi.ResourceOption{}
defaults = append(defaults, pulumi.PluginDownloadURL("github://api.github.com/maxvojtkov/pulumi-dokploy"))
version := semver.MustParse("0.1.0")
if !version.Equals(semver.Version{}) {
defaults = append(defaults, pulumi.Version(version.String()))
}
return append(defaults, opts...)
}
// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke.
func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption {
defaults := []pulumi.InvokeOption{}
defaults = append(defaults, pulumi.PluginDownloadURL("github://api.github.com/maxvojtkov/pulumi-dokploy"))
version := semver.MustParse("0.1.0")
if !version.Equals(semver.Version{}) {
defaults = append(defaults, pulumi.Version(version.String()))
}
return append(defaults, opts...)
}

11
sdk/go/dokploy/internal/pulumiVersion.go generated Normal file
View File

@@ -0,0 +1,11 @@
// 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 internal
import (
"github.com/blang/semver"
)
var SdkVersion semver.Version = semver.Version{}
var pluginDownloadURL string = ""

731
sdk/go/dokploy/mariaDb.go generated Normal file
View File

@@ -0,0 +1,731 @@
// 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"
)
type MariaDb struct {
pulumi.CustomResourceState
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringOutput `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringOutput `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args pulumi.StringArrayOutput `pulumi:"args"`
// Override the container entrypoint command.
Command pulumi.StringPtrOutput `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrOutput `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrOutput `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Name of the database to create.
DatabaseName pulumi.StringOutput `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword pulumi.StringOutput `pulumi:"databasePassword"`
// Password for the MariaDB `root` user.
DatabaseRootPassword pulumi.StringOutput `pulumi:"databaseRootPassword"`
// Database user to create.
DatabaseUser pulumi.StringOutput `pulumi:"databaseUser"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolOutput `pulumi:"detachDokployNetwork"`
// MariaDB image to run, for example `mariadb:11`.
DockerImage pulumi.StringOutput `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrOutput `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrOutput `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId pulumi.StringOutput `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrOutput `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrOutput `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrOutput `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrOutput `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrOutput `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrOutput `pulumi:"modeSwarm"`
// Display name of the database.
Name pulumi.StringOutput `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayOutput `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrOutput `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrOutput `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas pulumi.IntOutput `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrOutput `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrOutput `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrOutput `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrOutput `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrOutput `pulumi:"updateConfigSwarm"`
}
// NewMariaDb registers a new resource with the given unique name, arguments, and options.
func NewMariaDb(ctx *pulumi.Context,
name string, args *MariaDbArgs, opts ...pulumi.ResourceOption) (*MariaDb, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DatabaseName == nil {
return nil, errors.New("invalid value for required argument 'DatabaseName'")
}
if args.DatabasePassword == nil {
return nil, errors.New("invalid value for required argument 'DatabasePassword'")
}
if args.DatabaseRootPassword == nil {
return nil, errors.New("invalid value for required argument 'DatabaseRootPassword'")
}
if args.DatabaseUser == nil {
return nil, errors.New("invalid value for required argument 'DatabaseUser'")
}
if args.DockerImage == nil {
return nil, errors.New("invalid value for required argument 'DockerImage'")
}
if args.EnvironmentId == nil {
return nil, errors.New("invalid value for required argument 'EnvironmentId'")
}
if args.DatabasePassword != nil {
args.DatabasePassword = pulumi.ToSecret(args.DatabasePassword).(pulumi.StringInput)
}
if args.DatabaseRootPassword != nil {
args.DatabaseRootPassword = pulumi.ToSecret(args.DatabaseRootPassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"databasePassword",
"databaseRootPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource MariaDb
err := ctx.RegisterResource("dokploy:index/mariaDb:MariaDb", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMariaDb gets an existing MariaDb 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 GetMariaDb(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MariaDbState, opts ...pulumi.ResourceOption) (*MariaDb, error) {
var resource MariaDb
err := ctx.ReadResource("dokploy:index/mariaDb:MariaDb", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MariaDb resources.
type mariaDbState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus *string `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt *string `pulumi:"createdAt"`
// Name of the database to create.
DatabaseName *string `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword *string `pulumi:"databasePassword"`
// Password for the MariaDB `root` user.
DatabaseRootPassword *string `pulumi:"databaseRootPassword"`
// Database user to create.
DatabaseUser *string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// MariaDB image to run, for example `mariadb:11`.
DockerImage *string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId *string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
type MariaDbState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringPtrInput
// Name of the database to create.
DatabaseName pulumi.StringPtrInput
// Password for the database user.
DatabasePassword pulumi.StringPtrInput
// Password for the MariaDB `root` user.
DatabaseRootPassword pulumi.StringPtrInput
// Database user to create.
DatabaseUser pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// MariaDB image to run, for example `mariadb:11`.
DockerImage pulumi.StringPtrInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringPtrInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (MariaDbState) ElementType() reflect.Type {
return reflect.TypeOf((*mariaDbState)(nil)).Elem()
}
type mariaDbArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// Name of the database to create.
DatabaseName string `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword string `pulumi:"databasePassword"`
// Password for the MariaDB `root` user.
DatabaseRootPassword string `pulumi:"databaseRootPassword"`
// Database user to create.
DatabaseUser string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// MariaDB image to run, for example `mariadb:11`.
DockerImage string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
// The set of arguments for constructing a MariaDb resource.
type MariaDbArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// Name of the database to create.
DatabaseName pulumi.StringInput
// Password for the database user.
DatabasePassword pulumi.StringInput
// Password for the MariaDB `root` user.
DatabaseRootPassword pulumi.StringInput
// Database user to create.
DatabaseUser pulumi.StringInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// MariaDB image to run, for example `mariadb:11`.
DockerImage pulumi.StringInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (MariaDbArgs) ElementType() reflect.Type {
return reflect.TypeOf((*mariaDbArgs)(nil)).Elem()
}
type MariaDbInput interface {
pulumi.Input
ToMariaDbOutput() MariaDbOutput
ToMariaDbOutputWithContext(ctx context.Context) MariaDbOutput
}
func (*MariaDb) ElementType() reflect.Type {
return reflect.TypeOf((**MariaDb)(nil)).Elem()
}
func (i *MariaDb) ToMariaDbOutput() MariaDbOutput {
return i.ToMariaDbOutputWithContext(context.Background())
}
func (i *MariaDb) ToMariaDbOutputWithContext(ctx context.Context) MariaDbOutput {
return pulumi.ToOutputWithContext(ctx, i).(MariaDbOutput)
}
// MariaDbArrayInput is an input type that accepts MariaDbArray and MariaDbArrayOutput values.
// You can construct a concrete instance of `MariaDbArrayInput` via:
//
// MariaDbArray{ MariaDbArgs{...} }
type MariaDbArrayInput interface {
pulumi.Input
ToMariaDbArrayOutput() MariaDbArrayOutput
ToMariaDbArrayOutputWithContext(context.Context) MariaDbArrayOutput
}
type MariaDbArray []MariaDbInput
func (MariaDbArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MariaDb)(nil)).Elem()
}
func (i MariaDbArray) ToMariaDbArrayOutput() MariaDbArrayOutput {
return i.ToMariaDbArrayOutputWithContext(context.Background())
}
func (i MariaDbArray) ToMariaDbArrayOutputWithContext(ctx context.Context) MariaDbArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MariaDbArrayOutput)
}
// MariaDbMapInput is an input type that accepts MariaDbMap and MariaDbMapOutput values.
// You can construct a concrete instance of `MariaDbMapInput` via:
//
// MariaDbMap{ "key": MariaDbArgs{...} }
type MariaDbMapInput interface {
pulumi.Input
ToMariaDbMapOutput() MariaDbMapOutput
ToMariaDbMapOutputWithContext(context.Context) MariaDbMapOutput
}
type MariaDbMap map[string]MariaDbInput
func (MariaDbMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MariaDb)(nil)).Elem()
}
func (i MariaDbMap) ToMariaDbMapOutput() MariaDbMapOutput {
return i.ToMariaDbMapOutputWithContext(context.Background())
}
func (i MariaDbMap) ToMariaDbMapOutputWithContext(ctx context.Context) MariaDbMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MariaDbMapOutput)
}
type MariaDbOutput struct{ *pulumi.OutputState }
func (MariaDbOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MariaDb)(nil)).Elem()
}
func (o MariaDbOutput) ToMariaDbOutput() MariaDbOutput {
return o
}
func (o MariaDbOutput) ToMariaDbOutputWithContext(ctx context.Context) MariaDbOutput {
return o
}
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
func (o MariaDbOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
func (o MariaDbOutput) ApplicationStatus() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.ApplicationStatus }).(pulumi.StringOutput)
}
// Arguments appended to the container command.
func (o MariaDbOutput) Args() pulumi.StringArrayOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringArrayOutput { return v.Args }).(pulumi.StringArrayOutput)
}
// Override the container entrypoint command.
func (o MariaDbOutput) Command() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.Command }).(pulumi.StringPtrOutput)
}
// Hard CPU limit, for example `1`.
func (o MariaDbOutput) CpuLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.CpuLimit }).(pulumi.StringPtrOutput)
}
// Soft CPU reservation, for example `0.5`.
func (o MariaDbOutput) CpuReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.CpuReservation }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the database was created.
func (o MariaDbOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Name of the database to create.
func (o MariaDbOutput) DatabaseName() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput)
}
// Password for the database user.
func (o MariaDbOutput) DatabasePassword() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.DatabasePassword }).(pulumi.StringOutput)
}
// Password for the MariaDB `root` user.
func (o MariaDbOutput) DatabaseRootPassword() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.DatabaseRootPassword }).(pulumi.StringOutput)
}
// Database user to create.
func (o MariaDbOutput) DatabaseUser() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.DatabaseUser }).(pulumi.StringOutput)
}
// Free-form description.
func (o MariaDbOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Detach the service from the shared `dokploy-network`.
func (o MariaDbOutput) DetachDokployNetwork() pulumi.BoolOutput {
return o.ApplyT(func(v *MariaDb) pulumi.BoolOutput { return v.DetachDokployNetwork }).(pulumi.BoolOutput)
}
// MariaDB image to run, for example `mariadb:11`.
func (o MariaDbOutput) DockerImage() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.DockerImage }).(pulumi.StringOutput)
}
// Docker Swarm endpoint specification, as a JSON object.
func (o MariaDbOutput) EndpointSpecSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.EndpointSpecSwarm }).(pulumi.StringPtrOutput)
}
// Environment variables in `KEY=value` format, one per line.
func (o MariaDbOutput) Env() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
}
// Environment this database belongs to.
func (o MariaDbOutput) EnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
}
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
func (o MariaDbOutput) ExternalPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.IntPtrOutput { return v.ExternalPort }).(pulumi.IntPtrOutput)
}
// Docker Swarm health check configuration, as a JSON object.
func (o MariaDbOutput) HealthCheckSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.HealthCheckSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm service labels, as a JSON object.
func (o MariaDbOutput) LabelsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.LabelsSwarm }).(pulumi.StringPtrOutput)
}
// Hard memory limit, for example `512m`.
func (o MariaDbOutput) MemoryLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.MemoryLimit }).(pulumi.StringPtrOutput)
}
// Soft memory reservation, for example `256m`.
func (o MariaDbOutput) MemoryReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.MemoryReservation }).(pulumi.StringPtrOutput)
}
// Docker Swarm service mode, as a JSON object.
func (o MariaDbOutput) ModeSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.ModeSwarm }).(pulumi.StringPtrOutput)
}
// Display name of the database.
func (o MariaDbOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// IDs of additional Docker networks to attach.
func (o MariaDbOutput) NetworkIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringArrayOutput { return v.NetworkIds }).(pulumi.StringArrayOutput)
}
// Docker Swarm network attachments, as a JSON array.
func (o MariaDbOutput) NetworkSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.NetworkSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm placement constraints, as a JSON object.
func (o MariaDbOutput) PlacementSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.PlacementSwarm }).(pulumi.StringPtrOutput)
}
// Number of replicas to run.
func (o MariaDbOutput) Replicas() pulumi.IntOutput {
return o.ApplyT(func(v *MariaDb) pulumi.IntOutput { return v.Replicas }).(pulumi.IntOutput)
}
// Docker Swarm restart policy, as a JSON object.
func (o MariaDbOutput) RestartPolicySwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.RestartPolicySwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rollback configuration, as a JSON object.
func (o MariaDbOutput) RollbackConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.RollbackConfigSwarm }).(pulumi.StringPtrOutput)
}
// Remote server to deploy on. Omit to use the Dokploy host itself.
func (o MariaDbOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Grace period in nanoseconds before a container is killed.
func (o MariaDbOutput) StopGracePeriodSwarm() pulumi.IntPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.IntPtrOutput { return v.StopGracePeriodSwarm }).(pulumi.IntPtrOutput)
}
// Docker Swarm ulimits, as a JSON object.
func (o MariaDbOutput) UlimitsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.UlimitsSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rolling update configuration, as a JSON object.
func (o MariaDbOutput) UpdateConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MariaDb) pulumi.StringPtrOutput { return v.UpdateConfigSwarm }).(pulumi.StringPtrOutput)
}
type MariaDbArrayOutput struct{ *pulumi.OutputState }
func (MariaDbArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MariaDb)(nil)).Elem()
}
func (o MariaDbArrayOutput) ToMariaDbArrayOutput() MariaDbArrayOutput {
return o
}
func (o MariaDbArrayOutput) ToMariaDbArrayOutputWithContext(ctx context.Context) MariaDbArrayOutput {
return o
}
func (o MariaDbArrayOutput) Index(i pulumi.IntInput) MariaDbOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MariaDb {
return vs[0].([]*MariaDb)[vs[1].(int)]
}).(MariaDbOutput)
}
type MariaDbMapOutput struct{ *pulumi.OutputState }
func (MariaDbMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MariaDb)(nil)).Elem()
}
func (o MariaDbMapOutput) ToMariaDbMapOutput() MariaDbMapOutput {
return o
}
func (o MariaDbMapOutput) ToMariaDbMapOutputWithContext(ctx context.Context) MariaDbMapOutput {
return o
}
func (o MariaDbMapOutput) MapIndex(k pulumi.StringInput) MariaDbOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MariaDb {
return vs[0].(map[string]*MariaDb)[vs[1].(string)]
}).(MariaDbOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MariaDbInput)(nil)).Elem(), &MariaDb{})
pulumi.RegisterInputType(reflect.TypeOf((*MariaDbArrayInput)(nil)).Elem(), MariaDbArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MariaDbMapInput)(nil)).Elem(), MariaDbMap{})
pulumi.RegisterOutputType(MariaDbOutput{})
pulumi.RegisterOutputType(MariaDbArrayOutput{})
pulumi.RegisterOutputType(MariaDbMapOutput{})
}

703
sdk/go/dokploy/mongo.go generated Normal file
View File

@@ -0,0 +1,703 @@
// 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"
)
type Mongo struct {
pulumi.CustomResourceState
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringOutput `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringOutput `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args pulumi.StringArrayOutput `pulumi:"args"`
// Override the container entrypoint command.
Command pulumi.StringPtrOutput `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrOutput `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrOutput `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Password for the root user.
DatabasePassword pulumi.StringOutput `pulumi:"databasePassword"`
// Root username to create.
DatabaseUser pulumi.StringOutput `pulumi:"databaseUser"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolOutput `pulumi:"detachDokployNetwork"`
// MongoDB image to run. Defaults to `mongo:8`.
DockerImage pulumi.StringOutput `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrOutput `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrOutput `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId pulumi.StringOutput `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrOutput `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrOutput `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrOutput `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrOutput `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrOutput `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrOutput `pulumi:"modeSwarm"`
// Display name of the database.
Name pulumi.StringOutput `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayOutput `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrOutput `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrOutput `pulumi:"placementSwarm"`
// Start the instance as a single-node replica set.
ReplicaSets pulumi.BoolOutput `pulumi:"replicaSets"`
// Number of replicas to run.
Replicas pulumi.IntOutput `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrOutput `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrOutput `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrOutput `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrOutput `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrOutput `pulumi:"updateConfigSwarm"`
}
// NewMongo registers a new resource with the given unique name, arguments, and options.
func NewMongo(ctx *pulumi.Context,
name string, args *MongoArgs, opts ...pulumi.ResourceOption) (*Mongo, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DatabasePassword == nil {
return nil, errors.New("invalid value for required argument 'DatabasePassword'")
}
if args.DatabaseUser == nil {
return nil, errors.New("invalid value for required argument 'DatabaseUser'")
}
if args.EnvironmentId == nil {
return nil, errors.New("invalid value for required argument 'EnvironmentId'")
}
if args.DatabasePassword != nil {
args.DatabasePassword = pulumi.ToSecret(args.DatabasePassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"databasePassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Mongo
err := ctx.RegisterResource("dokploy:index/mongo:Mongo", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMongo gets an existing Mongo 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 GetMongo(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MongoState, opts ...pulumi.ResourceOption) (*Mongo, error) {
var resource Mongo
err := ctx.ReadResource("dokploy:index/mongo:Mongo", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Mongo resources.
type mongoState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus *string `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt *string `pulumi:"createdAt"`
// Password for the root user.
DatabasePassword *string `pulumi:"databasePassword"`
// Root username to create.
DatabaseUser *string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// MongoDB image to run. Defaults to `mongo:8`.
DockerImage *string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId *string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Start the instance as a single-node replica set.
ReplicaSets *bool `pulumi:"replicaSets"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
type MongoState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringPtrInput
// Password for the root user.
DatabasePassword pulumi.StringPtrInput
// Root username to create.
DatabaseUser pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// MongoDB image to run. Defaults to `mongo:8`.
DockerImage pulumi.StringPtrInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringPtrInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Start the instance as a single-node replica set.
ReplicaSets pulumi.BoolPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (MongoState) ElementType() reflect.Type {
return reflect.TypeOf((*mongoState)(nil)).Elem()
}
type mongoArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// Password for the root user.
DatabasePassword string `pulumi:"databasePassword"`
// Root username to create.
DatabaseUser string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// MongoDB image to run. Defaults to `mongo:8`.
DockerImage *string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Start the instance as a single-node replica set.
ReplicaSets *bool `pulumi:"replicaSets"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
// The set of arguments for constructing a Mongo resource.
type MongoArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// Password for the root user.
DatabasePassword pulumi.StringInput
// Root username to create.
DatabaseUser pulumi.StringInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// MongoDB image to run. Defaults to `mongo:8`.
DockerImage pulumi.StringPtrInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Start the instance as a single-node replica set.
ReplicaSets pulumi.BoolPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (MongoArgs) ElementType() reflect.Type {
return reflect.TypeOf((*mongoArgs)(nil)).Elem()
}
type MongoInput interface {
pulumi.Input
ToMongoOutput() MongoOutput
ToMongoOutputWithContext(ctx context.Context) MongoOutput
}
func (*Mongo) ElementType() reflect.Type {
return reflect.TypeOf((**Mongo)(nil)).Elem()
}
func (i *Mongo) ToMongoOutput() MongoOutput {
return i.ToMongoOutputWithContext(context.Background())
}
func (i *Mongo) ToMongoOutputWithContext(ctx context.Context) MongoOutput {
return pulumi.ToOutputWithContext(ctx, i).(MongoOutput)
}
// MongoArrayInput is an input type that accepts MongoArray and MongoArrayOutput values.
// You can construct a concrete instance of `MongoArrayInput` via:
//
// MongoArray{ MongoArgs{...} }
type MongoArrayInput interface {
pulumi.Input
ToMongoArrayOutput() MongoArrayOutput
ToMongoArrayOutputWithContext(context.Context) MongoArrayOutput
}
type MongoArray []MongoInput
func (MongoArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Mongo)(nil)).Elem()
}
func (i MongoArray) ToMongoArrayOutput() MongoArrayOutput {
return i.ToMongoArrayOutputWithContext(context.Background())
}
func (i MongoArray) ToMongoArrayOutputWithContext(ctx context.Context) MongoArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MongoArrayOutput)
}
// MongoMapInput is an input type that accepts MongoMap and MongoMapOutput values.
// You can construct a concrete instance of `MongoMapInput` via:
//
// MongoMap{ "key": MongoArgs{...} }
type MongoMapInput interface {
pulumi.Input
ToMongoMapOutput() MongoMapOutput
ToMongoMapOutputWithContext(context.Context) MongoMapOutput
}
type MongoMap map[string]MongoInput
func (MongoMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Mongo)(nil)).Elem()
}
func (i MongoMap) ToMongoMapOutput() MongoMapOutput {
return i.ToMongoMapOutputWithContext(context.Background())
}
func (i MongoMap) ToMongoMapOutputWithContext(ctx context.Context) MongoMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MongoMapOutput)
}
type MongoOutput struct{ *pulumi.OutputState }
func (MongoOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Mongo)(nil)).Elem()
}
func (o MongoOutput) ToMongoOutput() MongoOutput {
return o
}
func (o MongoOutput) ToMongoOutputWithContext(ctx context.Context) MongoOutput {
return o
}
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
func (o MongoOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
func (o MongoOutput) ApplicationStatus() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.ApplicationStatus }).(pulumi.StringOutput)
}
// Arguments appended to the container command.
func (o MongoOutput) Args() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringArrayOutput { return v.Args }).(pulumi.StringArrayOutput)
}
// Override the container entrypoint command.
func (o MongoOutput) Command() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.Command }).(pulumi.StringPtrOutput)
}
// Hard CPU limit, for example `1`.
func (o MongoOutput) CpuLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.CpuLimit }).(pulumi.StringPtrOutput)
}
// Soft CPU reservation, for example `0.5`.
func (o MongoOutput) CpuReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.CpuReservation }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the database was created.
func (o MongoOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Password for the root user.
func (o MongoOutput) DatabasePassword() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.DatabasePassword }).(pulumi.StringOutput)
}
// Root username to create.
func (o MongoOutput) DatabaseUser() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.DatabaseUser }).(pulumi.StringOutput)
}
// Free-form description.
func (o MongoOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Detach the service from the shared `dokploy-network`.
func (o MongoOutput) DetachDokployNetwork() pulumi.BoolOutput {
return o.ApplyT(func(v *Mongo) pulumi.BoolOutput { return v.DetachDokployNetwork }).(pulumi.BoolOutput)
}
// MongoDB image to run. Defaults to `mongo:8`.
func (o MongoOutput) DockerImage() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.DockerImage }).(pulumi.StringOutput)
}
// Docker Swarm endpoint specification, as a JSON object.
func (o MongoOutput) EndpointSpecSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.EndpointSpecSwarm }).(pulumi.StringPtrOutput)
}
// Environment variables in `KEY=value` format, one per line.
func (o MongoOutput) Env() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
}
// Environment this database belongs to.
func (o MongoOutput) EnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
}
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
func (o MongoOutput) ExternalPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.IntPtrOutput { return v.ExternalPort }).(pulumi.IntPtrOutput)
}
// Docker Swarm health check configuration, as a JSON object.
func (o MongoOutput) HealthCheckSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.HealthCheckSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm service labels, as a JSON object.
func (o MongoOutput) LabelsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.LabelsSwarm }).(pulumi.StringPtrOutput)
}
// Hard memory limit, for example `512m`.
func (o MongoOutput) MemoryLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.MemoryLimit }).(pulumi.StringPtrOutput)
}
// Soft memory reservation, for example `256m`.
func (o MongoOutput) MemoryReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.MemoryReservation }).(pulumi.StringPtrOutput)
}
// Docker Swarm service mode, as a JSON object.
func (o MongoOutput) ModeSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.ModeSwarm }).(pulumi.StringPtrOutput)
}
// Display name of the database.
func (o MongoOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// IDs of additional Docker networks to attach.
func (o MongoOutput) NetworkIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringArrayOutput { return v.NetworkIds }).(pulumi.StringArrayOutput)
}
// Docker Swarm network attachments, as a JSON array.
func (o MongoOutput) NetworkSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.NetworkSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm placement constraints, as a JSON object.
func (o MongoOutput) PlacementSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.PlacementSwarm }).(pulumi.StringPtrOutput)
}
// Start the instance as a single-node replica set.
func (o MongoOutput) ReplicaSets() pulumi.BoolOutput {
return o.ApplyT(func(v *Mongo) pulumi.BoolOutput { return v.ReplicaSets }).(pulumi.BoolOutput)
}
// Number of replicas to run.
func (o MongoOutput) Replicas() pulumi.IntOutput {
return o.ApplyT(func(v *Mongo) pulumi.IntOutput { return v.Replicas }).(pulumi.IntOutput)
}
// Docker Swarm restart policy, as a JSON object.
func (o MongoOutput) RestartPolicySwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.RestartPolicySwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rollback configuration, as a JSON object.
func (o MongoOutput) RollbackConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.RollbackConfigSwarm }).(pulumi.StringPtrOutput)
}
// Remote server to deploy on. Omit to use the Dokploy host itself.
func (o MongoOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Grace period in nanoseconds before a container is killed.
func (o MongoOutput) StopGracePeriodSwarm() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.IntPtrOutput { return v.StopGracePeriodSwarm }).(pulumi.IntPtrOutput)
}
// Docker Swarm ulimits, as a JSON object.
func (o MongoOutput) UlimitsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.UlimitsSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rolling update configuration, as a JSON object.
func (o MongoOutput) UpdateConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.UpdateConfigSwarm }).(pulumi.StringPtrOutput)
}
type MongoArrayOutput struct{ *pulumi.OutputState }
func (MongoArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Mongo)(nil)).Elem()
}
func (o MongoArrayOutput) ToMongoArrayOutput() MongoArrayOutput {
return o
}
func (o MongoArrayOutput) ToMongoArrayOutputWithContext(ctx context.Context) MongoArrayOutput {
return o
}
func (o MongoArrayOutput) Index(i pulumi.IntInput) MongoOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Mongo {
return vs[0].([]*Mongo)[vs[1].(int)]
}).(MongoOutput)
}
type MongoMapOutput struct{ *pulumi.OutputState }
func (MongoMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Mongo)(nil)).Elem()
}
func (o MongoMapOutput) ToMongoMapOutput() MongoMapOutput {
return o
}
func (o MongoMapOutput) ToMongoMapOutputWithContext(ctx context.Context) MongoMapOutput {
return o
}
func (o MongoMapOutput) MapIndex(k pulumi.StringInput) MongoOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Mongo {
return vs[0].(map[string]*Mongo)[vs[1].(string)]
}).(MongoOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MongoInput)(nil)).Elem(), &Mongo{})
pulumi.RegisterInputType(reflect.TypeOf((*MongoArrayInput)(nil)).Elem(), MongoArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MongoMapInput)(nil)).Elem(), MongoMap{})
pulumi.RegisterOutputType(MongoOutput{})
pulumi.RegisterOutputType(MongoArrayOutput{})
pulumi.RegisterOutputType(MongoMapOutput{})
}

332
sdk/go/dokploy/mount.go generated Normal file
View File

@@ -0,0 +1,332 @@
// 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"
)
type Mount struct {
pulumi.CustomResourceState
// Contents of the generated file, when `type` is `file`.
Content pulumi.StringPtrOutput `pulumi:"content"`
// Path of the generated file, when `type` is `file`.
FilePath pulumi.StringPtrOutput `pulumi:"filePath"`
// Path on the host, when `type` is `bind`.
HostPath pulumi.StringPtrOutput `pulumi:"hostPath"`
// Path inside the container where the mount appears.
MountPath pulumi.StringOutput `pulumi:"mountPath"`
// ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
ServiceId pulumi.StringOutput `pulumi:"serviceId"`
// The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
ServiceType pulumi.StringOutput `pulumi:"serviceType"`
// The kind of mount to create. Valid values: `bind`, `volume`, `file`.
Type pulumi.StringOutput `pulumi:"type"`
// Name of the Docker volume, when `type` is `volume`.
VolumeName pulumi.StringPtrOutput `pulumi:"volumeName"`
}
// NewMount registers a new resource with the given unique name, arguments, and options.
func NewMount(ctx *pulumi.Context,
name string, args *MountArgs, opts ...pulumi.ResourceOption) (*Mount, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MountPath == nil {
return nil, errors.New("invalid value for required argument 'MountPath'")
}
if args.ServiceId == nil {
return nil, errors.New("invalid value for required argument 'ServiceId'")
}
if args.ServiceType == nil {
return nil, errors.New("invalid value for required argument 'ServiceType'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Mount
err := ctx.RegisterResource("dokploy:index/mount:Mount", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMount gets an existing Mount 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 GetMount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MountState, opts ...pulumi.ResourceOption) (*Mount, error) {
var resource Mount
err := ctx.ReadResource("dokploy:index/mount:Mount", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Mount resources.
type mountState struct {
// Contents of the generated file, when `type` is `file`.
Content *string `pulumi:"content"`
// Path of the generated file, when `type` is `file`.
FilePath *string `pulumi:"filePath"`
// Path on the host, when `type` is `bind`.
HostPath *string `pulumi:"hostPath"`
// Path inside the container where the mount appears.
MountPath *string `pulumi:"mountPath"`
// ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
ServiceId *string `pulumi:"serviceId"`
// The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
ServiceType *string `pulumi:"serviceType"`
// The kind of mount to create. Valid values: `bind`, `volume`, `file`.
Type *string `pulumi:"type"`
// Name of the Docker volume, when `type` is `volume`.
VolumeName *string `pulumi:"volumeName"`
}
type MountState struct {
// Contents of the generated file, when `type` is `file`.
Content pulumi.StringPtrInput
// Path of the generated file, when `type` is `file`.
FilePath pulumi.StringPtrInput
// Path on the host, when `type` is `bind`.
HostPath pulumi.StringPtrInput
// Path inside the container where the mount appears.
MountPath pulumi.StringPtrInput
// ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
ServiceId pulumi.StringPtrInput
// The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
ServiceType pulumi.StringPtrInput
// The kind of mount to create. Valid values: `bind`, `volume`, `file`.
Type pulumi.StringPtrInput
// Name of the Docker volume, when `type` is `volume`.
VolumeName pulumi.StringPtrInput
}
func (MountState) ElementType() reflect.Type {
return reflect.TypeOf((*mountState)(nil)).Elem()
}
type mountArgs struct {
// Contents of the generated file, when `type` is `file`.
Content *string `pulumi:"content"`
// Path of the generated file, when `type` is `file`.
FilePath *string `pulumi:"filePath"`
// Path on the host, when `type` is `bind`.
HostPath *string `pulumi:"hostPath"`
// Path inside the container where the mount appears.
MountPath string `pulumi:"mountPath"`
// ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
ServiceId string `pulumi:"serviceId"`
// The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
ServiceType string `pulumi:"serviceType"`
// The kind of mount to create. Valid values: `bind`, `volume`, `file`.
Type string `pulumi:"type"`
// Name of the Docker volume, when `type` is `volume`.
VolumeName *string `pulumi:"volumeName"`
}
// The set of arguments for constructing a Mount resource.
type MountArgs struct {
// Contents of the generated file, when `type` is `file`.
Content pulumi.StringPtrInput
// Path of the generated file, when `type` is `file`.
FilePath pulumi.StringPtrInput
// Path on the host, when `type` is `bind`.
HostPath pulumi.StringPtrInput
// Path inside the container where the mount appears.
MountPath pulumi.StringInput
// ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
ServiceId pulumi.StringInput
// The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
ServiceType pulumi.StringInput
// The kind of mount to create. Valid values: `bind`, `volume`, `file`.
Type pulumi.StringInput
// Name of the Docker volume, when `type` is `volume`.
VolumeName pulumi.StringPtrInput
}
func (MountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*mountArgs)(nil)).Elem()
}
type MountInput interface {
pulumi.Input
ToMountOutput() MountOutput
ToMountOutputWithContext(ctx context.Context) MountOutput
}
func (*Mount) ElementType() reflect.Type {
return reflect.TypeOf((**Mount)(nil)).Elem()
}
func (i *Mount) ToMountOutput() MountOutput {
return i.ToMountOutputWithContext(context.Background())
}
func (i *Mount) ToMountOutputWithContext(ctx context.Context) MountOutput {
return pulumi.ToOutputWithContext(ctx, i).(MountOutput)
}
// MountArrayInput is an input type that accepts MountArray and MountArrayOutput values.
// You can construct a concrete instance of `MountArrayInput` via:
//
// MountArray{ MountArgs{...} }
type MountArrayInput interface {
pulumi.Input
ToMountArrayOutput() MountArrayOutput
ToMountArrayOutputWithContext(context.Context) MountArrayOutput
}
type MountArray []MountInput
func (MountArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Mount)(nil)).Elem()
}
func (i MountArray) ToMountArrayOutput() MountArrayOutput {
return i.ToMountArrayOutputWithContext(context.Background())
}
func (i MountArray) ToMountArrayOutputWithContext(ctx context.Context) MountArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MountArrayOutput)
}
// MountMapInput is an input type that accepts MountMap and MountMapOutput values.
// You can construct a concrete instance of `MountMapInput` via:
//
// MountMap{ "key": MountArgs{...} }
type MountMapInput interface {
pulumi.Input
ToMountMapOutput() MountMapOutput
ToMountMapOutputWithContext(context.Context) MountMapOutput
}
type MountMap map[string]MountInput
func (MountMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Mount)(nil)).Elem()
}
func (i MountMap) ToMountMapOutput() MountMapOutput {
return i.ToMountMapOutputWithContext(context.Background())
}
func (i MountMap) ToMountMapOutputWithContext(ctx context.Context) MountMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MountMapOutput)
}
type MountOutput struct{ *pulumi.OutputState }
func (MountOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Mount)(nil)).Elem()
}
func (o MountOutput) ToMountOutput() MountOutput {
return o
}
func (o MountOutput) ToMountOutputWithContext(ctx context.Context) MountOutput {
return o
}
// Contents of the generated file, when `type` is `file`.
func (o MountOutput) Content() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mount) pulumi.StringPtrOutput { return v.Content }).(pulumi.StringPtrOutput)
}
// Path of the generated file, when `type` is `file`.
func (o MountOutput) FilePath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mount) pulumi.StringPtrOutput { return v.FilePath }).(pulumi.StringPtrOutput)
}
// Path on the host, when `type` is `bind`.
func (o MountOutput) HostPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mount) pulumi.StringPtrOutput { return v.HostPath }).(pulumi.StringPtrOutput)
}
// Path inside the container where the mount appears.
func (o MountOutput) MountPath() pulumi.StringOutput {
return o.ApplyT(func(v *Mount) pulumi.StringOutput { return v.MountPath }).(pulumi.StringOutput)
}
// ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
func (o MountOutput) ServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *Mount) pulumi.StringOutput { return v.ServiceId }).(pulumi.StringOutput)
}
// The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
func (o MountOutput) ServiceType() pulumi.StringOutput {
return o.ApplyT(func(v *Mount) pulumi.StringOutput { return v.ServiceType }).(pulumi.StringOutput)
}
// The kind of mount to create. Valid values: `bind`, `volume`, `file`.
func (o MountOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *Mount) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// Name of the Docker volume, when `type` is `volume`.
func (o MountOutput) VolumeName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mount) pulumi.StringPtrOutput { return v.VolumeName }).(pulumi.StringPtrOutput)
}
type MountArrayOutput struct{ *pulumi.OutputState }
func (MountArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Mount)(nil)).Elem()
}
func (o MountArrayOutput) ToMountArrayOutput() MountArrayOutput {
return o
}
func (o MountArrayOutput) ToMountArrayOutputWithContext(ctx context.Context) MountArrayOutput {
return o
}
func (o MountArrayOutput) Index(i pulumi.IntInput) MountOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Mount {
return vs[0].([]*Mount)[vs[1].(int)]
}).(MountOutput)
}
type MountMapOutput struct{ *pulumi.OutputState }
func (MountMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Mount)(nil)).Elem()
}
func (o MountMapOutput) ToMountMapOutput() MountMapOutput {
return o
}
func (o MountMapOutput) ToMountMapOutputWithContext(ctx context.Context) MountMapOutput {
return o
}
func (o MountMapOutput) MapIndex(k pulumi.StringInput) MountOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Mount {
return vs[0].(map[string]*Mount)[vs[1].(string)]
}).(MountOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MountInput)(nil)).Elem(), &Mount{})
pulumi.RegisterInputType(reflect.TypeOf((*MountArrayInput)(nil)).Elem(), MountArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MountMapInput)(nil)).Elem(), MountMap{})
pulumi.RegisterOutputType(MountOutput{})
pulumi.RegisterOutputType(MountArrayOutput{})
pulumi.RegisterOutputType(MountMapOutput{})
}

731
sdk/go/dokploy/mySql.go generated Normal file
View File

@@ -0,0 +1,731 @@
// 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"
)
type MySql struct {
pulumi.CustomResourceState
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringOutput `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringOutput `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args pulumi.StringArrayOutput `pulumi:"args"`
// Override the container entrypoint command.
Command pulumi.StringPtrOutput `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrOutput `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrOutput `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Name of the database to create.
DatabaseName pulumi.StringOutput `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword pulumi.StringOutput `pulumi:"databasePassword"`
// Password for the MySQL `root` user.
DatabaseRootPassword pulumi.StringOutput `pulumi:"databaseRootPassword"`
// Database user to create.
DatabaseUser pulumi.StringOutput `pulumi:"databaseUser"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolOutput `pulumi:"detachDokployNetwork"`
// MySQL image to run, for example `mysql:8`.
DockerImage pulumi.StringOutput `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrOutput `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrOutput `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId pulumi.StringOutput `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrOutput `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrOutput `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrOutput `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrOutput `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrOutput `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrOutput `pulumi:"modeSwarm"`
// Display name of the database.
Name pulumi.StringOutput `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayOutput `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrOutput `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrOutput `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas pulumi.IntOutput `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrOutput `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrOutput `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrOutput `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrOutput `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrOutput `pulumi:"updateConfigSwarm"`
}
// NewMySql registers a new resource with the given unique name, arguments, and options.
func NewMySql(ctx *pulumi.Context,
name string, args *MySqlArgs, opts ...pulumi.ResourceOption) (*MySql, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DatabaseName == nil {
return nil, errors.New("invalid value for required argument 'DatabaseName'")
}
if args.DatabasePassword == nil {
return nil, errors.New("invalid value for required argument 'DatabasePassword'")
}
if args.DatabaseRootPassword == nil {
return nil, errors.New("invalid value for required argument 'DatabaseRootPassword'")
}
if args.DatabaseUser == nil {
return nil, errors.New("invalid value for required argument 'DatabaseUser'")
}
if args.DockerImage == nil {
return nil, errors.New("invalid value for required argument 'DockerImage'")
}
if args.EnvironmentId == nil {
return nil, errors.New("invalid value for required argument 'EnvironmentId'")
}
if args.DatabasePassword != nil {
args.DatabasePassword = pulumi.ToSecret(args.DatabasePassword).(pulumi.StringInput)
}
if args.DatabaseRootPassword != nil {
args.DatabaseRootPassword = pulumi.ToSecret(args.DatabaseRootPassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"databasePassword",
"databaseRootPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource MySql
err := ctx.RegisterResource("dokploy:index/mySql:MySql", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMySql gets an existing MySql 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 GetMySql(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MySqlState, opts ...pulumi.ResourceOption) (*MySql, error) {
var resource MySql
err := ctx.ReadResource("dokploy:index/mySql:MySql", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MySql resources.
type mySqlState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus *string `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt *string `pulumi:"createdAt"`
// Name of the database to create.
DatabaseName *string `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword *string `pulumi:"databasePassword"`
// Password for the MySQL `root` user.
DatabaseRootPassword *string `pulumi:"databaseRootPassword"`
// Database user to create.
DatabaseUser *string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// MySQL image to run, for example `mysql:8`.
DockerImage *string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId *string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
type MySqlState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringPtrInput
// Name of the database to create.
DatabaseName pulumi.StringPtrInput
// Password for the database user.
DatabasePassword pulumi.StringPtrInput
// Password for the MySQL `root` user.
DatabaseRootPassword pulumi.StringPtrInput
// Database user to create.
DatabaseUser pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// MySQL image to run, for example `mysql:8`.
DockerImage pulumi.StringPtrInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringPtrInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (MySqlState) ElementType() reflect.Type {
return reflect.TypeOf((*mySqlState)(nil)).Elem()
}
type mySqlArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// Name of the database to create.
DatabaseName string `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword string `pulumi:"databasePassword"`
// Password for the MySQL `root` user.
DatabaseRootPassword string `pulumi:"databaseRootPassword"`
// Database user to create.
DatabaseUser string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// MySQL image to run, for example `mysql:8`.
DockerImage string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
// The set of arguments for constructing a MySql resource.
type MySqlArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// Name of the database to create.
DatabaseName pulumi.StringInput
// Password for the database user.
DatabasePassword pulumi.StringInput
// Password for the MySQL `root` user.
DatabaseRootPassword pulumi.StringInput
// Database user to create.
DatabaseUser pulumi.StringInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// MySQL image to run, for example `mysql:8`.
DockerImage pulumi.StringInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (MySqlArgs) ElementType() reflect.Type {
return reflect.TypeOf((*mySqlArgs)(nil)).Elem()
}
type MySqlInput interface {
pulumi.Input
ToMySqlOutput() MySqlOutput
ToMySqlOutputWithContext(ctx context.Context) MySqlOutput
}
func (*MySql) ElementType() reflect.Type {
return reflect.TypeOf((**MySql)(nil)).Elem()
}
func (i *MySql) ToMySqlOutput() MySqlOutput {
return i.ToMySqlOutputWithContext(context.Background())
}
func (i *MySql) ToMySqlOutputWithContext(ctx context.Context) MySqlOutput {
return pulumi.ToOutputWithContext(ctx, i).(MySqlOutput)
}
// MySqlArrayInput is an input type that accepts MySqlArray and MySqlArrayOutput values.
// You can construct a concrete instance of `MySqlArrayInput` via:
//
// MySqlArray{ MySqlArgs{...} }
type MySqlArrayInput interface {
pulumi.Input
ToMySqlArrayOutput() MySqlArrayOutput
ToMySqlArrayOutputWithContext(context.Context) MySqlArrayOutput
}
type MySqlArray []MySqlInput
func (MySqlArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MySql)(nil)).Elem()
}
func (i MySqlArray) ToMySqlArrayOutput() MySqlArrayOutput {
return i.ToMySqlArrayOutputWithContext(context.Background())
}
func (i MySqlArray) ToMySqlArrayOutputWithContext(ctx context.Context) MySqlArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MySqlArrayOutput)
}
// MySqlMapInput is an input type that accepts MySqlMap and MySqlMapOutput values.
// You can construct a concrete instance of `MySqlMapInput` via:
//
// MySqlMap{ "key": MySqlArgs{...} }
type MySqlMapInput interface {
pulumi.Input
ToMySqlMapOutput() MySqlMapOutput
ToMySqlMapOutputWithContext(context.Context) MySqlMapOutput
}
type MySqlMap map[string]MySqlInput
func (MySqlMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MySql)(nil)).Elem()
}
func (i MySqlMap) ToMySqlMapOutput() MySqlMapOutput {
return i.ToMySqlMapOutputWithContext(context.Background())
}
func (i MySqlMap) ToMySqlMapOutputWithContext(ctx context.Context) MySqlMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MySqlMapOutput)
}
type MySqlOutput struct{ *pulumi.OutputState }
func (MySqlOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MySql)(nil)).Elem()
}
func (o MySqlOutput) ToMySqlOutput() MySqlOutput {
return o
}
func (o MySqlOutput) ToMySqlOutputWithContext(ctx context.Context) MySqlOutput {
return o
}
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
func (o MySqlOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
func (o MySqlOutput) ApplicationStatus() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.ApplicationStatus }).(pulumi.StringOutput)
}
// Arguments appended to the container command.
func (o MySqlOutput) Args() pulumi.StringArrayOutput {
return o.ApplyT(func(v *MySql) pulumi.StringArrayOutput { return v.Args }).(pulumi.StringArrayOutput)
}
// Override the container entrypoint command.
func (o MySqlOutput) Command() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.Command }).(pulumi.StringPtrOutput)
}
// Hard CPU limit, for example `1`.
func (o MySqlOutput) CpuLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.CpuLimit }).(pulumi.StringPtrOutput)
}
// Soft CPU reservation, for example `0.5`.
func (o MySqlOutput) CpuReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.CpuReservation }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the database was created.
func (o MySqlOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Name of the database to create.
func (o MySqlOutput) DatabaseName() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput)
}
// Password for the database user.
func (o MySqlOutput) DatabasePassword() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.DatabasePassword }).(pulumi.StringOutput)
}
// Password for the MySQL `root` user.
func (o MySqlOutput) DatabaseRootPassword() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.DatabaseRootPassword }).(pulumi.StringOutput)
}
// Database user to create.
func (o MySqlOutput) DatabaseUser() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.DatabaseUser }).(pulumi.StringOutput)
}
// Free-form description.
func (o MySqlOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Detach the service from the shared `dokploy-network`.
func (o MySqlOutput) DetachDokployNetwork() pulumi.BoolOutput {
return o.ApplyT(func(v *MySql) pulumi.BoolOutput { return v.DetachDokployNetwork }).(pulumi.BoolOutput)
}
// MySQL image to run, for example `mysql:8`.
func (o MySqlOutput) DockerImage() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.DockerImage }).(pulumi.StringOutput)
}
// Docker Swarm endpoint specification, as a JSON object.
func (o MySqlOutput) EndpointSpecSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.EndpointSpecSwarm }).(pulumi.StringPtrOutput)
}
// Environment variables in `KEY=value` format, one per line.
func (o MySqlOutput) Env() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
}
// Environment this database belongs to.
func (o MySqlOutput) EnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
}
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
func (o MySqlOutput) ExternalPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.IntPtrOutput { return v.ExternalPort }).(pulumi.IntPtrOutput)
}
// Docker Swarm health check configuration, as a JSON object.
func (o MySqlOutput) HealthCheckSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.HealthCheckSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm service labels, as a JSON object.
func (o MySqlOutput) LabelsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.LabelsSwarm }).(pulumi.StringPtrOutput)
}
// Hard memory limit, for example `512m`.
func (o MySqlOutput) MemoryLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.MemoryLimit }).(pulumi.StringPtrOutput)
}
// Soft memory reservation, for example `256m`.
func (o MySqlOutput) MemoryReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.MemoryReservation }).(pulumi.StringPtrOutput)
}
// Docker Swarm service mode, as a JSON object.
func (o MySqlOutput) ModeSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.ModeSwarm }).(pulumi.StringPtrOutput)
}
// Display name of the database.
func (o MySqlOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MySql) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// IDs of additional Docker networks to attach.
func (o MySqlOutput) NetworkIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *MySql) pulumi.StringArrayOutput { return v.NetworkIds }).(pulumi.StringArrayOutput)
}
// Docker Swarm network attachments, as a JSON array.
func (o MySqlOutput) NetworkSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.NetworkSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm placement constraints, as a JSON object.
func (o MySqlOutput) PlacementSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.PlacementSwarm }).(pulumi.StringPtrOutput)
}
// Number of replicas to run.
func (o MySqlOutput) Replicas() pulumi.IntOutput {
return o.ApplyT(func(v *MySql) pulumi.IntOutput { return v.Replicas }).(pulumi.IntOutput)
}
// Docker Swarm restart policy, as a JSON object.
func (o MySqlOutput) RestartPolicySwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.RestartPolicySwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rollback configuration, as a JSON object.
func (o MySqlOutput) RollbackConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.RollbackConfigSwarm }).(pulumi.StringPtrOutput)
}
// Remote server to deploy on. Omit to use the Dokploy host itself.
func (o MySqlOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Grace period in nanoseconds before a container is killed.
func (o MySqlOutput) StopGracePeriodSwarm() pulumi.IntPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.IntPtrOutput { return v.StopGracePeriodSwarm }).(pulumi.IntPtrOutput)
}
// Docker Swarm ulimits, as a JSON object.
func (o MySqlOutput) UlimitsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.UlimitsSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rolling update configuration, as a JSON object.
func (o MySqlOutput) UpdateConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MySql) pulumi.StringPtrOutput { return v.UpdateConfigSwarm }).(pulumi.StringPtrOutput)
}
type MySqlArrayOutput struct{ *pulumi.OutputState }
func (MySqlArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MySql)(nil)).Elem()
}
func (o MySqlArrayOutput) ToMySqlArrayOutput() MySqlArrayOutput {
return o
}
func (o MySqlArrayOutput) ToMySqlArrayOutputWithContext(ctx context.Context) MySqlArrayOutput {
return o
}
func (o MySqlArrayOutput) Index(i pulumi.IntInput) MySqlOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MySql {
return vs[0].([]*MySql)[vs[1].(int)]
}).(MySqlOutput)
}
type MySqlMapOutput struct{ *pulumi.OutputState }
func (MySqlMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MySql)(nil)).Elem()
}
func (o MySqlMapOutput) ToMySqlMapOutput() MySqlMapOutput {
return o
}
func (o MySqlMapOutput) ToMySqlMapOutputWithContext(ctx context.Context) MySqlMapOutput {
return o
}
func (o MySqlMapOutput) MapIndex(k pulumi.StringInput) MySqlOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MySql {
return vs[0].(map[string]*MySql)[vs[1].(string)]
}).(MySqlOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MySqlInput)(nil)).Elem(), &MySql{})
pulumi.RegisterInputType(reflect.TypeOf((*MySqlArrayInput)(nil)).Elem(), MySqlArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MySqlMapInput)(nil)).Elem(), MySqlMap{})
pulumi.RegisterOutputType(MySqlOutput{})
pulumi.RegisterOutputType(MySqlArrayOutput{})
pulumi.RegisterOutputType(MySqlMapOutput{})
}

287
sdk/go/dokploy/port.go generated Normal file
View File

@@ -0,0 +1,287 @@
// 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"
)
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{})
}

709
sdk/go/dokploy/postgres.go generated Normal file
View File

@@ -0,0 +1,709 @@
// 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"
)
type Postgres struct {
pulumi.CustomResourceState
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringOutput `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringOutput `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args pulumi.StringArrayOutput `pulumi:"args"`
// Override the container entrypoint command.
Command pulumi.StringPtrOutput `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrOutput `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrOutput `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Name of the database to create.
DatabaseName pulumi.StringOutput `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword pulumi.StringOutput `pulumi:"databasePassword"`
// Database user to create.
DatabaseUser pulumi.StringOutput `pulumi:"databaseUser"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolOutput `pulumi:"detachDokployNetwork"`
// PostgreSQL image to run, for example `postgres:16`.
DockerImage pulumi.StringOutput `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrOutput `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrOutput `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId pulumi.StringOutput `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrOutput `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrOutput `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrOutput `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrOutput `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrOutput `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrOutput `pulumi:"modeSwarm"`
// Display name of the database.
Name pulumi.StringOutput `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayOutput `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrOutput `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrOutput `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas pulumi.IntOutput `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrOutput `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrOutput `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrOutput `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrOutput `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrOutput `pulumi:"updateConfigSwarm"`
}
// NewPostgres registers a new resource with the given unique name, arguments, and options.
func NewPostgres(ctx *pulumi.Context,
name string, args *PostgresArgs, opts ...pulumi.ResourceOption) (*Postgres, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DatabaseName == nil {
return nil, errors.New("invalid value for required argument 'DatabaseName'")
}
if args.DatabasePassword == nil {
return nil, errors.New("invalid value for required argument 'DatabasePassword'")
}
if args.DatabaseUser == nil {
return nil, errors.New("invalid value for required argument 'DatabaseUser'")
}
if args.DockerImage == nil {
return nil, errors.New("invalid value for required argument 'DockerImage'")
}
if args.EnvironmentId == nil {
return nil, errors.New("invalid value for required argument 'EnvironmentId'")
}
if args.DatabasePassword != nil {
args.DatabasePassword = pulumi.ToSecret(args.DatabasePassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"databasePassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Postgres
err := ctx.RegisterResource("dokploy:index/postgres:Postgres", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPostgres gets an existing Postgres 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 GetPostgres(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PostgresState, opts ...pulumi.ResourceOption) (*Postgres, error) {
var resource Postgres
err := ctx.ReadResource("dokploy:index/postgres:Postgres", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Postgres resources.
type postgresState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus *string `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt *string `pulumi:"createdAt"`
// Name of the database to create.
DatabaseName *string `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword *string `pulumi:"databasePassword"`
// Database user to create.
DatabaseUser *string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// PostgreSQL image to run, for example `postgres:16`.
DockerImage *string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId *string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
type PostgresState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringPtrInput
// Name of the database to create.
DatabaseName pulumi.StringPtrInput
// Password for the database user.
DatabasePassword pulumi.StringPtrInput
// Database user to create.
DatabaseUser pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// PostgreSQL image to run, for example `postgres:16`.
DockerImage pulumi.StringPtrInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringPtrInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (PostgresState) ElementType() reflect.Type {
return reflect.TypeOf((*postgresState)(nil)).Elem()
}
type postgresArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// Name of the database to create.
DatabaseName string `pulumi:"databaseName"`
// Password for the database user.
DatabasePassword string `pulumi:"databasePassword"`
// Database user to create.
DatabaseUser string `pulumi:"databaseUser"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// PostgreSQL image to run, for example `postgres:16`.
DockerImage string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
// The set of arguments for constructing a Postgres resource.
type PostgresArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// Name of the database to create.
DatabaseName pulumi.StringInput
// Password for the database user.
DatabasePassword pulumi.StringInput
// Database user to create.
DatabaseUser pulumi.StringInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// PostgreSQL image to run, for example `postgres:16`.
DockerImage pulumi.StringInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (PostgresArgs) ElementType() reflect.Type {
return reflect.TypeOf((*postgresArgs)(nil)).Elem()
}
type PostgresInput interface {
pulumi.Input
ToPostgresOutput() PostgresOutput
ToPostgresOutputWithContext(ctx context.Context) PostgresOutput
}
func (*Postgres) ElementType() reflect.Type {
return reflect.TypeOf((**Postgres)(nil)).Elem()
}
func (i *Postgres) ToPostgresOutput() PostgresOutput {
return i.ToPostgresOutputWithContext(context.Background())
}
func (i *Postgres) ToPostgresOutputWithContext(ctx context.Context) PostgresOutput {
return pulumi.ToOutputWithContext(ctx, i).(PostgresOutput)
}
// PostgresArrayInput is an input type that accepts PostgresArray and PostgresArrayOutput values.
// You can construct a concrete instance of `PostgresArrayInput` via:
//
// PostgresArray{ PostgresArgs{...} }
type PostgresArrayInput interface {
pulumi.Input
ToPostgresArrayOutput() PostgresArrayOutput
ToPostgresArrayOutputWithContext(context.Context) PostgresArrayOutput
}
type PostgresArray []PostgresInput
func (PostgresArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Postgres)(nil)).Elem()
}
func (i PostgresArray) ToPostgresArrayOutput() PostgresArrayOutput {
return i.ToPostgresArrayOutputWithContext(context.Background())
}
func (i PostgresArray) ToPostgresArrayOutputWithContext(ctx context.Context) PostgresArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PostgresArrayOutput)
}
// PostgresMapInput is an input type that accepts PostgresMap and PostgresMapOutput values.
// You can construct a concrete instance of `PostgresMapInput` via:
//
// PostgresMap{ "key": PostgresArgs{...} }
type PostgresMapInput interface {
pulumi.Input
ToPostgresMapOutput() PostgresMapOutput
ToPostgresMapOutputWithContext(context.Context) PostgresMapOutput
}
type PostgresMap map[string]PostgresInput
func (PostgresMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Postgres)(nil)).Elem()
}
func (i PostgresMap) ToPostgresMapOutput() PostgresMapOutput {
return i.ToPostgresMapOutputWithContext(context.Background())
}
func (i PostgresMap) ToPostgresMapOutputWithContext(ctx context.Context) PostgresMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PostgresMapOutput)
}
type PostgresOutput struct{ *pulumi.OutputState }
func (PostgresOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Postgres)(nil)).Elem()
}
func (o PostgresOutput) ToPostgresOutput() PostgresOutput {
return o
}
func (o PostgresOutput) ToPostgresOutputWithContext(ctx context.Context) PostgresOutput {
return o
}
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
func (o PostgresOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
func (o PostgresOutput) ApplicationStatus() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.ApplicationStatus }).(pulumi.StringOutput)
}
// Arguments appended to the container command.
func (o PostgresOutput) Args() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringArrayOutput { return v.Args }).(pulumi.StringArrayOutput)
}
// Override the container entrypoint command.
func (o PostgresOutput) Command() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.Command }).(pulumi.StringPtrOutput)
}
// Hard CPU limit, for example `1`.
func (o PostgresOutput) CpuLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.CpuLimit }).(pulumi.StringPtrOutput)
}
// Soft CPU reservation, for example `0.5`.
func (o PostgresOutput) CpuReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.CpuReservation }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the database was created.
func (o PostgresOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Name of the database to create.
func (o PostgresOutput) DatabaseName() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput)
}
// Password for the database user.
func (o PostgresOutput) DatabasePassword() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.DatabasePassword }).(pulumi.StringOutput)
}
// Database user to create.
func (o PostgresOutput) DatabaseUser() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.DatabaseUser }).(pulumi.StringOutput)
}
// Free-form description.
func (o PostgresOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Detach the service from the shared `dokploy-network`.
func (o PostgresOutput) DetachDokployNetwork() pulumi.BoolOutput {
return o.ApplyT(func(v *Postgres) pulumi.BoolOutput { return v.DetachDokployNetwork }).(pulumi.BoolOutput)
}
// PostgreSQL image to run, for example `postgres:16`.
func (o PostgresOutput) DockerImage() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.DockerImage }).(pulumi.StringOutput)
}
// Docker Swarm endpoint specification, as a JSON object.
func (o PostgresOutput) EndpointSpecSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.EndpointSpecSwarm }).(pulumi.StringPtrOutput)
}
// Environment variables in `KEY=value` format, one per line.
func (o PostgresOutput) Env() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
}
// Environment this database belongs to.
func (o PostgresOutput) EnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
}
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
func (o PostgresOutput) ExternalPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.IntPtrOutput { return v.ExternalPort }).(pulumi.IntPtrOutput)
}
// Docker Swarm health check configuration, as a JSON object.
func (o PostgresOutput) HealthCheckSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.HealthCheckSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm service labels, as a JSON object.
func (o PostgresOutput) LabelsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.LabelsSwarm }).(pulumi.StringPtrOutput)
}
// Hard memory limit, for example `512m`.
func (o PostgresOutput) MemoryLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.MemoryLimit }).(pulumi.StringPtrOutput)
}
// Soft memory reservation, for example `256m`.
func (o PostgresOutput) MemoryReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.MemoryReservation }).(pulumi.StringPtrOutput)
}
// Docker Swarm service mode, as a JSON object.
func (o PostgresOutput) ModeSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.ModeSwarm }).(pulumi.StringPtrOutput)
}
// Display name of the database.
func (o PostgresOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// IDs of additional Docker networks to attach.
func (o PostgresOutput) NetworkIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringArrayOutput { return v.NetworkIds }).(pulumi.StringArrayOutput)
}
// Docker Swarm network attachments, as a JSON array.
func (o PostgresOutput) NetworkSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.NetworkSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm placement constraints, as a JSON object.
func (o PostgresOutput) PlacementSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.PlacementSwarm }).(pulumi.StringPtrOutput)
}
// Number of replicas to run.
func (o PostgresOutput) Replicas() pulumi.IntOutput {
return o.ApplyT(func(v *Postgres) pulumi.IntOutput { return v.Replicas }).(pulumi.IntOutput)
}
// Docker Swarm restart policy, as a JSON object.
func (o PostgresOutput) RestartPolicySwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.RestartPolicySwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rollback configuration, as a JSON object.
func (o PostgresOutput) RollbackConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.RollbackConfigSwarm }).(pulumi.StringPtrOutput)
}
// Remote server to deploy on. Omit to use the Dokploy host itself.
func (o PostgresOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Grace period in nanoseconds before a container is killed.
func (o PostgresOutput) StopGracePeriodSwarm() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.IntPtrOutput { return v.StopGracePeriodSwarm }).(pulumi.IntPtrOutput)
}
// Docker Swarm ulimits, as a JSON object.
func (o PostgresOutput) UlimitsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.UlimitsSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rolling update configuration, as a JSON object.
func (o PostgresOutput) UpdateConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Postgres) pulumi.StringPtrOutput { return v.UpdateConfigSwarm }).(pulumi.StringPtrOutput)
}
type PostgresArrayOutput struct{ *pulumi.OutputState }
func (PostgresArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Postgres)(nil)).Elem()
}
func (o PostgresArrayOutput) ToPostgresArrayOutput() PostgresArrayOutput {
return o
}
func (o PostgresArrayOutput) ToPostgresArrayOutputWithContext(ctx context.Context) PostgresArrayOutput {
return o
}
func (o PostgresArrayOutput) Index(i pulumi.IntInput) PostgresOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Postgres {
return vs[0].([]*Postgres)[vs[1].(int)]
}).(PostgresOutput)
}
type PostgresMapOutput struct{ *pulumi.OutputState }
func (PostgresMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Postgres)(nil)).Elem()
}
func (o PostgresMapOutput) ToPostgresMapOutput() PostgresMapOutput {
return o
}
func (o PostgresMapOutput) ToPostgresMapOutputWithContext(ctx context.Context) PostgresMapOutput {
return o
}
func (o PostgresMapOutput) MapIndex(k pulumi.StringInput) PostgresOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Postgres {
return vs[0].(map[string]*Postgres)[vs[1].(string)]
}).(PostgresOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PostgresInput)(nil)).Elem(), &Postgres{})
pulumi.RegisterInputType(reflect.TypeOf((*PostgresArrayInput)(nil)).Elem(), PostgresArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PostgresMapInput)(nil)).Elem(), PostgresMap{})
pulumi.RegisterOutputType(PostgresOutput{})
pulumi.RegisterOutputType(PostgresArrayOutput{})
pulumi.RegisterOutputType(PostgresMapOutput{})
}

277
sdk/go/dokploy/project.go generated Normal file
View File

@@ -0,0 +1,277 @@
// 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{})
}

162
sdk/go/dokploy/provider.go generated Normal file
View File

@@ -0,0 +1,162 @@
// 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"
)
// The provider type for the dokploy package. By default, resources use package-wide configuration
// settings, however an explicit `Provider` instance may be created and passed during resource
// construction to achieve fine-grained programmatic control over provider settings. See the
// [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
type Provider struct {
pulumi.ProviderResourceState
// API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
ApiKey pulumi.StringPtrOutput `pulumi:"apiKey"`
// Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
Host pulumi.StringPtrOutput `pulumi:"host"`
}
// NewProvider registers a new resource with the given unique name, arguments, and options.
func NewProvider(ctx *pulumi.Context,
name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
if args == nil {
args = &ProviderArgs{}
}
if args.ApiKey == nil {
if d := internal.GetEnvOrDefault(nil, nil, "DOKPLOY_API_KEY"); d != nil {
args.ApiKey = pulumi.StringPtr(d.(string))
}
}
if args.Host == nil {
if d := internal.GetEnvOrDefault(nil, nil, "DOKPLOY_HOST"); d != nil {
args.Host = pulumi.StringPtr(d.(string))
}
}
if args.TimeoutSeconds == nil {
if d := internal.GetEnvOrDefault(nil, internal.ParseEnvInt, "DOKPLOY_TIMEOUT_SECONDS"); d != nil {
args.TimeoutSeconds = pulumi.IntPtr(d.(int))
}
}
if args.ApiKey != nil {
args.ApiKey = pulumi.ToSecret(args.ApiKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"apiKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Provider
err := ctx.RegisterResource("pulumi:providers:dokploy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type providerArgs struct {
// API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
ApiKey *string `pulumi:"apiKey"`
// Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
Host *string `pulumi:"host"`
// Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
InsecureSkipVerify *bool `pulumi:"insecureSkipVerify"`
// Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
TimeoutSeconds *int `pulumi:"timeoutSeconds"`
}
// The set of arguments for constructing a Provider resource.
type ProviderArgs struct {
// API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
ApiKey pulumi.StringPtrInput
// Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
Host pulumi.StringPtrInput
// Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
InsecureSkipVerify pulumi.BoolPtrInput
// Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
TimeoutSeconds pulumi.IntPtrInput
}
func (ProviderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*providerArgs)(nil)).Elem()
}
// This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
func (r *Provider) TerraformConfig(ctx *pulumi.Context) (ProviderTerraformConfigResultOutput, error) {
out, err := ctx.Call("pulumi:providers:dokploy/terraformConfig", nil, ProviderTerraformConfigResultOutput{}, r)
if err != nil {
return ProviderTerraformConfigResultOutput{}, err
}
return out.(ProviderTerraformConfigResultOutput), nil
}
type ProviderTerraformConfigResult struct {
Result map[string]interface{} `pulumi:"result"`
}
type ProviderTerraformConfigResultOutput struct{ *pulumi.OutputState }
func (ProviderTerraformConfigResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ProviderTerraformConfigResult)(nil)).Elem()
}
func (o ProviderTerraformConfigResultOutput) Result() pulumi.MapOutput {
return o.ApplyT(func(v ProviderTerraformConfigResult) map[string]interface{} { return v.Result }).(pulumi.MapOutput)
}
type ProviderInput interface {
pulumi.Input
ToProviderOutput() ProviderOutput
ToProviderOutputWithContext(ctx context.Context) ProviderOutput
}
func (*Provider) ElementType() reflect.Type {
return reflect.TypeOf((**Provider)(nil)).Elem()
}
func (i *Provider) ToProviderOutput() ProviderOutput {
return i.ToProviderOutputWithContext(context.Background())
}
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput)
}
type ProviderOutput struct{ *pulumi.OutputState }
func (ProviderOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Provider)(nil)).Elem()
}
func (o ProviderOutput) ToProviderOutput() ProviderOutput {
return o
}
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return o
}
// API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
func (o ProviderOutput) ApiKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ApiKey }).(pulumi.StringPtrOutput)
}
// Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
func (o ProviderOutput) Host() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Host }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{})
pulumi.RegisterOutputType(ProviderOutput{})
pulumi.RegisterOutputType(ProviderTerraformConfigResultOutput{})
}

6
sdk/go/dokploy/pulumi-plugin.json generated Normal file
View File

@@ -0,0 +1,6 @@
{
"resource": true,
"name": "dokploy",
"version": "0.1.0",
"server": "github://api.github.com/maxvojtkov/pulumi-dokploy"
}

359
sdk/go/dokploy/pulumiTypes.go generated Normal file
View File

@@ -0,0 +1,359 @@
// 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"
)
var _ = internal.GetEnvOrDefault
type GetProjectEnvironment struct {
Id string `pulumi:"id"`
IsDefault bool `pulumi:"isDefault"`
Name string `pulumi:"name"`
}
// GetProjectEnvironmentInput is an input type that accepts GetProjectEnvironmentArgs and GetProjectEnvironmentOutput values.
// You can construct a concrete instance of `GetProjectEnvironmentInput` via:
//
// GetProjectEnvironmentArgs{...}
type GetProjectEnvironmentInput interface {
pulumi.Input
ToGetProjectEnvironmentOutput() GetProjectEnvironmentOutput
ToGetProjectEnvironmentOutputWithContext(context.Context) GetProjectEnvironmentOutput
}
type GetProjectEnvironmentArgs struct {
Id pulumi.StringInput `pulumi:"id"`
IsDefault pulumi.BoolInput `pulumi:"isDefault"`
Name pulumi.StringInput `pulumi:"name"`
}
func (GetProjectEnvironmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetProjectEnvironment)(nil)).Elem()
}
func (i GetProjectEnvironmentArgs) ToGetProjectEnvironmentOutput() GetProjectEnvironmentOutput {
return i.ToGetProjectEnvironmentOutputWithContext(context.Background())
}
func (i GetProjectEnvironmentArgs) ToGetProjectEnvironmentOutputWithContext(ctx context.Context) GetProjectEnvironmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetProjectEnvironmentOutput)
}
// GetProjectEnvironmentArrayInput is an input type that accepts GetProjectEnvironmentArray and GetProjectEnvironmentArrayOutput values.
// You can construct a concrete instance of `GetProjectEnvironmentArrayInput` via:
//
// GetProjectEnvironmentArray{ GetProjectEnvironmentArgs{...} }
type GetProjectEnvironmentArrayInput interface {
pulumi.Input
ToGetProjectEnvironmentArrayOutput() GetProjectEnvironmentArrayOutput
ToGetProjectEnvironmentArrayOutputWithContext(context.Context) GetProjectEnvironmentArrayOutput
}
type GetProjectEnvironmentArray []GetProjectEnvironmentInput
func (GetProjectEnvironmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetProjectEnvironment)(nil)).Elem()
}
func (i GetProjectEnvironmentArray) ToGetProjectEnvironmentArrayOutput() GetProjectEnvironmentArrayOutput {
return i.ToGetProjectEnvironmentArrayOutputWithContext(context.Background())
}
func (i GetProjectEnvironmentArray) ToGetProjectEnvironmentArrayOutputWithContext(ctx context.Context) GetProjectEnvironmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetProjectEnvironmentArrayOutput)
}
type GetProjectEnvironmentOutput struct{ *pulumi.OutputState }
func (GetProjectEnvironmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetProjectEnvironment)(nil)).Elem()
}
func (o GetProjectEnvironmentOutput) ToGetProjectEnvironmentOutput() GetProjectEnvironmentOutput {
return o
}
func (o GetProjectEnvironmentOutput) ToGetProjectEnvironmentOutputWithContext(ctx context.Context) GetProjectEnvironmentOutput {
return o
}
func (o GetProjectEnvironmentOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetProjectEnvironment) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetProjectEnvironmentOutput) IsDefault() pulumi.BoolOutput {
return o.ApplyT(func(v GetProjectEnvironment) bool { return v.IsDefault }).(pulumi.BoolOutput)
}
func (o GetProjectEnvironmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetProjectEnvironment) string { return v.Name }).(pulumi.StringOutput)
}
type GetProjectEnvironmentArrayOutput struct{ *pulumi.OutputState }
func (GetProjectEnvironmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetProjectEnvironment)(nil)).Elem()
}
func (o GetProjectEnvironmentArrayOutput) ToGetProjectEnvironmentArrayOutput() GetProjectEnvironmentArrayOutput {
return o
}
func (o GetProjectEnvironmentArrayOutput) ToGetProjectEnvironmentArrayOutputWithContext(ctx context.Context) GetProjectEnvironmentArrayOutput {
return o
}
func (o GetProjectEnvironmentArrayOutput) Index(i pulumi.IntInput) GetProjectEnvironmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetProjectEnvironment {
return vs[0].([]GetProjectEnvironment)[vs[1].(int)]
}).(GetProjectEnvironmentOutput)
}
type GetProjectsProject struct {
DefaultEnvironmentId string `pulumi:"defaultEnvironmentId"`
Description string `pulumi:"description"`
Id string `pulumi:"id"`
Name string `pulumi:"name"`
}
// GetProjectsProjectInput is an input type that accepts GetProjectsProjectArgs and GetProjectsProjectOutput values.
// You can construct a concrete instance of `GetProjectsProjectInput` via:
//
// GetProjectsProjectArgs{...}
type GetProjectsProjectInput interface {
pulumi.Input
ToGetProjectsProjectOutput() GetProjectsProjectOutput
ToGetProjectsProjectOutputWithContext(context.Context) GetProjectsProjectOutput
}
type GetProjectsProjectArgs struct {
DefaultEnvironmentId pulumi.StringInput `pulumi:"defaultEnvironmentId"`
Description pulumi.StringInput `pulumi:"description"`
Id pulumi.StringInput `pulumi:"id"`
Name pulumi.StringInput `pulumi:"name"`
}
func (GetProjectsProjectArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetProjectsProject)(nil)).Elem()
}
func (i GetProjectsProjectArgs) ToGetProjectsProjectOutput() GetProjectsProjectOutput {
return i.ToGetProjectsProjectOutputWithContext(context.Background())
}
func (i GetProjectsProjectArgs) ToGetProjectsProjectOutputWithContext(ctx context.Context) GetProjectsProjectOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetProjectsProjectOutput)
}
// GetProjectsProjectArrayInput is an input type that accepts GetProjectsProjectArray and GetProjectsProjectArrayOutput values.
// You can construct a concrete instance of `GetProjectsProjectArrayInput` via:
//
// GetProjectsProjectArray{ GetProjectsProjectArgs{...} }
type GetProjectsProjectArrayInput interface {
pulumi.Input
ToGetProjectsProjectArrayOutput() GetProjectsProjectArrayOutput
ToGetProjectsProjectArrayOutputWithContext(context.Context) GetProjectsProjectArrayOutput
}
type GetProjectsProjectArray []GetProjectsProjectInput
func (GetProjectsProjectArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetProjectsProject)(nil)).Elem()
}
func (i GetProjectsProjectArray) ToGetProjectsProjectArrayOutput() GetProjectsProjectArrayOutput {
return i.ToGetProjectsProjectArrayOutputWithContext(context.Background())
}
func (i GetProjectsProjectArray) ToGetProjectsProjectArrayOutputWithContext(ctx context.Context) GetProjectsProjectArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetProjectsProjectArrayOutput)
}
type GetProjectsProjectOutput struct{ *pulumi.OutputState }
func (GetProjectsProjectOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetProjectsProject)(nil)).Elem()
}
func (o GetProjectsProjectOutput) ToGetProjectsProjectOutput() GetProjectsProjectOutput {
return o
}
func (o GetProjectsProjectOutput) ToGetProjectsProjectOutputWithContext(ctx context.Context) GetProjectsProjectOutput {
return o
}
func (o GetProjectsProjectOutput) DefaultEnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetProjectsProject) string { return v.DefaultEnvironmentId }).(pulumi.StringOutput)
}
func (o GetProjectsProjectOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetProjectsProject) string { return v.Description }).(pulumi.StringOutput)
}
func (o GetProjectsProjectOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetProjectsProject) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetProjectsProjectOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetProjectsProject) string { return v.Name }).(pulumi.StringOutput)
}
type GetProjectsProjectArrayOutput struct{ *pulumi.OutputState }
func (GetProjectsProjectArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetProjectsProject)(nil)).Elem()
}
func (o GetProjectsProjectArrayOutput) ToGetProjectsProjectArrayOutput() GetProjectsProjectArrayOutput {
return o
}
func (o GetProjectsProjectArrayOutput) ToGetProjectsProjectArrayOutputWithContext(ctx context.Context) GetProjectsProjectArrayOutput {
return o
}
func (o GetProjectsProjectArrayOutput) Index(i pulumi.IntInput) GetProjectsProjectOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetProjectsProject {
return vs[0].([]GetProjectsProject)[vs[1].(int)]
}).(GetProjectsProjectOutput)
}
type GetServersServer struct {
Id string `pulumi:"id"`
IpAddress string `pulumi:"ipAddress"`
Name string `pulumi:"name"`
ServerStatus string `pulumi:"serverStatus"`
}
// GetServersServerInput is an input type that accepts GetServersServerArgs and GetServersServerOutput values.
// You can construct a concrete instance of `GetServersServerInput` via:
//
// GetServersServerArgs{...}
type GetServersServerInput interface {
pulumi.Input
ToGetServersServerOutput() GetServersServerOutput
ToGetServersServerOutputWithContext(context.Context) GetServersServerOutput
}
type GetServersServerArgs struct {
Id pulumi.StringInput `pulumi:"id"`
IpAddress pulumi.StringInput `pulumi:"ipAddress"`
Name pulumi.StringInput `pulumi:"name"`
ServerStatus pulumi.StringInput `pulumi:"serverStatus"`
}
func (GetServersServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetServersServer)(nil)).Elem()
}
func (i GetServersServerArgs) ToGetServersServerOutput() GetServersServerOutput {
return i.ToGetServersServerOutputWithContext(context.Background())
}
func (i GetServersServerArgs) ToGetServersServerOutputWithContext(ctx context.Context) GetServersServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetServersServerOutput)
}
// GetServersServerArrayInput is an input type that accepts GetServersServerArray and GetServersServerArrayOutput values.
// You can construct a concrete instance of `GetServersServerArrayInput` via:
//
// GetServersServerArray{ GetServersServerArgs{...} }
type GetServersServerArrayInput interface {
pulumi.Input
ToGetServersServerArrayOutput() GetServersServerArrayOutput
ToGetServersServerArrayOutputWithContext(context.Context) GetServersServerArrayOutput
}
type GetServersServerArray []GetServersServerInput
func (GetServersServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetServersServer)(nil)).Elem()
}
func (i GetServersServerArray) ToGetServersServerArrayOutput() GetServersServerArrayOutput {
return i.ToGetServersServerArrayOutputWithContext(context.Background())
}
func (i GetServersServerArray) ToGetServersServerArrayOutputWithContext(ctx context.Context) GetServersServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetServersServerArrayOutput)
}
type GetServersServerOutput struct{ *pulumi.OutputState }
func (GetServersServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServersServer)(nil)).Elem()
}
func (o GetServersServerOutput) ToGetServersServerOutput() GetServersServerOutput {
return o
}
func (o GetServersServerOutput) ToGetServersServerOutputWithContext(ctx context.Context) GetServersServerOutput {
return o
}
func (o GetServersServerOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetServersServer) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetServersServerOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v GetServersServer) string { return v.IpAddress }).(pulumi.StringOutput)
}
func (o GetServersServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetServersServer) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetServersServerOutput) ServerStatus() pulumi.StringOutput {
return o.ApplyT(func(v GetServersServer) string { return v.ServerStatus }).(pulumi.StringOutput)
}
type GetServersServerArrayOutput struct{ *pulumi.OutputState }
func (GetServersServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetServersServer)(nil)).Elem()
}
func (o GetServersServerArrayOutput) ToGetServersServerArrayOutput() GetServersServerArrayOutput {
return o
}
func (o GetServersServerArrayOutput) ToGetServersServerArrayOutputWithContext(ctx context.Context) GetServersServerArrayOutput {
return o
}
func (o GetServersServerArrayOutput) Index(i pulumi.IntInput) GetServersServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetServersServer {
return vs[0].([]GetServersServer)[vs[1].(int)]
}).(GetServersServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GetProjectEnvironmentInput)(nil)).Elem(), GetProjectEnvironmentArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetProjectEnvironmentArrayInput)(nil)).Elem(), GetProjectEnvironmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GetProjectsProjectInput)(nil)).Elem(), GetProjectsProjectArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetProjectsProjectArrayInput)(nil)).Elem(), GetProjectsProjectArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GetServersServerInput)(nil)).Elem(), GetServersServerArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetServersServerArrayInput)(nil)).Elem(), GetServersServerArray{})
pulumi.RegisterOutputType(GetProjectEnvironmentOutput{})
pulumi.RegisterOutputType(GetProjectEnvironmentArrayOutput{})
pulumi.RegisterOutputType(GetProjectsProjectOutput{})
pulumi.RegisterOutputType(GetProjectsProjectArrayOutput{})
pulumi.RegisterOutputType(GetServersServerOutput{})
pulumi.RegisterOutputType(GetServersServerArrayOutput{})
}

280
sdk/go/dokploy/redirect.go generated Normal file
View File

@@ -0,0 +1,280 @@
// 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"
)
type Redirect struct {
pulumi.CustomResourceState
// Application this redirect belongs to.
ApplicationId pulumi.StringOutput `pulumi:"applicationId"`
// RFC 3339 timestamp of when the redirect was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Issue a permanent (301) redirect instead of a temporary (302) one.
Permanent pulumi.BoolOutput `pulumi:"permanent"`
// Regular expression matched against the incoming URL.
Regex pulumi.StringOutput `pulumi:"regex"`
// Replacement URL, which may reference capture groups such as `${1}`.
Replacement pulumi.StringOutput `pulumi:"replacement"`
}
// NewRedirect registers a new resource with the given unique name, arguments, and options.
func NewRedirect(ctx *pulumi.Context,
name string, args *RedirectArgs, opts ...pulumi.ResourceOption) (*Redirect, 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.Regex == nil {
return nil, errors.New("invalid value for required argument 'Regex'")
}
if args.Replacement == nil {
return nil, errors.New("invalid value for required argument 'Replacement'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Redirect
err := ctx.RegisterResource("dokploy:index/redirect:Redirect", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRedirect gets an existing Redirect 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 GetRedirect(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RedirectState, opts ...pulumi.ResourceOption) (*Redirect, error) {
var resource Redirect
err := ctx.ReadResource("dokploy:index/redirect:Redirect", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Redirect resources.
type redirectState struct {
// Application this redirect belongs to.
ApplicationId *string `pulumi:"applicationId"`
// RFC 3339 timestamp of when the redirect was created.
CreatedAt *string `pulumi:"createdAt"`
// Issue a permanent (301) redirect instead of a temporary (302) one.
Permanent *bool `pulumi:"permanent"`
// Regular expression matched against the incoming URL.
Regex *string `pulumi:"regex"`
// Replacement URL, which may reference capture groups such as `${1}`.
Replacement *string `pulumi:"replacement"`
}
type RedirectState struct {
// Application this redirect belongs to.
ApplicationId pulumi.StringPtrInput
// RFC 3339 timestamp of when the redirect was created.
CreatedAt pulumi.StringPtrInput
// Issue a permanent (301) redirect instead of a temporary (302) one.
Permanent pulumi.BoolPtrInput
// Regular expression matched against the incoming URL.
Regex pulumi.StringPtrInput
// Replacement URL, which may reference capture groups such as `${1}`.
Replacement pulumi.StringPtrInput
}
func (RedirectState) ElementType() reflect.Type {
return reflect.TypeOf((*redirectState)(nil)).Elem()
}
type redirectArgs struct {
// Application this redirect belongs to.
ApplicationId string `pulumi:"applicationId"`
// Issue a permanent (301) redirect instead of a temporary (302) one.
Permanent *bool `pulumi:"permanent"`
// Regular expression matched against the incoming URL.
Regex string `pulumi:"regex"`
// Replacement URL, which may reference capture groups such as `${1}`.
Replacement string `pulumi:"replacement"`
}
// The set of arguments for constructing a Redirect resource.
type RedirectArgs struct {
// Application this redirect belongs to.
ApplicationId pulumi.StringInput
// Issue a permanent (301) redirect instead of a temporary (302) one.
Permanent pulumi.BoolPtrInput
// Regular expression matched against the incoming URL.
Regex pulumi.StringInput
// Replacement URL, which may reference capture groups such as `${1}`.
Replacement pulumi.StringInput
}
func (RedirectArgs) ElementType() reflect.Type {
return reflect.TypeOf((*redirectArgs)(nil)).Elem()
}
type RedirectInput interface {
pulumi.Input
ToRedirectOutput() RedirectOutput
ToRedirectOutputWithContext(ctx context.Context) RedirectOutput
}
func (*Redirect) ElementType() reflect.Type {
return reflect.TypeOf((**Redirect)(nil)).Elem()
}
func (i *Redirect) ToRedirectOutput() RedirectOutput {
return i.ToRedirectOutputWithContext(context.Background())
}
func (i *Redirect) ToRedirectOutputWithContext(ctx context.Context) RedirectOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedirectOutput)
}
// RedirectArrayInput is an input type that accepts RedirectArray and RedirectArrayOutput values.
// You can construct a concrete instance of `RedirectArrayInput` via:
//
// RedirectArray{ RedirectArgs{...} }
type RedirectArrayInput interface {
pulumi.Input
ToRedirectArrayOutput() RedirectArrayOutput
ToRedirectArrayOutputWithContext(context.Context) RedirectArrayOutput
}
type RedirectArray []RedirectInput
func (RedirectArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Redirect)(nil)).Elem()
}
func (i RedirectArray) ToRedirectArrayOutput() RedirectArrayOutput {
return i.ToRedirectArrayOutputWithContext(context.Background())
}
func (i RedirectArray) ToRedirectArrayOutputWithContext(ctx context.Context) RedirectArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedirectArrayOutput)
}
// RedirectMapInput is an input type that accepts RedirectMap and RedirectMapOutput values.
// You can construct a concrete instance of `RedirectMapInput` via:
//
// RedirectMap{ "key": RedirectArgs{...} }
type RedirectMapInput interface {
pulumi.Input
ToRedirectMapOutput() RedirectMapOutput
ToRedirectMapOutputWithContext(context.Context) RedirectMapOutput
}
type RedirectMap map[string]RedirectInput
func (RedirectMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Redirect)(nil)).Elem()
}
func (i RedirectMap) ToRedirectMapOutput() RedirectMapOutput {
return i.ToRedirectMapOutputWithContext(context.Background())
}
func (i RedirectMap) ToRedirectMapOutputWithContext(ctx context.Context) RedirectMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedirectMapOutput)
}
type RedirectOutput struct{ *pulumi.OutputState }
func (RedirectOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Redirect)(nil)).Elem()
}
func (o RedirectOutput) ToRedirectOutput() RedirectOutput {
return o
}
func (o RedirectOutput) ToRedirectOutputWithContext(ctx context.Context) RedirectOutput {
return o
}
// Application this redirect belongs to.
func (o RedirectOutput) ApplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *Redirect) pulumi.StringOutput { return v.ApplicationId }).(pulumi.StringOutput)
}
// RFC 3339 timestamp of when the redirect was created.
func (o RedirectOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Redirect) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Issue a permanent (301) redirect instead of a temporary (302) one.
func (o RedirectOutput) Permanent() pulumi.BoolOutput {
return o.ApplyT(func(v *Redirect) pulumi.BoolOutput { return v.Permanent }).(pulumi.BoolOutput)
}
// Regular expression matched against the incoming URL.
func (o RedirectOutput) Regex() pulumi.StringOutput {
return o.ApplyT(func(v *Redirect) pulumi.StringOutput { return v.Regex }).(pulumi.StringOutput)
}
// Replacement URL, which may reference capture groups such as `${1}`.
func (o RedirectOutput) Replacement() pulumi.StringOutput {
return o.ApplyT(func(v *Redirect) pulumi.StringOutput { return v.Replacement }).(pulumi.StringOutput)
}
type RedirectArrayOutput struct{ *pulumi.OutputState }
func (RedirectArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Redirect)(nil)).Elem()
}
func (o RedirectArrayOutput) ToRedirectArrayOutput() RedirectArrayOutput {
return o
}
func (o RedirectArrayOutput) ToRedirectArrayOutputWithContext(ctx context.Context) RedirectArrayOutput {
return o
}
func (o RedirectArrayOutput) Index(i pulumi.IntInput) RedirectOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Redirect {
return vs[0].([]*Redirect)[vs[1].(int)]
}).(RedirectOutput)
}
type RedirectMapOutput struct{ *pulumi.OutputState }
func (RedirectMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Redirect)(nil)).Elem()
}
func (o RedirectMapOutput) ToRedirectMapOutput() RedirectMapOutput {
return o
}
func (o RedirectMapOutput) ToRedirectMapOutputWithContext(ctx context.Context) RedirectMapOutput {
return o
}
func (o RedirectMapOutput) MapIndex(k pulumi.StringInput) RedirectOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Redirect {
return vs[0].(map[string]*Redirect)[vs[1].(string)]
}).(RedirectOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RedirectInput)(nil)).Elem(), &Redirect{})
pulumi.RegisterInputType(reflect.TypeOf((*RedirectArrayInput)(nil)).Elem(), RedirectArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RedirectMapInput)(nil)).Elem(), RedirectMap{})
pulumi.RegisterOutputType(RedirectOutput{})
pulumi.RegisterOutputType(RedirectArrayOutput{})
pulumi.RegisterOutputType(RedirectMapOutput{})
}

673
sdk/go/dokploy/redis.go generated Normal file
View File

@@ -0,0 +1,673 @@
// 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"
)
type Redis struct {
pulumi.CustomResourceState
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringOutput `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringOutput `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args pulumi.StringArrayOutput `pulumi:"args"`
// Override the container entrypoint command.
Command pulumi.StringPtrOutput `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrOutput `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrOutput `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Password used to authenticate to Redis.
DatabasePassword pulumi.StringOutput `pulumi:"databasePassword"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolOutput `pulumi:"detachDokployNetwork"`
// Redis image to run, for example `redis:7`.
DockerImage pulumi.StringOutput `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrOutput `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrOutput `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId pulumi.StringOutput `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrOutput `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrOutput `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrOutput `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrOutput `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrOutput `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrOutput `pulumi:"modeSwarm"`
// Display name of the database.
Name pulumi.StringOutput `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayOutput `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrOutput `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrOutput `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas pulumi.IntOutput `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrOutput `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrOutput `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrOutput `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrOutput `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrOutput `pulumi:"updateConfigSwarm"`
}
// NewRedis registers a new resource with the given unique name, arguments, and options.
func NewRedis(ctx *pulumi.Context,
name string, args *RedisArgs, opts ...pulumi.ResourceOption) (*Redis, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DatabasePassword == nil {
return nil, errors.New("invalid value for required argument 'DatabasePassword'")
}
if args.DockerImage == nil {
return nil, errors.New("invalid value for required argument 'DockerImage'")
}
if args.EnvironmentId == nil {
return nil, errors.New("invalid value for required argument 'EnvironmentId'")
}
if args.DatabasePassword != nil {
args.DatabasePassword = pulumi.ToSecret(args.DatabasePassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"databasePassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Redis
err := ctx.RegisterResource("dokploy:index/redis:Redis", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRedis gets an existing Redis 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 GetRedis(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RedisState, opts ...pulumi.ResourceOption) (*Redis, error) {
var resource Redis
err := ctx.ReadResource("dokploy:index/redis:Redis", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Redis resources.
type redisState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus *string `pulumi:"applicationStatus"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// RFC 3339 timestamp of when the database was created.
CreatedAt *string `pulumi:"createdAt"`
// Password used to authenticate to Redis.
DatabasePassword *string `pulumi:"databasePassword"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// Redis image to run, for example `redis:7`.
DockerImage *string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId *string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
type RedisState struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
ApplicationStatus pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// RFC 3339 timestamp of when the database was created.
CreatedAt pulumi.StringPtrInput
// Password used to authenticate to Redis.
DatabasePassword pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// Redis image to run, for example `redis:7`.
DockerImage pulumi.StringPtrInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringPtrInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (RedisState) ElementType() reflect.Type {
return reflect.TypeOf((*redisState)(nil)).Elem()
}
type redisArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName *string `pulumi:"appName"`
// Arguments appended to the container command.
Args []string `pulumi:"args"`
// Override the container entrypoint command.
Command *string `pulumi:"command"`
// Hard CPU limit, for example `1`.
CpuLimit *string `pulumi:"cpuLimit"`
// Soft CPU reservation, for example `0.5`.
CpuReservation *string `pulumi:"cpuReservation"`
// Password used to authenticate to Redis.
DatabasePassword string `pulumi:"databasePassword"`
// Free-form description.
Description *string `pulumi:"description"`
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork *bool `pulumi:"detachDokployNetwork"`
// Redis image to run, for example `redis:7`.
DockerImage string `pulumi:"dockerImage"`
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm *string `pulumi:"endpointSpecSwarm"`
// Environment variables in `KEY=value` format, one per line.
Env *string `pulumi:"env"`
// Environment this database belongs to.
EnvironmentId string `pulumi:"environmentId"`
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort *int `pulumi:"externalPort"`
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm *string `pulumi:"healthCheckSwarm"`
// Docker Swarm service labels, as a JSON object.
LabelsSwarm *string `pulumi:"labelsSwarm"`
// Hard memory limit, for example `512m`.
MemoryLimit *string `pulumi:"memoryLimit"`
// Soft memory reservation, for example `256m`.
MemoryReservation *string `pulumi:"memoryReservation"`
// Docker Swarm service mode, as a JSON object.
ModeSwarm *string `pulumi:"modeSwarm"`
// Display name of the database.
Name *string `pulumi:"name"`
// IDs of additional Docker networks to attach.
NetworkIds []string `pulumi:"networkIds"`
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm *string `pulumi:"networkSwarm"`
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm *string `pulumi:"placementSwarm"`
// Number of replicas to run.
Replicas *int `pulumi:"replicas"`
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm *string `pulumi:"restartPolicySwarm"`
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm *string `pulumi:"rollbackConfigSwarm"`
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId *string `pulumi:"serverId"`
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm *string `pulumi:"ulimitsSwarm"`
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
}
// The set of arguments for constructing a Redis resource.
type RedisArgs struct {
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
AppName pulumi.StringPtrInput
// Arguments appended to the container command.
Args pulumi.StringArrayInput
// Override the container entrypoint command.
Command pulumi.StringPtrInput
// Hard CPU limit, for example `1`.
CpuLimit pulumi.StringPtrInput
// Soft CPU reservation, for example `0.5`.
CpuReservation pulumi.StringPtrInput
// Password used to authenticate to Redis.
DatabasePassword pulumi.StringInput
// Free-form description.
Description pulumi.StringPtrInput
// Detach the service from the shared `dokploy-network`.
DetachDokployNetwork pulumi.BoolPtrInput
// Redis image to run, for example `redis:7`.
DockerImage pulumi.StringInput
// Docker Swarm endpoint specification, as a JSON object.
EndpointSpecSwarm pulumi.StringPtrInput
// Environment variables in `KEY=value` format, one per line.
Env pulumi.StringPtrInput
// Environment this database belongs to.
EnvironmentId pulumi.StringInput
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
ExternalPort pulumi.IntPtrInput
// Docker Swarm health check configuration, as a JSON object.
HealthCheckSwarm pulumi.StringPtrInput
// Docker Swarm service labels, as a JSON object.
LabelsSwarm pulumi.StringPtrInput
// Hard memory limit, for example `512m`.
MemoryLimit pulumi.StringPtrInput
// Soft memory reservation, for example `256m`.
MemoryReservation pulumi.StringPtrInput
// Docker Swarm service mode, as a JSON object.
ModeSwarm pulumi.StringPtrInput
// Display name of the database.
Name pulumi.StringPtrInput
// IDs of additional Docker networks to attach.
NetworkIds pulumi.StringArrayInput
// Docker Swarm network attachments, as a JSON array.
NetworkSwarm pulumi.StringPtrInput
// Docker Swarm placement constraints, as a JSON object.
PlacementSwarm pulumi.StringPtrInput
// Number of replicas to run.
Replicas pulumi.IntPtrInput
// Docker Swarm restart policy, as a JSON object.
RestartPolicySwarm pulumi.StringPtrInput
// Docker Swarm rollback configuration, as a JSON object.
RollbackConfigSwarm pulumi.StringPtrInput
// Remote server to deploy on. Omit to use the Dokploy host itself.
ServerId pulumi.StringPtrInput
// Grace period in nanoseconds before a container is killed.
StopGracePeriodSwarm pulumi.IntPtrInput
// Docker Swarm ulimits, as a JSON object.
UlimitsSwarm pulumi.StringPtrInput
// Docker Swarm rolling update configuration, as a JSON object.
UpdateConfigSwarm pulumi.StringPtrInput
}
func (RedisArgs) ElementType() reflect.Type {
return reflect.TypeOf((*redisArgs)(nil)).Elem()
}
type RedisInput interface {
pulumi.Input
ToRedisOutput() RedisOutput
ToRedisOutputWithContext(ctx context.Context) RedisOutput
}
func (*Redis) ElementType() reflect.Type {
return reflect.TypeOf((**Redis)(nil)).Elem()
}
func (i *Redis) ToRedisOutput() RedisOutput {
return i.ToRedisOutputWithContext(context.Background())
}
func (i *Redis) ToRedisOutputWithContext(ctx context.Context) RedisOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedisOutput)
}
// RedisArrayInput is an input type that accepts RedisArray and RedisArrayOutput values.
// You can construct a concrete instance of `RedisArrayInput` via:
//
// RedisArray{ RedisArgs{...} }
type RedisArrayInput interface {
pulumi.Input
ToRedisArrayOutput() RedisArrayOutput
ToRedisArrayOutputWithContext(context.Context) RedisArrayOutput
}
type RedisArray []RedisInput
func (RedisArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Redis)(nil)).Elem()
}
func (i RedisArray) ToRedisArrayOutput() RedisArrayOutput {
return i.ToRedisArrayOutputWithContext(context.Background())
}
func (i RedisArray) ToRedisArrayOutputWithContext(ctx context.Context) RedisArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedisArrayOutput)
}
// RedisMapInput is an input type that accepts RedisMap and RedisMapOutput values.
// You can construct a concrete instance of `RedisMapInput` via:
//
// RedisMap{ "key": RedisArgs{...} }
type RedisMapInput interface {
pulumi.Input
ToRedisMapOutput() RedisMapOutput
ToRedisMapOutputWithContext(context.Context) RedisMapOutput
}
type RedisMap map[string]RedisInput
func (RedisMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Redis)(nil)).Elem()
}
func (i RedisMap) ToRedisMapOutput() RedisMapOutput {
return i.ToRedisMapOutputWithContext(context.Background())
}
func (i RedisMap) ToRedisMapOutputWithContext(ctx context.Context) RedisMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RedisMapOutput)
}
type RedisOutput struct{ *pulumi.OutputState }
func (RedisOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Redis)(nil)).Elem()
}
func (o RedisOutput) ToRedisOutput() RedisOutput {
return o
}
func (o RedisOutput) ToRedisOutputWithContext(ctx context.Context) RedisOutput {
return o
}
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
func (o RedisOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *Redis) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
func (o RedisOutput) ApplicationStatus() pulumi.StringOutput {
return o.ApplyT(func(v *Redis) pulumi.StringOutput { return v.ApplicationStatus }).(pulumi.StringOutput)
}
// Arguments appended to the container command.
func (o RedisOutput) Args() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Redis) pulumi.StringArrayOutput { return v.Args }).(pulumi.StringArrayOutput)
}
// Override the container entrypoint command.
func (o RedisOutput) Command() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.Command }).(pulumi.StringPtrOutput)
}
// Hard CPU limit, for example `1`.
func (o RedisOutput) CpuLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.CpuLimit }).(pulumi.StringPtrOutput)
}
// Soft CPU reservation, for example `0.5`.
func (o RedisOutput) CpuReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.CpuReservation }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the database was created.
func (o RedisOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Redis) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Password used to authenticate to Redis.
func (o RedisOutput) DatabasePassword() pulumi.StringOutput {
return o.ApplyT(func(v *Redis) pulumi.StringOutput { return v.DatabasePassword }).(pulumi.StringOutput)
}
// Free-form description.
func (o RedisOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Detach the service from the shared `dokploy-network`.
func (o RedisOutput) DetachDokployNetwork() pulumi.BoolOutput {
return o.ApplyT(func(v *Redis) pulumi.BoolOutput { return v.DetachDokployNetwork }).(pulumi.BoolOutput)
}
// Redis image to run, for example `redis:7`.
func (o RedisOutput) DockerImage() pulumi.StringOutput {
return o.ApplyT(func(v *Redis) pulumi.StringOutput { return v.DockerImage }).(pulumi.StringOutput)
}
// Docker Swarm endpoint specification, as a JSON object.
func (o RedisOutput) EndpointSpecSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.EndpointSpecSwarm }).(pulumi.StringPtrOutput)
}
// Environment variables in `KEY=value` format, one per line.
func (o RedisOutput) Env() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
}
// Environment this database belongs to.
func (o RedisOutput) EnvironmentId() pulumi.StringOutput {
return o.ApplyT(func(v *Redis) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
}
// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
func (o RedisOutput) ExternalPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.IntPtrOutput { return v.ExternalPort }).(pulumi.IntPtrOutput)
}
// Docker Swarm health check configuration, as a JSON object.
func (o RedisOutput) HealthCheckSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.HealthCheckSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm service labels, as a JSON object.
func (o RedisOutput) LabelsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.LabelsSwarm }).(pulumi.StringPtrOutput)
}
// Hard memory limit, for example `512m`.
func (o RedisOutput) MemoryLimit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.MemoryLimit }).(pulumi.StringPtrOutput)
}
// Soft memory reservation, for example `256m`.
func (o RedisOutput) MemoryReservation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.MemoryReservation }).(pulumi.StringPtrOutput)
}
// Docker Swarm service mode, as a JSON object.
func (o RedisOutput) ModeSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.ModeSwarm }).(pulumi.StringPtrOutput)
}
// Display name of the database.
func (o RedisOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Redis) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// IDs of additional Docker networks to attach.
func (o RedisOutput) NetworkIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Redis) pulumi.StringArrayOutput { return v.NetworkIds }).(pulumi.StringArrayOutput)
}
// Docker Swarm network attachments, as a JSON array.
func (o RedisOutput) NetworkSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.NetworkSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm placement constraints, as a JSON object.
func (o RedisOutput) PlacementSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.PlacementSwarm }).(pulumi.StringPtrOutput)
}
// Number of replicas to run.
func (o RedisOutput) Replicas() pulumi.IntOutput {
return o.ApplyT(func(v *Redis) pulumi.IntOutput { return v.Replicas }).(pulumi.IntOutput)
}
// Docker Swarm restart policy, as a JSON object.
func (o RedisOutput) RestartPolicySwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.RestartPolicySwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rollback configuration, as a JSON object.
func (o RedisOutput) RollbackConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.RollbackConfigSwarm }).(pulumi.StringPtrOutput)
}
// Remote server to deploy on. Omit to use the Dokploy host itself.
func (o RedisOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Grace period in nanoseconds before a container is killed.
func (o RedisOutput) StopGracePeriodSwarm() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.IntPtrOutput { return v.StopGracePeriodSwarm }).(pulumi.IntPtrOutput)
}
// Docker Swarm ulimits, as a JSON object.
func (o RedisOutput) UlimitsSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.UlimitsSwarm }).(pulumi.StringPtrOutput)
}
// Docker Swarm rolling update configuration, as a JSON object.
func (o RedisOutput) UpdateConfigSwarm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Redis) pulumi.StringPtrOutput { return v.UpdateConfigSwarm }).(pulumi.StringPtrOutput)
}
type RedisArrayOutput struct{ *pulumi.OutputState }
func (RedisArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Redis)(nil)).Elem()
}
func (o RedisArrayOutput) ToRedisArrayOutput() RedisArrayOutput {
return o
}
func (o RedisArrayOutput) ToRedisArrayOutputWithContext(ctx context.Context) RedisArrayOutput {
return o
}
func (o RedisArrayOutput) Index(i pulumi.IntInput) RedisOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Redis {
return vs[0].([]*Redis)[vs[1].(int)]
}).(RedisOutput)
}
type RedisMapOutput struct{ *pulumi.OutputState }
func (RedisMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Redis)(nil)).Elem()
}
func (o RedisMapOutput) ToRedisMapOutput() RedisMapOutput {
return o
}
func (o RedisMapOutput) ToRedisMapOutputWithContext(ctx context.Context) RedisMapOutput {
return o
}
func (o RedisMapOutput) MapIndex(k pulumi.StringInput) RedisOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Redis {
return vs[0].(map[string]*Redis)[vs[1].(string)]
}).(RedisOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RedisInput)(nil)).Elem(), &Redis{})
pulumi.RegisterInputType(reflect.TypeOf((*RedisArrayInput)(nil)).Elem(), RedisArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RedisMapInput)(nil)).Elem(), RedisMap{})
pulumi.RegisterOutputType(RedisOutput{})
pulumi.RegisterOutputType(RedisArrayOutput{})
pulumi.RegisterOutputType(RedisMapOutput{})
}

335
sdk/go/dokploy/registry.go generated Normal file
View File

@@ -0,0 +1,335 @@
// 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"
)
type Registry struct {
pulumi.CustomResourceState
// RFC 3339 timestamp of when the registry was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Prefix prepended to pushed image names, for example an organization or namespace.
ImagePrefix pulumi.StringPtrOutput `pulumi:"imagePrefix"`
// Password or access token used to authenticate.
Password pulumi.StringOutput `pulumi:"password"`
// Display name of the registry.
RegistryName pulumi.StringOutput `pulumi:"registryName"`
// Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
RegistryType pulumi.StringOutput `pulumi:"registryType"`
// Registry hostname, for example `ghcr.io`.
RegistryUrl pulumi.StringOutput `pulumi:"registryUrl"`
// Server this registry is scoped to.
ServerId pulumi.StringPtrOutput `pulumi:"serverId"`
// Username used to authenticate to the registry.
Username pulumi.StringOutput `pulumi:"username"`
}
// NewRegistry registers a new resource with the given unique name, arguments, and options.
func NewRegistry(ctx *pulumi.Context,
name string, args *RegistryArgs, opts ...pulumi.ResourceOption) (*Registry, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Password == nil {
return nil, errors.New("invalid value for required argument 'Password'")
}
if args.RegistryName == nil {
return nil, errors.New("invalid value for required argument 'RegistryName'")
}
if args.RegistryUrl == nil {
return nil, errors.New("invalid value for required argument 'RegistryUrl'")
}
if args.Username == nil {
return nil, errors.New("invalid value for required argument 'Username'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Registry
err := ctx.RegisterResource("dokploy:index/registry:Registry", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRegistry gets an existing Registry 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 GetRegistry(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RegistryState, opts ...pulumi.ResourceOption) (*Registry, error) {
var resource Registry
err := ctx.ReadResource("dokploy:index/registry:Registry", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Registry resources.
type registryState struct {
// RFC 3339 timestamp of when the registry was created.
CreatedAt *string `pulumi:"createdAt"`
// Prefix prepended to pushed image names, for example an organization or namespace.
ImagePrefix *string `pulumi:"imagePrefix"`
// Password or access token used to authenticate.
Password *string `pulumi:"password"`
// Display name of the registry.
RegistryName *string `pulumi:"registryName"`
// Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
RegistryType *string `pulumi:"registryType"`
// Registry hostname, for example `ghcr.io`.
RegistryUrl *string `pulumi:"registryUrl"`
// Server this registry is scoped to.
ServerId *string `pulumi:"serverId"`
// Username used to authenticate to the registry.
Username *string `pulumi:"username"`
}
type RegistryState struct {
// RFC 3339 timestamp of when the registry was created.
CreatedAt pulumi.StringPtrInput
// Prefix prepended to pushed image names, for example an organization or namespace.
ImagePrefix pulumi.StringPtrInput
// Password or access token used to authenticate.
Password pulumi.StringPtrInput
// Display name of the registry.
RegistryName pulumi.StringPtrInput
// Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
RegistryType pulumi.StringPtrInput
// Registry hostname, for example `ghcr.io`.
RegistryUrl pulumi.StringPtrInput
// Server this registry is scoped to.
ServerId pulumi.StringPtrInput
// Username used to authenticate to the registry.
Username pulumi.StringPtrInput
}
func (RegistryState) ElementType() reflect.Type {
return reflect.TypeOf((*registryState)(nil)).Elem()
}
type registryArgs struct {
// Prefix prepended to pushed image names, for example an organization or namespace.
ImagePrefix *string `pulumi:"imagePrefix"`
// Password or access token used to authenticate.
Password string `pulumi:"password"`
// Display name of the registry.
RegistryName string `pulumi:"registryName"`
// Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
RegistryType *string `pulumi:"registryType"`
// Registry hostname, for example `ghcr.io`.
RegistryUrl string `pulumi:"registryUrl"`
// Server this registry is scoped to.
ServerId *string `pulumi:"serverId"`
// Username used to authenticate to the registry.
Username string `pulumi:"username"`
}
// The set of arguments for constructing a Registry resource.
type RegistryArgs struct {
// Prefix prepended to pushed image names, for example an organization or namespace.
ImagePrefix pulumi.StringPtrInput
// Password or access token used to authenticate.
Password pulumi.StringInput
// Display name of the registry.
RegistryName pulumi.StringInput
// Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
RegistryType pulumi.StringPtrInput
// Registry hostname, for example `ghcr.io`.
RegistryUrl pulumi.StringInput
// Server this registry is scoped to.
ServerId pulumi.StringPtrInput
// Username used to authenticate to the registry.
Username pulumi.StringInput
}
func (RegistryArgs) ElementType() reflect.Type {
return reflect.TypeOf((*registryArgs)(nil)).Elem()
}
type RegistryInput interface {
pulumi.Input
ToRegistryOutput() RegistryOutput
ToRegistryOutputWithContext(ctx context.Context) RegistryOutput
}
func (*Registry) ElementType() reflect.Type {
return reflect.TypeOf((**Registry)(nil)).Elem()
}
func (i *Registry) ToRegistryOutput() RegistryOutput {
return i.ToRegistryOutputWithContext(context.Background())
}
func (i *Registry) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegistryOutput)
}
// RegistryArrayInput is an input type that accepts RegistryArray and RegistryArrayOutput values.
// You can construct a concrete instance of `RegistryArrayInput` via:
//
// RegistryArray{ RegistryArgs{...} }
type RegistryArrayInput interface {
pulumi.Input
ToRegistryArrayOutput() RegistryArrayOutput
ToRegistryArrayOutputWithContext(context.Context) RegistryArrayOutput
}
type RegistryArray []RegistryInput
func (RegistryArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Registry)(nil)).Elem()
}
func (i RegistryArray) ToRegistryArrayOutput() RegistryArrayOutput {
return i.ToRegistryArrayOutputWithContext(context.Background())
}
func (i RegistryArray) ToRegistryArrayOutputWithContext(ctx context.Context) RegistryArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegistryArrayOutput)
}
// RegistryMapInput is an input type that accepts RegistryMap and RegistryMapOutput values.
// You can construct a concrete instance of `RegistryMapInput` via:
//
// RegistryMap{ "key": RegistryArgs{...} }
type RegistryMapInput interface {
pulumi.Input
ToRegistryMapOutput() RegistryMapOutput
ToRegistryMapOutputWithContext(context.Context) RegistryMapOutput
}
type RegistryMap map[string]RegistryInput
func (RegistryMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Registry)(nil)).Elem()
}
func (i RegistryMap) ToRegistryMapOutput() RegistryMapOutput {
return i.ToRegistryMapOutputWithContext(context.Background())
}
func (i RegistryMap) ToRegistryMapOutputWithContext(ctx context.Context) RegistryMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegistryMapOutput)
}
type RegistryOutput struct{ *pulumi.OutputState }
func (RegistryOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Registry)(nil)).Elem()
}
func (o RegistryOutput) ToRegistryOutput() RegistryOutput {
return o
}
func (o RegistryOutput) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput {
return o
}
// RFC 3339 timestamp of when the registry was created.
func (o RegistryOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Prefix prepended to pushed image names, for example an organization or namespace.
func (o RegistryOutput) ImagePrefix() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Registry) pulumi.StringPtrOutput { return v.ImagePrefix }).(pulumi.StringPtrOutput)
}
// Password or access token used to authenticate.
func (o RegistryOutput) Password() pulumi.StringOutput {
return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
}
// Display name of the registry.
func (o RegistryOutput) RegistryName() pulumi.StringOutput {
return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.RegistryName }).(pulumi.StringOutput)
}
// Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
func (o RegistryOutput) RegistryType() pulumi.StringOutput {
return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.RegistryType }).(pulumi.StringOutput)
}
// Registry hostname, for example `ghcr.io`.
func (o RegistryOutput) RegistryUrl() pulumi.StringOutput {
return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.RegistryUrl }).(pulumi.StringOutput)
}
// Server this registry is scoped to.
func (o RegistryOutput) ServerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Registry) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
}
// Username used to authenticate to the registry.
func (o RegistryOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v *Registry) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
}
type RegistryArrayOutput struct{ *pulumi.OutputState }
func (RegistryArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Registry)(nil)).Elem()
}
func (o RegistryArrayOutput) ToRegistryArrayOutput() RegistryArrayOutput {
return o
}
func (o RegistryArrayOutput) ToRegistryArrayOutputWithContext(ctx context.Context) RegistryArrayOutput {
return o
}
func (o RegistryArrayOutput) Index(i pulumi.IntInput) RegistryOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Registry {
return vs[0].([]*Registry)[vs[1].(int)]
}).(RegistryOutput)
}
type RegistryMapOutput struct{ *pulumi.OutputState }
func (RegistryMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Registry)(nil)).Elem()
}
func (o RegistryMapOutput) ToRegistryMapOutput() RegistryMapOutput {
return o
}
func (o RegistryMapOutput) ToRegistryMapOutputWithContext(ctx context.Context) RegistryMapOutput {
return o
}
func (o RegistryMapOutput) MapIndex(k pulumi.StringInput) RegistryOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Registry {
return vs[0].(map[string]*Registry)[vs[1].(string)]
}).(RegistryOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RegistryInput)(nil)).Elem(), &Registry{})
pulumi.RegisterInputType(reflect.TypeOf((*RegistryArrayInput)(nil)).Elem(), RegistryArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RegistryMapInput)(nil)).Elem(), RegistryMap{})
pulumi.RegisterOutputType(RegistryOutput{})
pulumi.RegisterOutputType(RegistryArrayOutput{})
pulumi.RegisterOutputType(RegistryMapOutput{})
}

272
sdk/go/dokploy/security.go generated Normal file
View File

@@ -0,0 +1,272 @@
// 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"
)
type Security struct {
pulumi.CustomResourceState
// Application these credentials protect.
ApplicationId pulumi.StringOutput `pulumi:"applicationId"`
// RFC 3339 timestamp of when the credentials were created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Basic auth password.
Password pulumi.StringOutput `pulumi:"password"`
// Basic auth username.
Username pulumi.StringOutput `pulumi:"username"`
}
// NewSecurity registers a new resource with the given unique name, arguments, and options.
func NewSecurity(ctx *pulumi.Context,
name string, args *SecurityArgs, opts ...pulumi.ResourceOption) (*Security, 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.Password == nil {
return nil, errors.New("invalid value for required argument 'Password'")
}
if args.Username == nil {
return nil, errors.New("invalid value for required argument 'Username'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Security
err := ctx.RegisterResource("dokploy:index/security:Security", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSecurity gets an existing Security 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 GetSecurity(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SecurityState, opts ...pulumi.ResourceOption) (*Security, error) {
var resource Security
err := ctx.ReadResource("dokploy:index/security:Security", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Security resources.
type securityState struct {
// Application these credentials protect.
ApplicationId *string `pulumi:"applicationId"`
// RFC 3339 timestamp of when the credentials were created.
CreatedAt *string `pulumi:"createdAt"`
// Basic auth password.
Password *string `pulumi:"password"`
// Basic auth username.
Username *string `pulumi:"username"`
}
type SecurityState struct {
// Application these credentials protect.
ApplicationId pulumi.StringPtrInput
// RFC 3339 timestamp of when the credentials were created.
CreatedAt pulumi.StringPtrInput
// Basic auth password.
Password pulumi.StringPtrInput
// Basic auth username.
Username pulumi.StringPtrInput
}
func (SecurityState) ElementType() reflect.Type {
return reflect.TypeOf((*securityState)(nil)).Elem()
}
type securityArgs struct {
// Application these credentials protect.
ApplicationId string `pulumi:"applicationId"`
// Basic auth password.
Password string `pulumi:"password"`
// Basic auth username.
Username string `pulumi:"username"`
}
// The set of arguments for constructing a Security resource.
type SecurityArgs struct {
// Application these credentials protect.
ApplicationId pulumi.StringInput
// Basic auth password.
Password pulumi.StringInput
// Basic auth username.
Username pulumi.StringInput
}
func (SecurityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*securityArgs)(nil)).Elem()
}
type SecurityInput interface {
pulumi.Input
ToSecurityOutput() SecurityOutput
ToSecurityOutputWithContext(ctx context.Context) SecurityOutput
}
func (*Security) ElementType() reflect.Type {
return reflect.TypeOf((**Security)(nil)).Elem()
}
func (i *Security) ToSecurityOutput() SecurityOutput {
return i.ToSecurityOutputWithContext(context.Background())
}
func (i *Security) ToSecurityOutputWithContext(ctx context.Context) SecurityOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecurityOutput)
}
// SecurityArrayInput is an input type that accepts SecurityArray and SecurityArrayOutput values.
// You can construct a concrete instance of `SecurityArrayInput` via:
//
// SecurityArray{ SecurityArgs{...} }
type SecurityArrayInput interface {
pulumi.Input
ToSecurityArrayOutput() SecurityArrayOutput
ToSecurityArrayOutputWithContext(context.Context) SecurityArrayOutput
}
type SecurityArray []SecurityInput
func (SecurityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Security)(nil)).Elem()
}
func (i SecurityArray) ToSecurityArrayOutput() SecurityArrayOutput {
return i.ToSecurityArrayOutputWithContext(context.Background())
}
func (i SecurityArray) ToSecurityArrayOutputWithContext(ctx context.Context) SecurityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecurityArrayOutput)
}
// SecurityMapInput is an input type that accepts SecurityMap and SecurityMapOutput values.
// You can construct a concrete instance of `SecurityMapInput` via:
//
// SecurityMap{ "key": SecurityArgs{...} }
type SecurityMapInput interface {
pulumi.Input
ToSecurityMapOutput() SecurityMapOutput
ToSecurityMapOutputWithContext(context.Context) SecurityMapOutput
}
type SecurityMap map[string]SecurityInput
func (SecurityMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Security)(nil)).Elem()
}
func (i SecurityMap) ToSecurityMapOutput() SecurityMapOutput {
return i.ToSecurityMapOutputWithContext(context.Background())
}
func (i SecurityMap) ToSecurityMapOutputWithContext(ctx context.Context) SecurityMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecurityMapOutput)
}
type SecurityOutput struct{ *pulumi.OutputState }
func (SecurityOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Security)(nil)).Elem()
}
func (o SecurityOutput) ToSecurityOutput() SecurityOutput {
return o
}
func (o SecurityOutput) ToSecurityOutputWithContext(ctx context.Context) SecurityOutput {
return o
}
// Application these credentials protect.
func (o SecurityOutput) ApplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *Security) pulumi.StringOutput { return v.ApplicationId }).(pulumi.StringOutput)
}
// RFC 3339 timestamp of when the credentials were created.
func (o SecurityOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Security) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Basic auth password.
func (o SecurityOutput) Password() pulumi.StringOutput {
return o.ApplyT(func(v *Security) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
}
// Basic auth username.
func (o SecurityOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v *Security) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
}
type SecurityArrayOutput struct{ *pulumi.OutputState }
func (SecurityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Security)(nil)).Elem()
}
func (o SecurityArrayOutput) ToSecurityArrayOutput() SecurityArrayOutput {
return o
}
func (o SecurityArrayOutput) ToSecurityArrayOutputWithContext(ctx context.Context) SecurityArrayOutput {
return o
}
func (o SecurityArrayOutput) Index(i pulumi.IntInput) SecurityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Security {
return vs[0].([]*Security)[vs[1].(int)]
}).(SecurityOutput)
}
type SecurityMapOutput struct{ *pulumi.OutputState }
func (SecurityMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Security)(nil)).Elem()
}
func (o SecurityMapOutput) ToSecurityMapOutput() SecurityMapOutput {
return o
}
func (o SecurityMapOutput) ToSecurityMapOutputWithContext(ctx context.Context) SecurityMapOutput {
return o
}
func (o SecurityMapOutput) MapIndex(k pulumi.StringInput) SecurityOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Security {
return vs[0].(map[string]*Security)[vs[1].(string)]
}).(SecurityOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SecurityInput)(nil)).Elem(), &Security{})
pulumi.RegisterInputType(reflect.TypeOf((*SecurityArrayInput)(nil)).Elem(), SecurityArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SecurityMapInput)(nil)).Elem(), SecurityMap{})
pulumi.RegisterOutputType(SecurityOutput{})
pulumi.RegisterOutputType(SecurityArrayOutput{})
pulumi.RegisterOutputType(SecurityMapOutput{})
}

295
sdk/go/dokploy/sshKey.go generated Normal file
View File

@@ -0,0 +1,295 @@
// 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"
)
type SshKey struct {
pulumi.CustomResourceState
// RFC 3339 timestamp of when the key was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Free-form description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// RFC 3339 timestamp of when the key was last used, if ever.
LastUsedAt pulumi.StringOutput `pulumi:"lastUsedAt"`
// Display name of the key pair.
Name pulumi.StringOutput `pulumi:"name"`
// PEM-encoded private key.
PrivateKey pulumi.StringOutput `pulumi:"privateKey"`
// OpenSSH-formatted public key.
PublicKey pulumi.StringOutput `pulumi:"publicKey"`
}
// NewSshKey registers a new resource with the given unique name, arguments, and options.
func NewSshKey(ctx *pulumi.Context,
name string, args *SshKeyArgs, opts ...pulumi.ResourceOption) (*SshKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrivateKey == nil {
return nil, errors.New("invalid value for required argument 'PrivateKey'")
}
if args.PublicKey == nil {
return nil, errors.New("invalid value for required argument 'PublicKey'")
}
if args.PrivateKey != nil {
args.PrivateKey = pulumi.ToSecret(args.PrivateKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"privateKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SshKey
err := ctx.RegisterResource("dokploy:index/sshKey:SshKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSshKey gets an existing SshKey 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 GetSshKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SshKeyState, opts ...pulumi.ResourceOption) (*SshKey, error) {
var resource SshKey
err := ctx.ReadResource("dokploy:index/sshKey:SshKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SshKey resources.
type sshKeyState struct {
// RFC 3339 timestamp of when the key was created.
CreatedAt *string `pulumi:"createdAt"`
// Free-form description.
Description *string `pulumi:"description"`
// RFC 3339 timestamp of when the key was last used, if ever.
LastUsedAt *string `pulumi:"lastUsedAt"`
// Display name of the key pair.
Name *string `pulumi:"name"`
// PEM-encoded private key.
PrivateKey *string `pulumi:"privateKey"`
// OpenSSH-formatted public key.
PublicKey *string `pulumi:"publicKey"`
}
type SshKeyState struct {
// RFC 3339 timestamp of when the key was created.
CreatedAt pulumi.StringPtrInput
// Free-form description.
Description pulumi.StringPtrInput
// RFC 3339 timestamp of when the key was last used, if ever.
LastUsedAt pulumi.StringPtrInput
// Display name of the key pair.
Name pulumi.StringPtrInput
// PEM-encoded private key.
PrivateKey pulumi.StringPtrInput
// OpenSSH-formatted public key.
PublicKey pulumi.StringPtrInput
}
func (SshKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*sshKeyState)(nil)).Elem()
}
type sshKeyArgs struct {
// Free-form description.
Description *string `pulumi:"description"`
// Display name of the key pair.
Name *string `pulumi:"name"`
// PEM-encoded private key.
PrivateKey string `pulumi:"privateKey"`
// OpenSSH-formatted public key.
PublicKey string `pulumi:"publicKey"`
}
// The set of arguments for constructing a SshKey resource.
type SshKeyArgs struct {
// Free-form description.
Description pulumi.StringPtrInput
// Display name of the key pair.
Name pulumi.StringPtrInput
// PEM-encoded private key.
PrivateKey pulumi.StringInput
// OpenSSH-formatted public key.
PublicKey pulumi.StringInput
}
func (SshKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*sshKeyArgs)(nil)).Elem()
}
type SshKeyInput interface {
pulumi.Input
ToSshKeyOutput() SshKeyOutput
ToSshKeyOutputWithContext(ctx context.Context) SshKeyOutput
}
func (*SshKey) ElementType() reflect.Type {
return reflect.TypeOf((**SshKey)(nil)).Elem()
}
func (i *SshKey) ToSshKeyOutput() SshKeyOutput {
return i.ToSshKeyOutputWithContext(context.Background())
}
func (i *SshKey) ToSshKeyOutputWithContext(ctx context.Context) SshKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(SshKeyOutput)
}
// SshKeyArrayInput is an input type that accepts SshKeyArray and SshKeyArrayOutput values.
// You can construct a concrete instance of `SshKeyArrayInput` via:
//
// SshKeyArray{ SshKeyArgs{...} }
type SshKeyArrayInput interface {
pulumi.Input
ToSshKeyArrayOutput() SshKeyArrayOutput
ToSshKeyArrayOutputWithContext(context.Context) SshKeyArrayOutput
}
type SshKeyArray []SshKeyInput
func (SshKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SshKey)(nil)).Elem()
}
func (i SshKeyArray) ToSshKeyArrayOutput() SshKeyArrayOutput {
return i.ToSshKeyArrayOutputWithContext(context.Background())
}
func (i SshKeyArray) ToSshKeyArrayOutputWithContext(ctx context.Context) SshKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SshKeyArrayOutput)
}
// SshKeyMapInput is an input type that accepts SshKeyMap and SshKeyMapOutput values.
// You can construct a concrete instance of `SshKeyMapInput` via:
//
// SshKeyMap{ "key": SshKeyArgs{...} }
type SshKeyMapInput interface {
pulumi.Input
ToSshKeyMapOutput() SshKeyMapOutput
ToSshKeyMapOutputWithContext(context.Context) SshKeyMapOutput
}
type SshKeyMap map[string]SshKeyInput
func (SshKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SshKey)(nil)).Elem()
}
func (i SshKeyMap) ToSshKeyMapOutput() SshKeyMapOutput {
return i.ToSshKeyMapOutputWithContext(context.Background())
}
func (i SshKeyMap) ToSshKeyMapOutputWithContext(ctx context.Context) SshKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SshKeyMapOutput)
}
type SshKeyOutput struct{ *pulumi.OutputState }
func (SshKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SshKey)(nil)).Elem()
}
func (o SshKeyOutput) ToSshKeyOutput() SshKeyOutput {
return o
}
func (o SshKeyOutput) ToSshKeyOutputWithContext(ctx context.Context) SshKeyOutput {
return o
}
// RFC 3339 timestamp of when the key was created.
func (o SshKeyOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Free-form description.
func (o SshKeyOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SshKey) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// RFC 3339 timestamp of when the key was last used, if ever.
func (o SshKeyOutput) LastUsedAt() pulumi.StringOutput {
return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.LastUsedAt }).(pulumi.StringOutput)
}
// Display name of the key pair.
func (o SshKeyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// PEM-encoded private key.
func (o SshKeyOutput) PrivateKey() pulumi.StringOutput {
return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.PrivateKey }).(pulumi.StringOutput)
}
// OpenSSH-formatted public key.
func (o SshKeyOutput) PublicKey() pulumi.StringOutput {
return o.ApplyT(func(v *SshKey) pulumi.StringOutput { return v.PublicKey }).(pulumi.StringOutput)
}
type SshKeyArrayOutput struct{ *pulumi.OutputState }
func (SshKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SshKey)(nil)).Elem()
}
func (o SshKeyArrayOutput) ToSshKeyArrayOutput() SshKeyArrayOutput {
return o
}
func (o SshKeyArrayOutput) ToSshKeyArrayOutputWithContext(ctx context.Context) SshKeyArrayOutput {
return o
}
func (o SshKeyArrayOutput) Index(i pulumi.IntInput) SshKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SshKey {
return vs[0].([]*SshKey)[vs[1].(int)]
}).(SshKeyOutput)
}
type SshKeyMapOutput struct{ *pulumi.OutputState }
func (SshKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SshKey)(nil)).Elem()
}
func (o SshKeyMapOutput) ToSshKeyMapOutput() SshKeyMapOutput {
return o
}
func (o SshKeyMapOutput) ToSshKeyMapOutputWithContext(ctx context.Context) SshKeyMapOutput {
return o
}
func (o SshKeyMapOutput) MapIndex(k pulumi.StringInput) SshKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SshKey {
return vs[0].(map[string]*SshKey)[vs[1].(string)]
}).(SshKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SshKeyInput)(nil)).Elem(), &SshKey{})
pulumi.RegisterInputType(reflect.TypeOf((*SshKeyArrayInput)(nil)).Elem(), SshKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SshKeyMapInput)(nil)).Elem(), SshKeyMap{})
pulumi.RegisterOutputType(SshKeyOutput{})
pulumi.RegisterOutputType(SshKeyArrayOutput{})
pulumi.RegisterOutputType(SshKeyMapOutput{})
}