Files
pulumi-dokploy/sdk/go/dokploy/certificate.go
T
max-voitcov 73386ba0ff
build / build (push) Failing after 11m22s
release / plugin (push) Failing after 31m35s
release / sdks (push) Has been skipped
Bridge what Dokploy v0.30 added, and let the docs through
Six new resources from terraform-provider-dokploy v0.2.0 -- Network,
DnsProvider, VaultProvider, Schedule, VolumeBackup and Libsql -- plus the new
properties on Domain (`enabled`), Compose (`serviceNetworks`, `createEnvFile`,
`icon`) and Application. Verified with `pulumi up` against a live v0.30.2
instance: create, preview-clean, and destroy.

The upstream provider also now refuses a volume Mount with no `volumeName`,
which Dokploy would otherwise turn into an anonymous Docker volume recreated
on every deploy. That surfaces here at preview time, before anything exists.

Two things made that fix nearly invisible to Pulumi users, so this commit
fixes the second one: the bridge resolves the upstream `docs/` through the Go
module cache, where a locally `replace`d dependency never lands, so tfgen was
emitting every resource with no description at all. UpstreamRepoPath now
points at the checkout and all 445 inputs carry documentation -- with names
rendered per language, so Python readers see `volume_name` where TypeScript
readers see `volumeName`.
2026-08-26 00:46:32 +03:00

303 lines
10 KiB
Go
Generated

// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dokploy
import (
"context"
"reflect"
"errors"
"github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A TLS certificate uploaded to Dokploy, for domains that use `certificateType = "custom"`.
//
// > The private key is stored in Terraform state. Use a state backend with encryption at rest.
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{})
}