// *** 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"; 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, state?: DomainState, opts?: pulumi.CustomResourceOptions): Domain { return new Domain(name, 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; /** * How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`. */ declare public readonly certificateType: pulumi.Output; /** * Compose stack this domain routes to. */ declare public readonly composeId: pulumi.Output; /** * RFC 3339 timestamp of when the domain was created. */ declare public /*out*/ readonly createdAt: pulumi.Output; /** * Traefik certificate resolver name, when `certificateType` is `custom`. */ declare public readonly customCertResolver: pulumi.Output; /** * Traefik entrypoint to bind, when not using the defaults. */ declare public readonly customEntrypoint: pulumi.Output; /** * What kind of target this domain points at. Valid values: `compose`, `application`, `preview`. */ declare public readonly domainType: pulumi.Output; /** * Protect this domain with Dokploy's forward auth. */ declare public readonly forwardAuthEnabled: pulumi.Output; /** * Fully-qualified hostname, for example `api.example.com`. */ declare public readonly host: pulumi.Output; /** * Serve the domain over HTTPS and redirect HTTP traffic to it. */ declare public readonly https: pulumi.Output; /** * Path the request is rewritten to before it reaches the container, defaults to `/`. */ declare public readonly internalPath: pulumi.Output; /** * Names of Traefik middlewares to apply. */ declare public readonly middlewares: pulumi.Output; /** * Path prefix this domain routes, defaults to `/`. */ declare public readonly path: pulumi.Output; /** * Container port that receives the traffic, defaults to `3000`. */ declare public readonly port: pulumi.Output; /** * Preview deployment this domain routes to. */ declare public readonly previewDeploymentId: pulumi.Output; /** * Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set. */ declare public readonly serviceName: pulumi.Output; /** * Strip `path` from the request before forwarding it. */ declare public readonly stripPath: pulumi.Output; /** * 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["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["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; /** * How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`. */ certificateType?: pulumi.Input; /** * Compose stack this domain routes to. */ composeId?: pulumi.Input; /** * RFC 3339 timestamp of when the domain was created. */ createdAt?: pulumi.Input; /** * Traefik certificate resolver name, when `certificateType` is `custom`. */ customCertResolver?: pulumi.Input; /** * Traefik entrypoint to bind, when not using the defaults. */ customEntrypoint?: pulumi.Input; /** * What kind of target this domain points at. Valid values: `compose`, `application`, `preview`. */ domainType?: pulumi.Input; /** * Protect this domain with Dokploy's forward auth. */ forwardAuthEnabled?: pulumi.Input; /** * Fully-qualified hostname, for example `api.example.com`. */ host?: pulumi.Input; /** * Serve the domain over HTTPS and redirect HTTP traffic to it. */ https?: pulumi.Input; /** * Path the request is rewritten to before it reaches the container, defaults to `/`. */ internalPath?: pulumi.Input; /** * Names of Traefik middlewares to apply. */ middlewares?: pulumi.Input[]>; /** * Path prefix this domain routes, defaults to `/`. */ path?: pulumi.Input; /** * Container port that receives the traffic, defaults to `3000`. */ port?: pulumi.Input; /** * Preview deployment this domain routes to. */ previewDeploymentId?: pulumi.Input; /** * Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set. */ serviceName?: pulumi.Input; /** * Strip `path` from the request before forwarding it. */ stripPath?: pulumi.Input; } /** * The set of arguments for constructing a Domain resource. */ export interface DomainArgs { /** * Application this domain routes to. */ applicationId?: pulumi.Input; /** * How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`. */ certificateType?: pulumi.Input; /** * Compose stack this domain routes to. */ composeId?: pulumi.Input; /** * Traefik certificate resolver name, when `certificateType` is `custom`. */ customCertResolver?: pulumi.Input; /** * Traefik entrypoint to bind, when not using the defaults. */ customEntrypoint?: pulumi.Input; /** * What kind of target this domain points at. Valid values: `compose`, `application`, `preview`. */ domainType?: pulumi.Input; /** * Protect this domain with Dokploy's forward auth. */ forwardAuthEnabled?: pulumi.Input; /** * Fully-qualified hostname, for example `api.example.com`. */ host: pulumi.Input; /** * Serve the domain over HTTPS and redirect HTTP traffic to it. */ https?: pulumi.Input; /** * Path the request is rewritten to before it reaches the container, defaults to `/`. */ internalPath?: pulumi.Input; /** * Names of Traefik middlewares to apply. */ middlewares?: pulumi.Input[]>; /** * Path prefix this domain routes, defaults to `/`. */ path?: pulumi.Input; /** * Container port that receives the traffic, defaults to `3000`. */ port?: pulumi.Input; /** * Preview deployment this domain routes to. */ previewDeploymentId?: pulumi.Input; /** * Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set. */ serviceName?: pulumi.Input; /** * Strip `path` from the request before forwarding it. */ stripPath?: pulumi.Input; }