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