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`.
This commit is contained in:
Generated
+743
@@ -0,0 +1,743 @@
|
||||
// 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 managed libSQL instance running on Dokploy.
|
||||
//
|
||||
// > Creating this resource provisions the service definition but does **not** start a deployment. Deploy it from the Dokploy UI or CLI.
|
||||
//
|
||||
// > Credentials are stored in Terraform state. Use a state backend with encryption at rest.
|
||||
//
|
||||
// libSQL runs as a `sqld` server. A `primary` node owns the data; a `replica` node follows a primary named by `sqldPrimaryUrl`.
|
||||
type Libsql struct {
|
||||
pulumi.CustomResourceState
|
||||
|
||||
// Unique Docker service name. Generated from `name` when omitted, because Dokploy's libSQL endpoint does not generate one. 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"`
|
||||
// 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 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"`
|
||||
// libSQL server image to run, for example `ghcr.io/tursodatabase/libsql-server:latest`.
|
||||
DockerImage pulumi.StringOutput `pulumi:"dockerImage"`
|
||||
// Serve multiple logical databases from one instance through libSQL namespaces.
|
||||
EnableNamespaces pulumi.BoolOutput `pulumi:"enableNamespaces"`
|
||||
// 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 exposing the admin API.
|
||||
ExternalAdminPort pulumi.IntPtrOutput `pulumi:"externalAdminPort"`
|
||||
// Host port exposing the gRPC replication endpoint.
|
||||
ExternalGrpcPort pulumi.IntPtrOutput `pulumi:"externalGrpcPort"`
|
||||
// Host port exposing the HTTP API.
|
||||
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"`
|
||||
// Role this node plays in a libSQL cluster. Valid values: `primary`, `replica`. Defaults to `primary`.
|
||||
SqldNode pulumi.StringOutput `pulumi:"sqldNode"`
|
||||
// URL of the primary node, when `sqldNode` is `replica`.
|
||||
SqldPrimaryUrl pulumi.StringPtrOutput `pulumi:"sqldPrimaryUrl"`
|
||||
// Grace period in nanoseconds before a container is killed.
|
||||
StopGracePeriodSwarm pulumi.IntPtrOutput `pulumi:"stopGracePeriodSwarm"`
|
||||
// Docker Swarm rolling update configuration, as a JSON object.
|
||||
UpdateConfigSwarm pulumi.StringPtrOutput `pulumi:"updateConfigSwarm"`
|
||||
}
|
||||
|
||||
// NewLibsql registers a new resource with the given unique name, arguments, and options.
|
||||
func NewLibsql(ctx *pulumi.Context,
|
||||
name string, args *LibsqlArgs, opts ...pulumi.ResourceOption) (*Libsql, 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.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 Libsql
|
||||
err := ctx.RegisterResource("dokploy:index/libsql:Libsql", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// GetLibsql gets an existing Libsql 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 GetLibsql(ctx *pulumi.Context,
|
||||
name string, id pulumi.IDInput, state *LibsqlState, opts ...pulumi.ResourceOption) (*Libsql, error) {
|
||||
var resource Libsql
|
||||
err := ctx.ReadResource("dokploy:index/libsql:Libsql", name, id, state, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// Input properties used for looking up and filtering Libsql resources.
|
||||
type libsqlState struct {
|
||||
// Unique Docker service name. Generated from `name` when omitted, because Dokploy's libSQL endpoint does not generate one. Changing it forces a new database.
|
||||
AppName *string `pulumi:"appName"`
|
||||
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
|
||||
ApplicationStatus *string `pulumi:"applicationStatus"`
|
||||
// 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 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"`
|
||||
// libSQL server image to run, for example `ghcr.io/tursodatabase/libsql-server:latest`.
|
||||
DockerImage *string `pulumi:"dockerImage"`
|
||||
// Serve multiple logical databases from one instance through libSQL namespaces.
|
||||
EnableNamespaces *bool `pulumi:"enableNamespaces"`
|
||||
// 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 exposing the admin API.
|
||||
ExternalAdminPort *int `pulumi:"externalAdminPort"`
|
||||
// Host port exposing the gRPC replication endpoint.
|
||||
ExternalGrpcPort *int `pulumi:"externalGrpcPort"`
|
||||
// Host port exposing the HTTP API.
|
||||
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"`
|
||||
// Role this node plays in a libSQL cluster. Valid values: `primary`, `replica`. Defaults to `primary`.
|
||||
SqldNode *string `pulumi:"sqldNode"`
|
||||
// URL of the primary node, when `sqldNode` is `replica`.
|
||||
SqldPrimaryUrl *string `pulumi:"sqldPrimaryUrl"`
|
||||
// Grace period in nanoseconds before a container is killed.
|
||||
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
|
||||
// Docker Swarm rolling update configuration, as a JSON object.
|
||||
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
|
||||
}
|
||||
|
||||
type LibsqlState struct {
|
||||
// Unique Docker service name. Generated from `name` when omitted, because Dokploy's libSQL endpoint does not generate one. Changing it forces a new database.
|
||||
AppName pulumi.StringPtrInput
|
||||
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
|
||||
ApplicationStatus pulumi.StringPtrInput
|
||||
// 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 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
|
||||
// libSQL server image to run, for example `ghcr.io/tursodatabase/libsql-server:latest`.
|
||||
DockerImage pulumi.StringPtrInput
|
||||
// Serve multiple logical databases from one instance through libSQL namespaces.
|
||||
EnableNamespaces pulumi.BoolPtrInput
|
||||
// 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 exposing the admin API.
|
||||
ExternalAdminPort pulumi.IntPtrInput
|
||||
// Host port exposing the gRPC replication endpoint.
|
||||
ExternalGrpcPort pulumi.IntPtrInput
|
||||
// Host port exposing the HTTP API.
|
||||
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
|
||||
// Role this node plays in a libSQL cluster. Valid values: `primary`, `replica`. Defaults to `primary`.
|
||||
SqldNode pulumi.StringPtrInput
|
||||
// URL of the primary node, when `sqldNode` is `replica`.
|
||||
SqldPrimaryUrl pulumi.StringPtrInput
|
||||
// Grace period in nanoseconds before a container is killed.
|
||||
StopGracePeriodSwarm pulumi.IntPtrInput
|
||||
// Docker Swarm rolling update configuration, as a JSON object.
|
||||
UpdateConfigSwarm pulumi.StringPtrInput
|
||||
}
|
||||
|
||||
func (LibsqlState) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*libsqlState)(nil)).Elem()
|
||||
}
|
||||
|
||||
type libsqlArgs struct {
|
||||
// Unique Docker service name. Generated from `name` when omitted, because Dokploy's libSQL endpoint does not generate one. Changing it forces a new database.
|
||||
AppName *string `pulumi:"appName"`
|
||||
// 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 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"`
|
||||
// libSQL server image to run, for example `ghcr.io/tursodatabase/libsql-server:latest`.
|
||||
DockerImage string `pulumi:"dockerImage"`
|
||||
// Serve multiple logical databases from one instance through libSQL namespaces.
|
||||
EnableNamespaces *bool `pulumi:"enableNamespaces"`
|
||||
// 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 exposing the admin API.
|
||||
ExternalAdminPort *int `pulumi:"externalAdminPort"`
|
||||
// Host port exposing the gRPC replication endpoint.
|
||||
ExternalGrpcPort *int `pulumi:"externalGrpcPort"`
|
||||
// Host port exposing the HTTP API.
|
||||
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"`
|
||||
// Role this node plays in a libSQL cluster. Valid values: `primary`, `replica`. Defaults to `primary`.
|
||||
SqldNode *string `pulumi:"sqldNode"`
|
||||
// URL of the primary node, when `sqldNode` is `replica`.
|
||||
SqldPrimaryUrl *string `pulumi:"sqldPrimaryUrl"`
|
||||
// Grace period in nanoseconds before a container is killed.
|
||||
StopGracePeriodSwarm *int `pulumi:"stopGracePeriodSwarm"`
|
||||
// Docker Swarm rolling update configuration, as a JSON object.
|
||||
UpdateConfigSwarm *string `pulumi:"updateConfigSwarm"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a Libsql resource.
|
||||
type LibsqlArgs struct {
|
||||
// Unique Docker service name. Generated from `name` when omitted, because Dokploy's libSQL endpoint does not generate one. Changing it forces a new database.
|
||||
AppName pulumi.StringPtrInput
|
||||
// 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 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
|
||||
// libSQL server image to run, for example `ghcr.io/tursodatabase/libsql-server:latest`.
|
||||
DockerImage pulumi.StringInput
|
||||
// Serve multiple logical databases from one instance through libSQL namespaces.
|
||||
EnableNamespaces pulumi.BoolPtrInput
|
||||
// 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 exposing the admin API.
|
||||
ExternalAdminPort pulumi.IntPtrInput
|
||||
// Host port exposing the gRPC replication endpoint.
|
||||
ExternalGrpcPort pulumi.IntPtrInput
|
||||
// Host port exposing the HTTP API.
|
||||
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
|
||||
// Role this node plays in a libSQL cluster. Valid values: `primary`, `replica`. Defaults to `primary`.
|
||||
SqldNode pulumi.StringPtrInput
|
||||
// URL of the primary node, when `sqldNode` is `replica`.
|
||||
SqldPrimaryUrl pulumi.StringPtrInput
|
||||
// Grace period in nanoseconds before a container is killed.
|
||||
StopGracePeriodSwarm pulumi.IntPtrInput
|
||||
// Docker Swarm rolling update configuration, as a JSON object.
|
||||
UpdateConfigSwarm pulumi.StringPtrInput
|
||||
}
|
||||
|
||||
func (LibsqlArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*libsqlArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
type LibsqlInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToLibsqlOutput() LibsqlOutput
|
||||
ToLibsqlOutputWithContext(ctx context.Context) LibsqlOutput
|
||||
}
|
||||
|
||||
func (*Libsql) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Libsql)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i *Libsql) ToLibsqlOutput() LibsqlOutput {
|
||||
return i.ToLibsqlOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i *Libsql) ToLibsqlOutputWithContext(ctx context.Context) LibsqlOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(LibsqlOutput)
|
||||
}
|
||||
|
||||
// LibsqlArrayInput is an input type that accepts LibsqlArray and LibsqlArrayOutput values.
|
||||
// You can construct a concrete instance of `LibsqlArrayInput` via:
|
||||
//
|
||||
// LibsqlArray{ LibsqlArgs{...} }
|
||||
type LibsqlArrayInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToLibsqlArrayOutput() LibsqlArrayOutput
|
||||
ToLibsqlArrayOutputWithContext(context.Context) LibsqlArrayOutput
|
||||
}
|
||||
|
||||
type LibsqlArray []LibsqlInput
|
||||
|
||||
func (LibsqlArray) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]*Libsql)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i LibsqlArray) ToLibsqlArrayOutput() LibsqlArrayOutput {
|
||||
return i.ToLibsqlArrayOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i LibsqlArray) ToLibsqlArrayOutputWithContext(ctx context.Context) LibsqlArrayOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(LibsqlArrayOutput)
|
||||
}
|
||||
|
||||
// LibsqlMapInput is an input type that accepts LibsqlMap and LibsqlMapOutput values.
|
||||
// You can construct a concrete instance of `LibsqlMapInput` via:
|
||||
//
|
||||
// LibsqlMap{ "key": LibsqlArgs{...} }
|
||||
type LibsqlMapInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToLibsqlMapOutput() LibsqlMapOutput
|
||||
ToLibsqlMapOutputWithContext(context.Context) LibsqlMapOutput
|
||||
}
|
||||
|
||||
type LibsqlMap map[string]LibsqlInput
|
||||
|
||||
func (LibsqlMap) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*map[string]*Libsql)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i LibsqlMap) ToLibsqlMapOutput() LibsqlMapOutput {
|
||||
return i.ToLibsqlMapOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i LibsqlMap) ToLibsqlMapOutputWithContext(ctx context.Context) LibsqlMapOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(LibsqlMapOutput)
|
||||
}
|
||||
|
||||
type LibsqlOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (LibsqlOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Libsql)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o LibsqlOutput) ToLibsqlOutput() LibsqlOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LibsqlOutput) ToLibsqlOutputWithContext(ctx context.Context) LibsqlOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
// Unique Docker service name. Generated from `name` when omitted, because Dokploy's libSQL endpoint does not generate one. Changing it forces a new database.
|
||||
func (o LibsqlOutput) AppName() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
|
||||
func (o LibsqlOutput) ApplicationStatus() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.ApplicationStatus }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Override the container entrypoint command.
|
||||
func (o LibsqlOutput) Command() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.Command }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Hard CPU limit, for example `1`.
|
||||
func (o LibsqlOutput) CpuLimit() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.CpuLimit }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Soft CPU reservation, for example `0.5`.
|
||||
func (o LibsqlOutput) CpuReservation() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.CpuReservation }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// RFC 3339 timestamp of when the database was created.
|
||||
func (o LibsqlOutput) CreatedAt() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Password for the database user.
|
||||
func (o LibsqlOutput) DatabasePassword() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.DatabasePassword }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Database user to create.
|
||||
func (o LibsqlOutput) DatabaseUser() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.DatabaseUser }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Free-form description.
|
||||
func (o LibsqlOutput) Description() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Detach the service from the shared `dokploy-network`.
|
||||
func (o LibsqlOutput) DetachDokployNetwork() pulumi.BoolOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.BoolOutput { return v.DetachDokployNetwork }).(pulumi.BoolOutput)
|
||||
}
|
||||
|
||||
// libSQL server image to run, for example `ghcr.io/tursodatabase/libsql-server:latest`.
|
||||
func (o LibsqlOutput) DockerImage() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.DockerImage }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Serve multiple logical databases from one instance through libSQL namespaces.
|
||||
func (o LibsqlOutput) EnableNamespaces() pulumi.BoolOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.BoolOutput { return v.EnableNamespaces }).(pulumi.BoolOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm endpoint specification, as a JSON object.
|
||||
func (o LibsqlOutput) EndpointSpecSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.EndpointSpecSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Environment variables in `KEY=value` format, one per line.
|
||||
func (o LibsqlOutput) Env() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Environment this database belongs to.
|
||||
func (o LibsqlOutput) EnvironmentId() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Host port exposing the admin API.
|
||||
func (o LibsqlOutput) ExternalAdminPort() pulumi.IntPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.IntPtrOutput { return v.ExternalAdminPort }).(pulumi.IntPtrOutput)
|
||||
}
|
||||
|
||||
// Host port exposing the gRPC replication endpoint.
|
||||
func (o LibsqlOutput) ExternalGrpcPort() pulumi.IntPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.IntPtrOutput { return v.ExternalGrpcPort }).(pulumi.IntPtrOutput)
|
||||
}
|
||||
|
||||
// Host port exposing the HTTP API.
|
||||
func (o LibsqlOutput) ExternalPort() pulumi.IntPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.IntPtrOutput { return v.ExternalPort }).(pulumi.IntPtrOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm health check configuration, as a JSON object.
|
||||
func (o LibsqlOutput) HealthCheckSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.HealthCheckSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm service labels, as a JSON object.
|
||||
func (o LibsqlOutput) LabelsSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.LabelsSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Hard memory limit, for example `512m`.
|
||||
func (o LibsqlOutput) MemoryLimit() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.MemoryLimit }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Soft memory reservation, for example `256m`.
|
||||
func (o LibsqlOutput) MemoryReservation() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.MemoryReservation }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm service mode, as a JSON object.
|
||||
func (o LibsqlOutput) ModeSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.ModeSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Display name of the database.
|
||||
func (o LibsqlOutput) Name() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// IDs of additional Docker networks to attach.
|
||||
func (o LibsqlOutput) NetworkIds() pulumi.StringArrayOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringArrayOutput { return v.NetworkIds }).(pulumi.StringArrayOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm network attachments, as a JSON array.
|
||||
func (o LibsqlOutput) NetworkSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.NetworkSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm placement constraints, as a JSON object.
|
||||
func (o LibsqlOutput) PlacementSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.PlacementSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Number of replicas to run.
|
||||
func (o LibsqlOutput) Replicas() pulumi.IntOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.IntOutput { return v.Replicas }).(pulumi.IntOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm restart policy, as a JSON object.
|
||||
func (o LibsqlOutput) RestartPolicySwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.RestartPolicySwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm rollback configuration, as a JSON object.
|
||||
func (o LibsqlOutput) RollbackConfigSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.RollbackConfigSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Remote server to deploy on. Omit to use the Dokploy host itself.
|
||||
func (o LibsqlOutput) ServerId() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Role this node plays in a libSQL cluster. Valid values: `primary`, `replica`. Defaults to `primary`.
|
||||
func (o LibsqlOutput) SqldNode() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringOutput { return v.SqldNode }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// URL of the primary node, when `sqldNode` is `replica`.
|
||||
func (o LibsqlOutput) SqldPrimaryUrl() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.SqldPrimaryUrl }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Grace period in nanoseconds before a container is killed.
|
||||
func (o LibsqlOutput) StopGracePeriodSwarm() pulumi.IntPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.IntPtrOutput { return v.StopGracePeriodSwarm }).(pulumi.IntPtrOutput)
|
||||
}
|
||||
|
||||
// Docker Swarm rolling update configuration, as a JSON object.
|
||||
func (o LibsqlOutput) UpdateConfigSwarm() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Libsql) pulumi.StringPtrOutput { return v.UpdateConfigSwarm }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
type LibsqlArrayOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (LibsqlArrayOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]*Libsql)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o LibsqlArrayOutput) ToLibsqlArrayOutput() LibsqlArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LibsqlArrayOutput) ToLibsqlArrayOutputWithContext(ctx context.Context) LibsqlArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LibsqlArrayOutput) Index(i pulumi.IntInput) LibsqlOutput {
|
||||
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Libsql {
|
||||
return vs[0].([]*Libsql)[vs[1].(int)]
|
||||
}).(LibsqlOutput)
|
||||
}
|
||||
|
||||
type LibsqlMapOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (LibsqlMapOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*map[string]*Libsql)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o LibsqlMapOutput) ToLibsqlMapOutput() LibsqlMapOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LibsqlMapOutput) ToLibsqlMapOutputWithContext(ctx context.Context) LibsqlMapOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LibsqlMapOutput) MapIndex(k pulumi.StringInput) LibsqlOutput {
|
||||
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Libsql {
|
||||
return vs[0].(map[string]*Libsql)[vs[1].(string)]
|
||||
}).(LibsqlOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*LibsqlInput)(nil)).Elem(), &Libsql{})
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*LibsqlArrayInput)(nil)).Elem(), LibsqlArray{})
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*LibsqlMapInput)(nil)).Elem(), LibsqlMap{})
|
||||
pulumi.RegisterOutputType(LibsqlOutput{})
|
||||
pulumi.RegisterOutputType(LibsqlArrayOutput{})
|
||||
pulumi.RegisterOutputType(LibsqlMapOutput{})
|
||||
}
|
||||
Reference in New Issue
Block a user