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`.
709 lines
29 KiB
Go
Generated
709 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"
|
|
)
|
|
|
|
// A managed MongoDB 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.
|
|
type Mongo 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"`
|
|
// Password for the root user.
|
|
DatabasePassword pulumi.StringOutput `pulumi:"databasePassword"`
|
|
// Root username 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"`
|
|
// MongoDB image to run. Defaults to `mongo:8`.
|
|
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"`
|
|
// Start the instance as a single-node replica set.
|
|
ReplicaSets pulumi.BoolOutput `pulumi:"replicaSets"`
|
|
// 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"`
|
|
}
|
|
|
|
// NewMongo registers a new resource with the given unique name, arguments, and options.
|
|
func NewMongo(ctx *pulumi.Context,
|
|
name string, args *MongoArgs, opts ...pulumi.ResourceOption) (*Mongo, 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.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 Mongo
|
|
err := ctx.RegisterResource("dokploy:index/mongo:Mongo", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetMongo gets an existing Mongo 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 GetMongo(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *MongoState, opts ...pulumi.ResourceOption) (*Mongo, error) {
|
|
var resource Mongo
|
|
err := ctx.ReadResource("dokploy:index/mongo:Mongo", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering Mongo resources.
|
|
type mongoState 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"`
|
|
// Password for the root user.
|
|
DatabasePassword *string `pulumi:"databasePassword"`
|
|
// Root username 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"`
|
|
// MongoDB image to run. Defaults to `mongo:8`.
|
|
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"`
|
|
// Start the instance as a single-node replica set.
|
|
ReplicaSets *bool `pulumi:"replicaSets"`
|
|
// 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 MongoState 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
|
|
// Password for the root user.
|
|
DatabasePassword pulumi.StringPtrInput
|
|
// Root username to create.
|
|
DatabaseUser pulumi.StringPtrInput
|
|
// Free-form description.
|
|
Description pulumi.StringPtrInput
|
|
// Detach the service from the shared `dokploy-network`.
|
|
DetachDokployNetwork pulumi.BoolPtrInput
|
|
// MongoDB image to run. Defaults to `mongo:8`.
|
|
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
|
|
// Start the instance as a single-node replica set.
|
|
ReplicaSets pulumi.BoolPtrInput
|
|
// 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 (MongoState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*mongoState)(nil)).Elem()
|
|
}
|
|
|
|
type mongoArgs 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"`
|
|
// Password for the root user.
|
|
DatabasePassword string `pulumi:"databasePassword"`
|
|
// Root username 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"`
|
|
// MongoDB image to run. Defaults to `mongo:8`.
|
|
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"`
|
|
// Start the instance as a single-node replica set.
|
|
ReplicaSets *bool `pulumi:"replicaSets"`
|
|
// 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 Mongo resource.
|
|
type MongoArgs 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
|
|
// Password for the root user.
|
|
DatabasePassword pulumi.StringInput
|
|
// Root username to create.
|
|
DatabaseUser pulumi.StringInput
|
|
// Free-form description.
|
|
Description pulumi.StringPtrInput
|
|
// Detach the service from the shared `dokploy-network`.
|
|
DetachDokployNetwork pulumi.BoolPtrInput
|
|
// MongoDB image to run. Defaults to `mongo:8`.
|
|
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.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
|
|
// Start the instance as a single-node replica set.
|
|
ReplicaSets pulumi.BoolPtrInput
|
|
// 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 (MongoArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*mongoArgs)(nil)).Elem()
|
|
}
|
|
|
|
type MongoInput interface {
|
|
pulumi.Input
|
|
|
|
ToMongoOutput() MongoOutput
|
|
ToMongoOutputWithContext(ctx context.Context) MongoOutput
|
|
}
|
|
|
|
func (*Mongo) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Mongo)(nil)).Elem()
|
|
}
|
|
|
|
func (i *Mongo) ToMongoOutput() MongoOutput {
|
|
return i.ToMongoOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *Mongo) ToMongoOutputWithContext(ctx context.Context) MongoOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(MongoOutput)
|
|
}
|
|
|
|
// MongoArrayInput is an input type that accepts MongoArray and MongoArrayOutput values.
|
|
// You can construct a concrete instance of `MongoArrayInput` via:
|
|
//
|
|
// MongoArray{ MongoArgs{...} }
|
|
type MongoArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToMongoArrayOutput() MongoArrayOutput
|
|
ToMongoArrayOutputWithContext(context.Context) MongoArrayOutput
|
|
}
|
|
|
|
type MongoArray []MongoInput
|
|
|
|
func (MongoArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Mongo)(nil)).Elem()
|
|
}
|
|
|
|
func (i MongoArray) ToMongoArrayOutput() MongoArrayOutput {
|
|
return i.ToMongoArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i MongoArray) ToMongoArrayOutputWithContext(ctx context.Context) MongoArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(MongoArrayOutput)
|
|
}
|
|
|
|
// MongoMapInput is an input type that accepts MongoMap and MongoMapOutput values.
|
|
// You can construct a concrete instance of `MongoMapInput` via:
|
|
//
|
|
// MongoMap{ "key": MongoArgs{...} }
|
|
type MongoMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToMongoMapOutput() MongoMapOutput
|
|
ToMongoMapOutputWithContext(context.Context) MongoMapOutput
|
|
}
|
|
|
|
type MongoMap map[string]MongoInput
|
|
|
|
func (MongoMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Mongo)(nil)).Elem()
|
|
}
|
|
|
|
func (i MongoMap) ToMongoMapOutput() MongoMapOutput {
|
|
return i.ToMongoMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i MongoMap) ToMongoMapOutputWithContext(ctx context.Context) MongoMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(MongoMapOutput)
|
|
}
|
|
|
|
type MongoOutput struct{ *pulumi.OutputState }
|
|
|
|
func (MongoOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Mongo)(nil)).Elem()
|
|
}
|
|
|
|
func (o MongoOutput) ToMongoOutput() MongoOutput {
|
|
return o
|
|
}
|
|
|
|
func (o MongoOutput) ToMongoOutputWithContext(ctx context.Context) MongoOutput {
|
|
return o
|
|
}
|
|
|
|
// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
|
|
func (o MongoOutput) AppName() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
|
|
func (o MongoOutput) ApplicationStatus() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.ApplicationStatus }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Arguments appended to the container command.
|
|
func (o MongoOutput) Args() pulumi.StringArrayOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringArrayOutput { return v.Args }).(pulumi.StringArrayOutput)
|
|
}
|
|
|
|
// Override the container entrypoint command.
|
|
func (o MongoOutput) Command() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.Command }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Hard CPU limit, for example `1`.
|
|
func (o MongoOutput) CpuLimit() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.CpuLimit }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Soft CPU reservation, for example `0.5`.
|
|
func (o MongoOutput) CpuReservation() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.CpuReservation }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// RFC 3339 timestamp of when the database was created.
|
|
func (o MongoOutput) CreatedAt() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Password for the root user.
|
|
func (o MongoOutput) DatabasePassword() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.DatabasePassword }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Root username to create.
|
|
func (o MongoOutput) DatabaseUser() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.DatabaseUser }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Free-form description.
|
|
func (o MongoOutput) Description() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Detach the service from the shared `dokploy-network`.
|
|
func (o MongoOutput) DetachDokployNetwork() pulumi.BoolOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.BoolOutput { return v.DetachDokployNetwork }).(pulumi.BoolOutput)
|
|
}
|
|
|
|
// MongoDB image to run. Defaults to `mongo:8`.
|
|
func (o MongoOutput) DockerImage() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.DockerImage }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Docker Swarm endpoint specification, as a JSON object.
|
|
func (o MongoOutput) EndpointSpecSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.EndpointSpecSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Environment variables in `KEY=value` format, one per line.
|
|
func (o MongoOutput) Env() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.Env }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Environment this database belongs to.
|
|
func (o MongoOutput) EnvironmentId() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) 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 MongoOutput) ExternalPort() pulumi.IntPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.IntPtrOutput { return v.ExternalPort }).(pulumi.IntPtrOutput)
|
|
}
|
|
|
|
// Docker Swarm health check configuration, as a JSON object.
|
|
func (o MongoOutput) HealthCheckSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.HealthCheckSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Docker Swarm service labels, as a JSON object.
|
|
func (o MongoOutput) LabelsSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.LabelsSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Hard memory limit, for example `512m`.
|
|
func (o MongoOutput) MemoryLimit() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.MemoryLimit }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Soft memory reservation, for example `256m`.
|
|
func (o MongoOutput) MemoryReservation() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.MemoryReservation }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Docker Swarm service mode, as a JSON object.
|
|
func (o MongoOutput) ModeSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.ModeSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Display name of the database.
|
|
func (o MongoOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// IDs of additional Docker networks to attach.
|
|
func (o MongoOutput) NetworkIds() pulumi.StringArrayOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringArrayOutput { return v.NetworkIds }).(pulumi.StringArrayOutput)
|
|
}
|
|
|
|
// Docker Swarm network attachments, as a JSON array.
|
|
func (o MongoOutput) NetworkSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.NetworkSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Docker Swarm placement constraints, as a JSON object.
|
|
func (o MongoOutput) PlacementSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.PlacementSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Start the instance as a single-node replica set.
|
|
func (o MongoOutput) ReplicaSets() pulumi.BoolOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.BoolOutput { return v.ReplicaSets }).(pulumi.BoolOutput)
|
|
}
|
|
|
|
// Number of replicas to run.
|
|
func (o MongoOutput) Replicas() pulumi.IntOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.IntOutput { return v.Replicas }).(pulumi.IntOutput)
|
|
}
|
|
|
|
// Docker Swarm restart policy, as a JSON object.
|
|
func (o MongoOutput) RestartPolicySwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.RestartPolicySwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Docker Swarm rollback configuration, as a JSON object.
|
|
func (o MongoOutput) RollbackConfigSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.RollbackConfigSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Remote server to deploy on. Omit to use the Dokploy host itself.
|
|
func (o MongoOutput) ServerId() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.ServerId }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Grace period in nanoseconds before a container is killed.
|
|
func (o MongoOutput) StopGracePeriodSwarm() pulumi.IntPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.IntPtrOutput { return v.StopGracePeriodSwarm }).(pulumi.IntPtrOutput)
|
|
}
|
|
|
|
// Docker Swarm ulimits, as a JSON object.
|
|
func (o MongoOutput) UlimitsSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.UlimitsSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Docker Swarm rolling update configuration, as a JSON object.
|
|
func (o MongoOutput) UpdateConfigSwarm() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Mongo) pulumi.StringPtrOutput { return v.UpdateConfigSwarm }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
type MongoArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (MongoArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Mongo)(nil)).Elem()
|
|
}
|
|
|
|
func (o MongoArrayOutput) ToMongoArrayOutput() MongoArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o MongoArrayOutput) ToMongoArrayOutputWithContext(ctx context.Context) MongoArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o MongoArrayOutput) Index(i pulumi.IntInput) MongoOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Mongo {
|
|
return vs[0].([]*Mongo)[vs[1].(int)]
|
|
}).(MongoOutput)
|
|
}
|
|
|
|
type MongoMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (MongoMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Mongo)(nil)).Elem()
|
|
}
|
|
|
|
func (o MongoMapOutput) ToMongoMapOutput() MongoMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o MongoMapOutput) ToMongoMapOutputWithContext(ctx context.Context) MongoMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o MongoMapOutput) MapIndex(k pulumi.StringInput) MongoOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Mongo {
|
|
return vs[0].(map[string]*Mongo)[vs[1].(string)]
|
|
}).(MongoOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*MongoInput)(nil)).Elem(), &Mongo{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*MongoArrayInput)(nil)).Elem(), MongoArray{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*MongoMapInput)(nil)).Elem(), MongoMap{})
|
|
pulumi.RegisterOutputType(MongoOutput{})
|
|
pulumi.RegisterOutputType(MongoArrayOutput{})
|
|
pulumi.RegisterOutputType(MongoMapOutput{})
|
|
}
|