18 resources and 5 data sources mapped into the dokploy:index module, with SDKs generated for TypeScript, Python, Go and .NET.
710 lines
29 KiB
Go
Generated
710 lines
29 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"
|
|
)
|
|
|
|
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{})
|
|
}
|