Files
pulumi-dokploy/sdk/dotnet/Domain.cs
T
max-voitcov 73386ba0ff
build / build (push) Failing after 11m22s
release / plugin (push) Failing after 31m35s
release / sdks (push) Has been skipped
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`.
2026-08-26 00:46:32 +03:00

412 lines
15 KiB
C#
Generated

// *** 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
{
/// <summary>
/// A domain routed to an application or a Compose service through Dokploy's Traefik instance.
///
/// Set exactly one of `ApplicationId` or `ComposeId`. When targeting a Compose stack, `ServiceName` selects which service in the stack receives the traffic.
/// </summary>
[DokployResourceType("dokploy:index/domain:Domain")]
public partial class Domain : global::Pulumi.CustomResource
{
/// <summary>
/// Application this domain routes to.
/// </summary>
[Output("applicationId")]
public Output<string?> ApplicationId { get; private set; } = null!;
/// <summary>
/// How TLS certificates are obtained. Use `Letsencrypt` for automatic certificates. Valid values: `Letsencrypt`, `None`, `Custom`.
/// </summary>
[Output("certificateType")]
public Output<string> CertificateType { get; private set; } = null!;
/// <summary>
/// Compose stack this domain routes to.
/// </summary>
[Output("composeId")]
public Output<string?> ComposeId { get; private set; } = null!;
/// <summary>
/// RFC 3339 timestamp of when the domain was created.
/// </summary>
[Output("createdAt")]
public Output<string> CreatedAt { get; private set; } = null!;
/// <summary>
/// Traefik certificate resolver name, when `CertificateType` is `Custom`.
/// </summary>
[Output("customCertResolver")]
public Output<string?> CustomCertResolver { get; private set; } = null!;
/// <summary>
/// Traefik entrypoint to bind, when not using the defaults.
/// </summary>
[Output("customEntrypoint")]
public Output<string?> CustomEntrypoint { get; private set; } = null!;
/// <summary>
/// What kind of target this domain points at. Valid values: `Compose`, `Application`, `Preview`.
/// </summary>
[Output("domainType")]
public Output<string> DomainType { get; private set; } = null!;
/// <summary>
/// Whether the domain is served. Setting this to `False` removes the route from Traefik but keeps the certificate, path and middleware configuration intact, so the domain can be brought back without reconfiguring it.
/// </summary>
[Output("enabled")]
public Output<bool> Enabled { get; private set; } = null!;
/// <summary>
/// Protect this domain with Dokploy's forward auth.
/// </summary>
[Output("forwardAuthEnabled")]
public Output<bool> ForwardAuthEnabled { get; private set; } = null!;
/// <summary>
/// Fully-qualified hostname, for example `api.example.com`.
/// </summary>
[Output("host")]
public Output<string> Host { get; private set; } = null!;
/// <summary>
/// Serve the domain over HTTPS and redirect HTTP traffic to it.
/// </summary>
[Output("https")]
public Output<bool> Https { get; private set; } = null!;
/// <summary>
/// Path the request is rewritten to before it reaches the container, defaults to `/`.
/// </summary>
[Output("internalPath")]
public Output<string> InternalPath { get; private set; } = null!;
/// <summary>
/// Names of Traefik middlewares to apply.
/// </summary>
[Output("middlewares")]
public Output<ImmutableArray<string>> Middlewares { get; private set; } = null!;
/// <summary>
/// Path prefix this domain routes, defaults to `/`.
/// </summary>
[Output("path")]
public Output<string> Path { get; private set; } = null!;
/// <summary>
/// Container port that receives the traffic, defaults to `3000`.
/// </summary>
[Output("port")]
public Output<int> Port { get; private set; } = null!;
/// <summary>
/// Preview deployment this domain routes to.
/// </summary>
[Output("previewDeploymentId")]
public Output<string?> PreviewDeploymentId { get; private set; } = null!;
/// <summary>
/// Name of the service inside a Compose stack that receives the traffic. Required when `ComposeId` is set.
/// </summary>
[Output("serviceName")]
public Output<string?> ServiceName { get; private set; } = null!;
/// <summary>
/// Strip `Path` from the request before forwarding it.
/// </summary>
[Output("stripPath")]
public Output<bool> StripPath { get; private set; } = null!;
/// <summary>
/// Create a Domain resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public Domain(string name, DomainArgs args, CustomResourceOptions? options = null)
: base("dokploy:index/domain:Domain", name, args ?? new DomainArgs(), MakeResourceOptions(options, ""))
{
}
private Domain(string name, Input<string> id, DomainState? state = null, CustomResourceOptions? options = null)
: base("dokploy:index/domain:Domain", name, state, MakeResourceOptions(options, id))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
};
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;
}
/// <summary>
/// Get an existing Domain resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="state">Any extra arguments used during the lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static Domain Get(string name, Input<string> id, DomainState? state = null, CustomResourceOptions? options = null)
{
return new Domain(name, id, state, options);
}
}
public sealed class DomainArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// Application this domain routes to.
/// </summary>
[Input("applicationId")]
public Input<string>? ApplicationId { get; set; }
/// <summary>
/// How TLS certificates are obtained. Use `Letsencrypt` for automatic certificates. Valid values: `Letsencrypt`, `None`, `Custom`.
/// </summary>
[Input("certificateType")]
public Input<string>? CertificateType { get; set; }
/// <summary>
/// Compose stack this domain routes to.
/// </summary>
[Input("composeId")]
public Input<string>? ComposeId { get; set; }
/// <summary>
/// Traefik certificate resolver name, when `CertificateType` is `Custom`.
/// </summary>
[Input("customCertResolver")]
public Input<string>? CustomCertResolver { get; set; }
/// <summary>
/// Traefik entrypoint to bind, when not using the defaults.
/// </summary>
[Input("customEntrypoint")]
public Input<string>? CustomEntrypoint { get; set; }
/// <summary>
/// What kind of target this domain points at. Valid values: `Compose`, `Application`, `Preview`.
/// </summary>
[Input("domainType")]
public Input<string>? DomainType { get; set; }
/// <summary>
/// Whether the domain is served. Setting this to `False` removes the route from Traefik but keeps the certificate, path and middleware configuration intact, so the domain can be brought back without reconfiguring it.
/// </summary>
[Input("enabled")]
public Input<bool>? Enabled { get; set; }
/// <summary>
/// Protect this domain with Dokploy's forward auth.
/// </summary>
[Input("forwardAuthEnabled")]
public Input<bool>? ForwardAuthEnabled { get; set; }
/// <summary>
/// Fully-qualified hostname, for example `api.example.com`.
/// </summary>
[Input("host", required: true)]
public Input<string> Host { get; set; } = null!;
/// <summary>
/// Serve the domain over HTTPS and redirect HTTP traffic to it.
/// </summary>
[Input("https")]
public Input<bool>? Https { get; set; }
/// <summary>
/// Path the request is rewritten to before it reaches the container, defaults to `/`.
/// </summary>
[Input("internalPath")]
public Input<string>? InternalPath { get; set; }
[Input("middlewares")]
private InputList<string>? _middlewares;
/// <summary>
/// Names of Traefik middlewares to apply.
/// </summary>
public InputList<string> Middlewares
{
get => _middlewares ?? (_middlewares = new InputList<string>());
set => _middlewares = value;
}
/// <summary>
/// Path prefix this domain routes, defaults to `/`.
/// </summary>
[Input("path")]
public Input<string>? Path { get; set; }
/// <summary>
/// Container port that receives the traffic, defaults to `3000`.
/// </summary>
[Input("port")]
public Input<int>? Port { get; set; }
/// <summary>
/// Preview deployment this domain routes to.
/// </summary>
[Input("previewDeploymentId")]
public Input<string>? PreviewDeploymentId { get; set; }
/// <summary>
/// Name of the service inside a Compose stack that receives the traffic. Required when `ComposeId` is set.
/// </summary>
[Input("serviceName")]
public Input<string>? ServiceName { get; set; }
/// <summary>
/// Strip `Path` from the request before forwarding it.
/// </summary>
[Input("stripPath")]
public Input<bool>? StripPath { get; set; }
public DomainArgs()
{
}
public static new DomainArgs Empty => new DomainArgs();
}
public sealed class DomainState : global::Pulumi.ResourceArgs
{
/// <summary>
/// Application this domain routes to.
/// </summary>
[Input("applicationId")]
public Input<string>? ApplicationId { get; set; }
/// <summary>
/// How TLS certificates are obtained. Use `Letsencrypt` for automatic certificates. Valid values: `Letsencrypt`, `None`, `Custom`.
/// </summary>
[Input("certificateType")]
public Input<string>? CertificateType { get; set; }
/// <summary>
/// Compose stack this domain routes to.
/// </summary>
[Input("composeId")]
public Input<string>? ComposeId { get; set; }
/// <summary>
/// RFC 3339 timestamp of when the domain was created.
/// </summary>
[Input("createdAt")]
public Input<string>? CreatedAt { get; set; }
/// <summary>
/// Traefik certificate resolver name, when `CertificateType` is `Custom`.
/// </summary>
[Input("customCertResolver")]
public Input<string>? CustomCertResolver { get; set; }
/// <summary>
/// Traefik entrypoint to bind, when not using the defaults.
/// </summary>
[Input("customEntrypoint")]
public Input<string>? CustomEntrypoint { get; set; }
/// <summary>
/// What kind of target this domain points at. Valid values: `Compose`, `Application`, `Preview`.
/// </summary>
[Input("domainType")]
public Input<string>? DomainType { get; set; }
/// <summary>
/// Whether the domain is served. Setting this to `False` removes the route from Traefik but keeps the certificate, path and middleware configuration intact, so the domain can be brought back without reconfiguring it.
/// </summary>
[Input("enabled")]
public Input<bool>? Enabled { get; set; }
/// <summary>
/// Protect this domain with Dokploy's forward auth.
/// </summary>
[Input("forwardAuthEnabled")]
public Input<bool>? ForwardAuthEnabled { get; set; }
/// <summary>
/// Fully-qualified hostname, for example `api.example.com`.
/// </summary>
[Input("host")]
public Input<string>? Host { get; set; }
/// <summary>
/// Serve the domain over HTTPS and redirect HTTP traffic to it.
/// </summary>
[Input("https")]
public Input<bool>? Https { get; set; }
/// <summary>
/// Path the request is rewritten to before it reaches the container, defaults to `/`.
/// </summary>
[Input("internalPath")]
public Input<string>? InternalPath { get; set; }
[Input("middlewares")]
private InputList<string>? _middlewares;
/// <summary>
/// Names of Traefik middlewares to apply.
/// </summary>
public InputList<string> Middlewares
{
get => _middlewares ?? (_middlewares = new InputList<string>());
set => _middlewares = value;
}
/// <summary>
/// Path prefix this domain routes, defaults to `/`.
/// </summary>
[Input("path")]
public Input<string>? Path { get; set; }
/// <summary>
/// Container port that receives the traffic, defaults to `3000`.
/// </summary>
[Input("port")]
public Input<int>? Port { get; set; }
/// <summary>
/// Preview deployment this domain routes to.
/// </summary>
[Input("previewDeploymentId")]
public Input<string>? PreviewDeploymentId { get; set; }
/// <summary>
/// Name of the service inside a Compose stack that receives the traffic. Required when `ComposeId` is set.
/// </summary>
[Input("serviceName")]
public Input<string>? ServiceName { get; set; }
/// <summary>
/// Strip `Path` from the request before forwarding it.
/// </summary>
[Input("stripPath")]
public Input<bool>? StripPath { get; set; }
public DomainState()
{
}
public static new DomainState Empty => new DomainState();
}
}