// *** WARNING: this file was generated by pulumi-language-dotnet. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;
namespace Maxvojtkov.Dokploy
{
[DokployResourceType("dokploy:index/mongo:Mongo")]
public partial class Mongo : global::Pulumi.CustomResource
{
///
/// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
///
[Output("appName")]
public Output AppName { get; private set; } = null!;
///
/// Current status reported by Dokploy: `Idle`, `Running`, `Done` or `Error`.
///
[Output("applicationStatus")]
public Output ApplicationStatus { get; private set; } = null!;
///
/// Arguments appended to the container command.
///
[Output("args")]
public Output> Args { get; private set; } = null!;
///
/// Override the container entrypoint command.
///
[Output("command")]
public Output Command { get; private set; } = null!;
///
/// Hard CPU limit, for example `1`.
///
[Output("cpuLimit")]
public Output CpuLimit { get; private set; } = null!;
///
/// Soft CPU reservation, for example `0.5`.
///
[Output("cpuReservation")]
public Output CpuReservation { get; private set; } = null!;
///
/// RFC 3339 timestamp of when the database was created.
///
[Output("createdAt")]
public Output CreatedAt { get; private set; } = null!;
///
/// Password for the root user.
///
[Output("databasePassword")]
public Output DatabasePassword { get; private set; } = null!;
///
/// Root username to create.
///
[Output("databaseUser")]
public Output DatabaseUser { get; private set; } = null!;
///
/// Free-form description.
///
[Output("description")]
public Output Description { get; private set; } = null!;
///
/// Detach the service from the shared `dokploy-network`.
///
[Output("detachDokployNetwork")]
public Output DetachDokployNetwork { get; private set; } = null!;
///
/// MongoDB image to run. Defaults to `mongo:8`.
///
[Output("dockerImage")]
public Output DockerImage { get; private set; } = null!;
///
/// Docker Swarm endpoint specification, as a JSON object.
///
[Output("endpointSpecSwarm")]
public Output EndpointSpecSwarm { get; private set; } = null!;
///
/// Environment variables in `KEY=value` format, one per line.
///
[Output("env")]
public Output Env { get; private set; } = null!;
///
/// Environment this database belongs to.
///
[Output("environmentId")]
public Output EnvironmentId { get; private set; } = null!;
///
/// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
///
[Output("externalPort")]
public Output ExternalPort { get; private set; } = null!;
///
/// Docker Swarm health check configuration, as a JSON object.
///
[Output("healthCheckSwarm")]
public Output HealthCheckSwarm { get; private set; } = null!;
///
/// Docker Swarm service labels, as a JSON object.
///
[Output("labelsSwarm")]
public Output LabelsSwarm { get; private set; } = null!;
///
/// Hard memory limit, for example `512m`.
///
[Output("memoryLimit")]
public Output MemoryLimit { get; private set; } = null!;
///
/// Soft memory reservation, for example `256m`.
///
[Output("memoryReservation")]
public Output MemoryReservation { get; private set; } = null!;
///
/// Docker Swarm service mode, as a JSON object.
///
[Output("modeSwarm")]
public Output ModeSwarm { get; private set; } = null!;
///
/// Display name of the database.
///
[Output("name")]
public Output Name { get; private set; } = null!;
///
/// IDs of additional Docker networks to attach.
///
[Output("networkIds")]
public Output> NetworkIds { get; private set; } = null!;
///
/// Docker Swarm network attachments, as a JSON array.
///
[Output("networkSwarm")]
public Output NetworkSwarm { get; private set; } = null!;
///
/// Docker Swarm placement constraints, as a JSON object.
///
[Output("placementSwarm")]
public Output PlacementSwarm { get; private set; } = null!;
///
/// Start the instance as a single-node replica set.
///
[Output("replicaSets")]
public Output ReplicaSets { get; private set; } = null!;
///
/// Number of replicas to run.
///
[Output("replicas")]
public Output Replicas { get; private set; } = null!;
///
/// Docker Swarm restart policy, as a JSON object.
///
[Output("restartPolicySwarm")]
public Output RestartPolicySwarm { get; private set; } = null!;
///
/// Docker Swarm rollback configuration, as a JSON object.
///
[Output("rollbackConfigSwarm")]
public Output RollbackConfigSwarm { get; private set; } = null!;
///
/// Remote server to deploy on. Omit to use the Dokploy host itself.
///
[Output("serverId")]
public Output ServerId { get; private set; } = null!;
///
/// Grace period in nanoseconds before a container is killed.
///
[Output("stopGracePeriodSwarm")]
public Output StopGracePeriodSwarm { get; private set; } = null!;
///
/// Docker Swarm ulimits, as a JSON object.
///
[Output("ulimitsSwarm")]
public Output UlimitsSwarm { get; private set; } = null!;
///
/// Docker Swarm rolling update configuration, as a JSON object.
///
[Output("updateConfigSwarm")]
public Output UpdateConfigSwarm { get; private set; } = null!;
///
/// Create a Mongo resource with the given unique name, arguments, and options.
///
///
/// The unique name of the resource
/// The arguments used to populate this resource's properties
/// A bag of options that control this resource's behavior
public Mongo(string name, MongoArgs args, CustomResourceOptions? options = null)
: base("dokploy:index/mongo:Mongo", name, args ?? new MongoArgs(), MakeResourceOptions(options, ""))
{
}
private Mongo(string name, Input id, MongoState? state = null, CustomResourceOptions? options = null)
: base("dokploy:index/mongo:Mongo", name, state, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
AdditionalSecretOutputs =
{
"databasePassword",
},
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
///
/// Get an existing Mongo resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
///
///
/// The unique name of the resulting resource.
/// The unique provider ID of the resource to lookup.
/// Any extra arguments used during the lookup.
/// A bag of options that control this resource's behavior
public static Mongo Get(string name, Input id, MongoState? state = null, CustomResourceOptions? options = null)
{
return new Mongo(name, id, state, options);
}
}
public sealed class MongoArgs : global::Pulumi.ResourceArgs
{
///
/// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
///
[Input("appName")]
public Input? AppName { get; set; }
[Input("args")]
private InputList? _args;
///
/// Arguments appended to the container command.
///
public InputList Args
{
get => _args ?? (_args = new InputList());
set => _args = value;
}
///
/// Override the container entrypoint command.
///
[Input("command")]
public Input? Command { get; set; }
///
/// Hard CPU limit, for example `1`.
///
[Input("cpuLimit")]
public Input? CpuLimit { get; set; }
///
/// Soft CPU reservation, for example `0.5`.
///
[Input("cpuReservation")]
public Input? CpuReservation { get; set; }
[Input("databasePassword", required: true)]
private Input? _databasePassword;
///
/// Password for the root user.
///
public Input? DatabasePassword
{
get => _databasePassword;
set
{
var emptySecret = Output.CreateSecret(0);
_databasePassword = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1);
}
}
///
/// Root username to create.
///
[Input("databaseUser", required: true)]
public Input DatabaseUser { get; set; } = null!;
///
/// Free-form description.
///
[Input("description")]
public Input? Description { get; set; }
///
/// Detach the service from the shared `dokploy-network`.
///
[Input("detachDokployNetwork")]
public Input? DetachDokployNetwork { get; set; }
///
/// MongoDB image to run. Defaults to `mongo:8`.
///
[Input("dockerImage")]
public Input? DockerImage { get; set; }
///
/// Docker Swarm endpoint specification, as a JSON object.
///
[Input("endpointSpecSwarm")]
public Input? EndpointSpecSwarm { get; set; }
///
/// Environment variables in `KEY=value` format, one per line.
///
[Input("env")]
public Input? Env { get; set; }
///
/// Environment this database belongs to.
///
[Input("environmentId", required: true)]
public Input EnvironmentId { get; set; } = null!;
///
/// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
///
[Input("externalPort")]
public Input? ExternalPort { get; set; }
///
/// Docker Swarm health check configuration, as a JSON object.
///
[Input("healthCheckSwarm")]
public Input? HealthCheckSwarm { get; set; }
///
/// Docker Swarm service labels, as a JSON object.
///
[Input("labelsSwarm")]
public Input? LabelsSwarm { get; set; }
///
/// Hard memory limit, for example `512m`.
///
[Input("memoryLimit")]
public Input? MemoryLimit { get; set; }
///
/// Soft memory reservation, for example `256m`.
///
[Input("memoryReservation")]
public Input? MemoryReservation { get; set; }
///
/// Docker Swarm service mode, as a JSON object.
///
[Input("modeSwarm")]
public Input? ModeSwarm { get; set; }
///
/// Display name of the database.
///
[Input("name")]
public Input? Name { get; set; }
[Input("networkIds")]
private InputList? _networkIds;
///
/// IDs of additional Docker networks to attach.
///
public InputList NetworkIds
{
get => _networkIds ?? (_networkIds = new InputList());
set => _networkIds = value;
}
///
/// Docker Swarm network attachments, as a JSON array.
///
[Input("networkSwarm")]
public Input? NetworkSwarm { get; set; }
///
/// Docker Swarm placement constraints, as a JSON object.
///
[Input("placementSwarm")]
public Input? PlacementSwarm { get; set; }
///
/// Start the instance as a single-node replica set.
///
[Input("replicaSets")]
public Input? ReplicaSets { get; set; }
///
/// Number of replicas to run.
///
[Input("replicas")]
public Input? Replicas { get; set; }
///
/// Docker Swarm restart policy, as a JSON object.
///
[Input("restartPolicySwarm")]
public Input? RestartPolicySwarm { get; set; }
///
/// Docker Swarm rollback configuration, as a JSON object.
///
[Input("rollbackConfigSwarm")]
public Input? RollbackConfigSwarm { get; set; }
///
/// Remote server to deploy on. Omit to use the Dokploy host itself.
///
[Input("serverId")]
public Input? ServerId { get; set; }
///
/// Grace period in nanoseconds before a container is killed.
///
[Input("stopGracePeriodSwarm")]
public Input? StopGracePeriodSwarm { get; set; }
///
/// Docker Swarm ulimits, as a JSON object.
///
[Input("ulimitsSwarm")]
public Input? UlimitsSwarm { get; set; }
///
/// Docker Swarm rolling update configuration, as a JSON object.
///
[Input("updateConfigSwarm")]
public Input? UpdateConfigSwarm { get; set; }
public MongoArgs()
{
}
public static new MongoArgs Empty => new MongoArgs();
}
public sealed class MongoState : global::Pulumi.ResourceArgs
{
///
/// Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
///
[Input("appName")]
public Input? AppName { get; set; }
///
/// Current status reported by Dokploy: `Idle`, `Running`, `Done` or `Error`.
///
[Input("applicationStatus")]
public Input? ApplicationStatus { get; set; }
[Input("args")]
private InputList? _args;
///
/// Arguments appended to the container command.
///
public InputList Args
{
get => _args ?? (_args = new InputList());
set => _args = value;
}
///
/// Override the container entrypoint command.
///
[Input("command")]
public Input? Command { get; set; }
///
/// Hard CPU limit, for example `1`.
///
[Input("cpuLimit")]
public Input? CpuLimit { get; set; }
///
/// Soft CPU reservation, for example `0.5`.
///
[Input("cpuReservation")]
public Input? CpuReservation { get; set; }
///
/// RFC 3339 timestamp of when the database was created.
///
[Input("createdAt")]
public Input? CreatedAt { get; set; }
[Input("databasePassword")]
private Input? _databasePassword;
///
/// Password for the root user.
///
public Input? DatabasePassword
{
get => _databasePassword;
set
{
var emptySecret = Output.CreateSecret(0);
_databasePassword = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1);
}
}
///
/// Root username to create.
///
[Input("databaseUser")]
public Input? DatabaseUser { get; set; }
///
/// Free-form description.
///
[Input("description")]
public Input? Description { get; set; }
///
/// Detach the service from the shared `dokploy-network`.
///
[Input("detachDokployNetwork")]
public Input? DetachDokployNetwork { get; set; }
///
/// MongoDB image to run. Defaults to `mongo:8`.
///
[Input("dockerImage")]
public Input? DockerImage { get; set; }
///
/// Docker Swarm endpoint specification, as a JSON object.
///
[Input("endpointSpecSwarm")]
public Input? EndpointSpecSwarm { get; set; }
///
/// Environment variables in `KEY=value` format, one per line.
///
[Input("env")]
public Input? Env { get; set; }
///
/// Environment this database belongs to.
///
[Input("environmentId")]
public Input? EnvironmentId { get; set; }
///
/// Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
///
[Input("externalPort")]
public Input? ExternalPort { get; set; }
///
/// Docker Swarm health check configuration, as a JSON object.
///
[Input("healthCheckSwarm")]
public Input? HealthCheckSwarm { get; set; }
///
/// Docker Swarm service labels, as a JSON object.
///
[Input("labelsSwarm")]
public Input? LabelsSwarm { get; set; }
///
/// Hard memory limit, for example `512m`.
///
[Input("memoryLimit")]
public Input? MemoryLimit { get; set; }
///
/// Soft memory reservation, for example `256m`.
///
[Input("memoryReservation")]
public Input? MemoryReservation { get; set; }
///
/// Docker Swarm service mode, as a JSON object.
///
[Input("modeSwarm")]
public Input? ModeSwarm { get; set; }
///
/// Display name of the database.
///
[Input("name")]
public Input? Name { get; set; }
[Input("networkIds")]
private InputList? _networkIds;
///
/// IDs of additional Docker networks to attach.
///
public InputList NetworkIds
{
get => _networkIds ?? (_networkIds = new InputList());
set => _networkIds = value;
}
///
/// Docker Swarm network attachments, as a JSON array.
///
[Input("networkSwarm")]
public Input? NetworkSwarm { get; set; }
///
/// Docker Swarm placement constraints, as a JSON object.
///
[Input("placementSwarm")]
public Input? PlacementSwarm { get; set; }
///
/// Start the instance as a single-node replica set.
///
[Input("replicaSets")]
public Input? ReplicaSets { get; set; }
///
/// Number of replicas to run.
///
[Input("replicas")]
public Input? Replicas { get; set; }
///
/// Docker Swarm restart policy, as a JSON object.
///
[Input("restartPolicySwarm")]
public Input? RestartPolicySwarm { get; set; }
///
/// Docker Swarm rollback configuration, as a JSON object.
///
[Input("rollbackConfigSwarm")]
public Input? RollbackConfigSwarm { get; set; }
///
/// Remote server to deploy on. Omit to use the Dokploy host itself.
///
[Input("serverId")]
public Input? ServerId { get; set; }
///
/// Grace period in nanoseconds before a container is killed.
///
[Input("stopGracePeriodSwarm")]
public Input? StopGracePeriodSwarm { get; set; }
///
/// Docker Swarm ulimits, as a JSON object.
///
[Input("ulimitsSwarm")]
public Input? UlimitsSwarm { get; set; }
///
/// Docker Swarm rolling update configuration, as a JSON object.
///
[Input("updateConfigSwarm")]
public Input? UpdateConfigSwarm { get; set; }
public MongoState()
{
}
public static new MongoState Empty => new MongoState();
}
}