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:
299
sdk/go/dokploy/certificate.go
generated
Normal file
299
sdk/go/dokploy/certificate.go
generated
Normal 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{})
|
||||
}
|
||||
Reference in New Issue
Block a user