Files
pulumi-dokploy/sdk/nodejs/domain.ts
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

324 lines
13 KiB
TypeScript
Generated

// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
/**
* 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.
*/
export class Domain extends pulumi.CustomResource {
/**
* Get an existing Domain resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DomainState, opts?: pulumi.CustomResourceOptions): Domain {
return new Domain(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/domain:Domain';
/**
* Returns true if the given object is an instance of Domain. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is Domain {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Domain.__pulumiType;
}
/**
* Application this domain routes to.
*/
declare public readonly applicationId: pulumi.Output<string | undefined>;
/**
* How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
*/
declare public readonly certificateType: pulumi.Output<string>;
/**
* Compose stack this domain routes to.
*/
declare public readonly composeId: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the domain was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Traefik certificate resolver name, when `certificateType` is `custom`.
*/
declare public readonly customCertResolver: pulumi.Output<string | undefined>;
/**
* Traefik entrypoint to bind, when not using the defaults.
*/
declare public readonly customEntrypoint: pulumi.Output<string | undefined>;
/**
* What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
*/
declare public readonly domainType: pulumi.Output<string>;
/**
* 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.
*/
declare public readonly enabled: pulumi.Output<boolean>;
/**
* Protect this domain with Dokploy's forward auth.
*/
declare public readonly forwardAuthEnabled: pulumi.Output<boolean>;
/**
* Fully-qualified hostname, for example `api.example.com`.
*/
declare public readonly host: pulumi.Output<string>;
/**
* Serve the domain over HTTPS and redirect HTTP traffic to it.
*/
declare public readonly https: pulumi.Output<boolean>;
/**
* Path the request is rewritten to before it reaches the container, defaults to `/`.
*/
declare public readonly internalPath: pulumi.Output<string>;
/**
* Names of Traefik middlewares to apply.
*/
declare public readonly middlewares: pulumi.Output<string[]>;
/**
* Path prefix this domain routes, defaults to `/`.
*/
declare public readonly path: pulumi.Output<string>;
/**
* Container port that receives the traffic, defaults to `3000`.
*/
declare public readonly port: pulumi.Output<number>;
/**
* Preview deployment this domain routes to.
*/
declare public readonly previewDeploymentId: pulumi.Output<string | undefined>;
/**
* Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
*/
declare public readonly serviceName: pulumi.Output<string | undefined>;
/**
* Strip `path` from the request before forwarding it.
*/
declare public readonly stripPath: pulumi.Output<boolean>;
/**
* Create a Domain resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: DomainArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: DomainArgs | DomainState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as DomainState | undefined;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["certificateType"] = state?.certificateType;
resourceInputs["composeId"] = state?.composeId;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["customCertResolver"] = state?.customCertResolver;
resourceInputs["customEntrypoint"] = state?.customEntrypoint;
resourceInputs["domainType"] = state?.domainType;
resourceInputs["enabled"] = state?.enabled;
resourceInputs["forwardAuthEnabled"] = state?.forwardAuthEnabled;
resourceInputs["host"] = state?.host;
resourceInputs["https"] = state?.https;
resourceInputs["internalPath"] = state?.internalPath;
resourceInputs["middlewares"] = state?.middlewares;
resourceInputs["path"] = state?.path;
resourceInputs["port"] = state?.port;
resourceInputs["previewDeploymentId"] = state?.previewDeploymentId;
resourceInputs["serviceName"] = state?.serviceName;
resourceInputs["stripPath"] = state?.stripPath;
} else {
const args = argsOrState as DomainArgs | undefined;
if (args?.host === undefined && !opts.urn) {
throw new Error("Missing required property 'host'");
}
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["certificateType"] = args?.certificateType;
resourceInputs["composeId"] = args?.composeId;
resourceInputs["customCertResolver"] = args?.customCertResolver;
resourceInputs["customEntrypoint"] = args?.customEntrypoint;
resourceInputs["domainType"] = args?.domainType;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["forwardAuthEnabled"] = args?.forwardAuthEnabled;
resourceInputs["host"] = args?.host;
resourceInputs["https"] = args?.https;
resourceInputs["internalPath"] = args?.internalPath;
resourceInputs["middlewares"] = args?.middlewares;
resourceInputs["path"] = args?.path;
resourceInputs["port"] = args?.port;
resourceInputs["previewDeploymentId"] = args?.previewDeploymentId;
resourceInputs["serviceName"] = args?.serviceName;
resourceInputs["stripPath"] = args?.stripPath;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Domain.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Domain resources.
*/
export interface DomainState {
/**
* Application this domain routes to.
*/
applicationId?: pulumi.Input<string | undefined>;
/**
* How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
*/
certificateType?: pulumi.Input<string | undefined>;
/**
* Compose stack this domain routes to.
*/
composeId?: pulumi.Input<string | undefined>;
/**
* RFC 3339 timestamp of when the domain was created.
*/
createdAt?: pulumi.Input<string | undefined>;
/**
* Traefik certificate resolver name, when `certificateType` is `custom`.
*/
customCertResolver?: pulumi.Input<string | undefined>;
/**
* Traefik entrypoint to bind, when not using the defaults.
*/
customEntrypoint?: pulumi.Input<string | undefined>;
/**
* What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
*/
domainType?: pulumi.Input<string | undefined>;
/**
* 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.
*/
enabled?: pulumi.Input<boolean | undefined>;
/**
* Protect this domain with Dokploy's forward auth.
*/
forwardAuthEnabled?: pulumi.Input<boolean | undefined>;
/**
* Fully-qualified hostname, for example `api.example.com`.
*/
host?: pulumi.Input<string | undefined>;
/**
* Serve the domain over HTTPS and redirect HTTP traffic to it.
*/
https?: pulumi.Input<boolean | undefined>;
/**
* Path the request is rewritten to before it reaches the container, defaults to `/`.
*/
internalPath?: pulumi.Input<string | undefined>;
/**
* Names of Traefik middlewares to apply.
*/
middlewares?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Path prefix this domain routes, defaults to `/`.
*/
path?: pulumi.Input<string | undefined>;
/**
* Container port that receives the traffic, defaults to `3000`.
*/
port?: pulumi.Input<number | undefined>;
/**
* Preview deployment this domain routes to.
*/
previewDeploymentId?: pulumi.Input<string | undefined>;
/**
* Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
*/
serviceName?: pulumi.Input<string | undefined>;
/**
* Strip `path` from the request before forwarding it.
*/
stripPath?: pulumi.Input<boolean | undefined>;
}
/**
* The set of arguments for constructing a Domain resource.
*/
export interface DomainArgs {
/**
* Application this domain routes to.
*/
applicationId?: pulumi.Input<string | undefined>;
/**
* How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
*/
certificateType?: pulumi.Input<string | undefined>;
/**
* Compose stack this domain routes to.
*/
composeId?: pulumi.Input<string | undefined>;
/**
* Traefik certificate resolver name, when `certificateType` is `custom`.
*/
customCertResolver?: pulumi.Input<string | undefined>;
/**
* Traefik entrypoint to bind, when not using the defaults.
*/
customEntrypoint?: pulumi.Input<string | undefined>;
/**
* What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
*/
domainType?: pulumi.Input<string | undefined>;
/**
* 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.
*/
enabled?: pulumi.Input<boolean | undefined>;
/**
* Protect this domain with Dokploy's forward auth.
*/
forwardAuthEnabled?: pulumi.Input<boolean | undefined>;
/**
* Fully-qualified hostname, for example `api.example.com`.
*/
host: pulumi.Input<string>;
/**
* Serve the domain over HTTPS and redirect HTTP traffic to it.
*/
https?: pulumi.Input<boolean | undefined>;
/**
* Path the request is rewritten to before it reaches the container, defaults to `/`.
*/
internalPath?: pulumi.Input<string | undefined>;
/**
* Names of Traefik middlewares to apply.
*/
middlewares?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Path prefix this domain routes, defaults to `/`.
*/
path?: pulumi.Input<string | undefined>;
/**
* Container port that receives the traffic, defaults to `3000`.
*/
port?: pulumi.Input<number | undefined>;
/**
* Preview deployment this domain routes to.
*/
previewDeploymentId?: pulumi.Input<string | undefined>;
/**
* Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
*/
serviceName?: pulumi.Input<string | undefined>;
/**
* Strip `path` from the request before forwarding it.
*/
stripPath?: pulumi.Input<boolean | undefined>;
}