Bridge terraform-provider-dokploy into a Pulumi provider

18 resources and 5 data sources mapped into the dokploy:index module, with
SDKs generated for TypeScript, Python, Go and .NET.
This commit is contained in:
2026-08-08 15:28:16 +03:00
commit bb3c15135b
175 changed files with 61774 additions and 0 deletions

1
sdk/nodejs/.gitattributes generated vendored Normal file
View File

@@ -0,0 +1 @@
* linguist-generated

2
sdk/nodejs/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules/
bin/

3
sdk/nodejs/Pulumi.yaml generated Normal file
View File

@@ -0,0 +1,3 @@
name: dokploy
description: A Pulumi resource provider for dokploy.
language: nodejs

4
sdk/nodejs/README.md generated Normal file
View File

@@ -0,0 +1,4 @@
> This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
> first check the [`pulumi-dokploy` repo](https://github.com/maxvojtkov/pulumi-dokploy/issues); however, if that doesn't turn up anything,
> please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).

1408
sdk/nodejs/application.ts generated Normal file

File diff suppressed because it is too large Load Diff

155
sdk/nodejs/certificate.ts generated Normal file
View File

@@ -0,0 +1,155 @@
// *** 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 Certificate extends pulumi.CustomResource {
/**
* Get an existing Certificate 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?: CertificateState, opts?: pulumi.CustomResourceOptions): Certificate {
return new Certificate(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/certificate:Certificate';
/**
* Returns true if the given object is an instance of Certificate. 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 Certificate {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Certificate.__pulumiType;
}
/**
* Whether Dokploy should renew this certificate automatically.
*/
declare public readonly autoRenew: pulumi.Output<boolean>;
/**
* PEM-encoded certificate chain.
*/
declare public readonly certificateData: pulumi.Output<string>;
/**
* Path where Dokploy writes the certificate on disk.
*/
declare public /*out*/ readonly certificatePath: pulumi.Output<string>;
/**
* Display name of the certificate.
*/
declare public readonly name: pulumi.Output<string>;
/**
* PEM-encoded private key.
*/
declare public readonly privateKey: pulumi.Output<string>;
/**
* Server this certificate is installed on.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Create a Certificate 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: CertificateArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: CertificateArgs | CertificateState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as CertificateState | undefined;
resourceInputs["autoRenew"] = state?.autoRenew;
resourceInputs["certificateData"] = state?.certificateData;
resourceInputs["certificatePath"] = state?.certificatePath;
resourceInputs["name"] = state?.name;
resourceInputs["privateKey"] = state?.privateKey;
resourceInputs["serverId"] = state?.serverId;
} else {
const args = argsOrState as CertificateArgs | undefined;
if (args?.certificateData === undefined && !opts.urn) {
throw new Error("Missing required property 'certificateData'");
}
if (args?.privateKey === undefined && !opts.urn) {
throw new Error("Missing required property 'privateKey'");
}
resourceInputs["autoRenew"] = args?.autoRenew;
resourceInputs["certificateData"] = args?.certificateData;
resourceInputs["name"] = args?.name;
resourceInputs["privateKey"] = args?.privateKey ? pulumi.secret(args.privateKey) : undefined;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["certificatePath"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["privateKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Certificate.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Certificate resources.
*/
export interface CertificateState {
/**
* Whether Dokploy should renew this certificate automatically.
*/
autoRenew?: pulumi.Input<boolean>;
/**
* PEM-encoded certificate chain.
*/
certificateData?: pulumi.Input<string>;
/**
* Path where Dokploy writes the certificate on disk.
*/
certificatePath?: pulumi.Input<string>;
/**
* Display name of the certificate.
*/
name?: pulumi.Input<string>;
/**
* PEM-encoded private key.
*/
privateKey?: pulumi.Input<string>;
/**
* Server this certificate is installed on.
*/
serverId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Certificate resource.
*/
export interface CertificateArgs {
/**
* Whether Dokploy should renew this certificate automatically.
*/
autoRenew?: pulumi.Input<boolean>;
/**
* PEM-encoded certificate chain.
*/
certificateData: pulumi.Input<string>;
/**
* Display name of the certificate.
*/
name?: pulumi.Input<string>;
/**
* PEM-encoded private key.
*/
privateKey: pulumi.Input<string>;
/**
* Server this certificate is installed on.
*/
serverId?: pulumi.Input<string>;
}

678
sdk/nodejs/compose.ts generated Normal file
View File

@@ -0,0 +1,678 @@
// *** 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 Compose extends pulumi.CustomResource {
/**
* Get an existing Compose 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?: ComposeState, opts?: pulumi.CustomResourceOptions): Compose {
return new Compose(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/compose:Compose';
/**
* Returns true if the given object is an instance of Compose. 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 Compose {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Compose.__pulumiType;
}
/**
* Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Deploy automatically when the configured trigger fires.
*/
declare public readonly autoDeploy: pulumi.Output<boolean>;
/**
* Bitbucket branch to deploy.
*/
declare public readonly bitbucketBranch: pulumi.Output<string | undefined>;
/**
* ID of the configured Bitbucket provider connection.
*/
declare public readonly bitbucketId: pulumi.Output<string | undefined>;
/**
* Bitbucket repository owner.
*/
declare public readonly bitbucketOwner: pulumi.Output<string | undefined>;
/**
* Bitbucket repository name.
*/
declare public readonly bitbucketRepository: pulumi.Output<string | undefined>;
/**
* Bitbucket repository slug.
*/
declare public readonly bitbucketRepositorySlug: pulumi.Output<string | undefined>;
/**
* GitHub branch to deploy.
*/
declare public readonly branch: pulumi.Output<string | undefined>;
/**
* Custom `docker compose` command to run.
*/
declare public readonly command: pulumi.Output<string>;
/**
* Inline Compose file contents. Used when `sourceType` is `raw`.
*/
declare public readonly composeFile: pulumi.Output<string>;
/**
* Path to the Compose file within the repository.
*/
declare public readonly composePath: pulumi.Output<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
declare public /*out*/ readonly composeStatus: pulumi.Output<string>;
/**
* Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
*/
declare public readonly composeType: pulumi.Output<string>;
/**
* RFC 3339 timestamp of when the stack was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Branch to deploy for a custom Git remote.
*/
declare public readonly customGitBranch: pulumi.Output<string | undefined>;
/**
* SSH key used to clone a private custom Git remote.
*/
declare public readonly customGitSshKeyId: pulumi.Output<string | undefined>;
/**
* Git remote URL, when `sourceType` is `git`.
*/
declare public readonly customGitUrl: pulumi.Output<string | undefined>;
/**
* Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
*/
declare public readonly deleteVolumes: pulumi.Output<boolean | undefined>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Clone Git submodules when checking out the repository.
*/
declare public readonly enableSubmodules: pulumi.Output<boolean>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
declare public readonly env: pulumi.Output<string | undefined>;
/**
* Environment this stack belongs to.
*/
declare public readonly environmentId: pulumi.Output<string>;
/**
* Gitea branch to deploy.
*/
declare public readonly giteaBranch: pulumi.Output<string | undefined>;
/**
* ID of the configured Gitea provider connection.
*/
declare public readonly giteaId: pulumi.Output<string | undefined>;
/**
* Gitea repository owner.
*/
declare public readonly giteaOwner: pulumi.Output<string | undefined>;
/**
* Gitea repository name.
*/
declare public readonly giteaRepository: pulumi.Output<string | undefined>;
/**
* ID of the configured GitHub provider connection.
*/
declare public readonly githubId: pulumi.Output<string | undefined>;
/**
* GitLab branch to deploy.
*/
declare public readonly gitlabBranch: pulumi.Output<string | undefined>;
/**
* ID of the configured GitLab provider connection.
*/
declare public readonly gitlabId: pulumi.Output<string | undefined>;
/**
* GitLab repository owner.
*/
declare public readonly gitlabOwner: pulumi.Output<string | undefined>;
/**
* Full GitLab namespace path.
*/
declare public readonly gitlabPathNamespace: pulumi.Output<string | undefined>;
/**
* Numeric GitLab project ID.
*/
declare public readonly gitlabProjectId: pulumi.Output<number | undefined>;
/**
* GitLab repository name.
*/
declare public readonly gitlabRepository: pulumi.Output<string | undefined>;
/**
* Run the stack on its own isolated Docker network.
*/
declare public readonly isolatedDeployment: pulumi.Output<boolean>;
/**
* Prefix volume names for isolated deployments. Retained for backwards compatibility.
*/
declare public readonly isolatedDeploymentsVolume: pulumi.Output<boolean>;
/**
* Display name of the stack.
*/
declare public readonly name: pulumi.Output<string>;
/**
* GitHub repository owner.
*/
declare public readonly owner: pulumi.Output<string | undefined>;
/**
* Append a random suffix to service and volume names.
*/
declare public readonly randomize: pulumi.Output<boolean>;
/**
* GitHub repository name.
*/
declare public readonly repository: pulumi.Output<string | undefined>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
*/
declare public readonly sourceType: pulumi.Output<string>;
/**
* Suffix appended to generated resource names.
*/
declare public readonly suffix: pulumi.Output<string>;
/**
* What triggers an automatic deployment. Valid values: `push`, `tag`.
*/
declare public readonly triggerType: pulumi.Output<string>;
/**
* Glob patterns that limit which changed paths trigger an automatic deployment.
*/
declare public readonly watchPaths: pulumi.Output<string[]>;
/**
* Create a Compose 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: ComposeArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: ComposeArgs | ComposeState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as ComposeState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["autoDeploy"] = state?.autoDeploy;
resourceInputs["bitbucketBranch"] = state?.bitbucketBranch;
resourceInputs["bitbucketId"] = state?.bitbucketId;
resourceInputs["bitbucketOwner"] = state?.bitbucketOwner;
resourceInputs["bitbucketRepository"] = state?.bitbucketRepository;
resourceInputs["bitbucketRepositorySlug"] = state?.bitbucketRepositorySlug;
resourceInputs["branch"] = state?.branch;
resourceInputs["command"] = state?.command;
resourceInputs["composeFile"] = state?.composeFile;
resourceInputs["composePath"] = state?.composePath;
resourceInputs["composeStatus"] = state?.composeStatus;
resourceInputs["composeType"] = state?.composeType;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["customGitBranch"] = state?.customGitBranch;
resourceInputs["customGitSshKeyId"] = state?.customGitSshKeyId;
resourceInputs["customGitUrl"] = state?.customGitUrl;
resourceInputs["deleteVolumes"] = state?.deleteVolumes;
resourceInputs["description"] = state?.description;
resourceInputs["enableSubmodules"] = state?.enableSubmodules;
resourceInputs["env"] = state?.env;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["giteaBranch"] = state?.giteaBranch;
resourceInputs["giteaId"] = state?.giteaId;
resourceInputs["giteaOwner"] = state?.giteaOwner;
resourceInputs["giteaRepository"] = state?.giteaRepository;
resourceInputs["githubId"] = state?.githubId;
resourceInputs["gitlabBranch"] = state?.gitlabBranch;
resourceInputs["gitlabId"] = state?.gitlabId;
resourceInputs["gitlabOwner"] = state?.gitlabOwner;
resourceInputs["gitlabPathNamespace"] = state?.gitlabPathNamespace;
resourceInputs["gitlabProjectId"] = state?.gitlabProjectId;
resourceInputs["gitlabRepository"] = state?.gitlabRepository;
resourceInputs["isolatedDeployment"] = state?.isolatedDeployment;
resourceInputs["isolatedDeploymentsVolume"] = state?.isolatedDeploymentsVolume;
resourceInputs["name"] = state?.name;
resourceInputs["owner"] = state?.owner;
resourceInputs["randomize"] = state?.randomize;
resourceInputs["repository"] = state?.repository;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["sourceType"] = state?.sourceType;
resourceInputs["suffix"] = state?.suffix;
resourceInputs["triggerType"] = state?.triggerType;
resourceInputs["watchPaths"] = state?.watchPaths;
} else {
const args = argsOrState as ComposeArgs | undefined;
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["autoDeploy"] = args?.autoDeploy;
resourceInputs["bitbucketBranch"] = args?.bitbucketBranch;
resourceInputs["bitbucketId"] = args?.bitbucketId;
resourceInputs["bitbucketOwner"] = args?.bitbucketOwner;
resourceInputs["bitbucketRepository"] = args?.bitbucketRepository;
resourceInputs["bitbucketRepositorySlug"] = args?.bitbucketRepositorySlug;
resourceInputs["branch"] = args?.branch;
resourceInputs["command"] = args?.command;
resourceInputs["composeFile"] = args?.composeFile;
resourceInputs["composePath"] = args?.composePath;
resourceInputs["composeType"] = args?.composeType;
resourceInputs["customGitBranch"] = args?.customGitBranch;
resourceInputs["customGitSshKeyId"] = args?.customGitSshKeyId;
resourceInputs["customGitUrl"] = args?.customGitUrl;
resourceInputs["deleteVolumes"] = args?.deleteVolumes;
resourceInputs["description"] = args?.description;
resourceInputs["enableSubmodules"] = args?.enableSubmodules;
resourceInputs["env"] = args?.env;
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["giteaBranch"] = args?.giteaBranch;
resourceInputs["giteaId"] = args?.giteaId;
resourceInputs["giteaOwner"] = args?.giteaOwner;
resourceInputs["giteaRepository"] = args?.giteaRepository;
resourceInputs["githubId"] = args?.githubId;
resourceInputs["gitlabBranch"] = args?.gitlabBranch;
resourceInputs["gitlabId"] = args?.gitlabId;
resourceInputs["gitlabOwner"] = args?.gitlabOwner;
resourceInputs["gitlabPathNamespace"] = args?.gitlabPathNamespace;
resourceInputs["gitlabProjectId"] = args?.gitlabProjectId;
resourceInputs["gitlabRepository"] = args?.gitlabRepository;
resourceInputs["isolatedDeployment"] = args?.isolatedDeployment;
resourceInputs["isolatedDeploymentsVolume"] = args?.isolatedDeploymentsVolume;
resourceInputs["name"] = args?.name;
resourceInputs["owner"] = args?.owner;
resourceInputs["randomize"] = args?.randomize;
resourceInputs["repository"] = args?.repository;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["sourceType"] = args?.sourceType;
resourceInputs["suffix"] = args?.suffix;
resourceInputs["triggerType"] = args?.triggerType;
resourceInputs["watchPaths"] = args?.watchPaths;
resourceInputs["composeStatus"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Compose.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Compose resources.
*/
export interface ComposeState {
/**
* Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
*/
appName?: pulumi.Input<string>;
/**
* Deploy automatically when the configured trigger fires.
*/
autoDeploy?: pulumi.Input<boolean>;
/**
* Bitbucket branch to deploy.
*/
bitbucketBranch?: pulumi.Input<string>;
/**
* ID of the configured Bitbucket provider connection.
*/
bitbucketId?: pulumi.Input<string>;
/**
* Bitbucket repository owner.
*/
bitbucketOwner?: pulumi.Input<string>;
/**
* Bitbucket repository name.
*/
bitbucketRepository?: pulumi.Input<string>;
/**
* Bitbucket repository slug.
*/
bitbucketRepositorySlug?: pulumi.Input<string>;
/**
* GitHub branch to deploy.
*/
branch?: pulumi.Input<string>;
/**
* Custom `docker compose` command to run.
*/
command?: pulumi.Input<string>;
/**
* Inline Compose file contents. Used when `sourceType` is `raw`.
*/
composeFile?: pulumi.Input<string>;
/**
* Path to the Compose file within the repository.
*/
composePath?: pulumi.Input<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
composeStatus?: pulumi.Input<string>;
/**
* Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
*/
composeType?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the stack was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Branch to deploy for a custom Git remote.
*/
customGitBranch?: pulumi.Input<string>;
/**
* SSH key used to clone a private custom Git remote.
*/
customGitSshKeyId?: pulumi.Input<string>;
/**
* Git remote URL, when `sourceType` is `git`.
*/
customGitUrl?: pulumi.Input<string>;
/**
* Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
*/
deleteVolumes?: pulumi.Input<boolean>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Clone Git submodules when checking out the repository.
*/
enableSubmodules?: pulumi.Input<boolean>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this stack belongs to.
*/
environmentId?: pulumi.Input<string>;
/**
* Gitea branch to deploy.
*/
giteaBranch?: pulumi.Input<string>;
/**
* ID of the configured Gitea provider connection.
*/
giteaId?: pulumi.Input<string>;
/**
* Gitea repository owner.
*/
giteaOwner?: pulumi.Input<string>;
/**
* Gitea repository name.
*/
giteaRepository?: pulumi.Input<string>;
/**
* ID of the configured GitHub provider connection.
*/
githubId?: pulumi.Input<string>;
/**
* GitLab branch to deploy.
*/
gitlabBranch?: pulumi.Input<string>;
/**
* ID of the configured GitLab provider connection.
*/
gitlabId?: pulumi.Input<string>;
/**
* GitLab repository owner.
*/
gitlabOwner?: pulumi.Input<string>;
/**
* Full GitLab namespace path.
*/
gitlabPathNamespace?: pulumi.Input<string>;
/**
* Numeric GitLab project ID.
*/
gitlabProjectId?: pulumi.Input<number>;
/**
* GitLab repository name.
*/
gitlabRepository?: pulumi.Input<string>;
/**
* Run the stack on its own isolated Docker network.
*/
isolatedDeployment?: pulumi.Input<boolean>;
/**
* Prefix volume names for isolated deployments. Retained for backwards compatibility.
*/
isolatedDeploymentsVolume?: pulumi.Input<boolean>;
/**
* Display name of the stack.
*/
name?: pulumi.Input<string>;
/**
* GitHub repository owner.
*/
owner?: pulumi.Input<string>;
/**
* Append a random suffix to service and volume names.
*/
randomize?: pulumi.Input<boolean>;
/**
* GitHub repository name.
*/
repository?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
*/
sourceType?: pulumi.Input<string>;
/**
* Suffix appended to generated resource names.
*/
suffix?: pulumi.Input<string>;
/**
* What triggers an automatic deployment. Valid values: `push`, `tag`.
*/
triggerType?: pulumi.Input<string>;
/**
* Glob patterns that limit which changed paths trigger an automatic deployment.
*/
watchPaths?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a Compose resource.
*/
export interface ComposeArgs {
/**
* Unique Docker stack name. Generated by Dokploy when omitted. Changing it forces a new stack.
*/
appName?: pulumi.Input<string>;
/**
* Deploy automatically when the configured trigger fires.
*/
autoDeploy?: pulumi.Input<boolean>;
/**
* Bitbucket branch to deploy.
*/
bitbucketBranch?: pulumi.Input<string>;
/**
* ID of the configured Bitbucket provider connection.
*/
bitbucketId?: pulumi.Input<string>;
/**
* Bitbucket repository owner.
*/
bitbucketOwner?: pulumi.Input<string>;
/**
* Bitbucket repository name.
*/
bitbucketRepository?: pulumi.Input<string>;
/**
* Bitbucket repository slug.
*/
bitbucketRepositorySlug?: pulumi.Input<string>;
/**
* GitHub branch to deploy.
*/
branch?: pulumi.Input<string>;
/**
* Custom `docker compose` command to run.
*/
command?: pulumi.Input<string>;
/**
* Inline Compose file contents. Used when `sourceType` is `raw`.
*/
composeFile?: pulumi.Input<string>;
/**
* Path to the Compose file within the repository.
*/
composePath?: pulumi.Input<string>;
/**
* Whether to run the stack with Docker Compose or Docker Swarm. Valid values: `docker-compose`, `stack`.
*/
composeType?: pulumi.Input<string>;
/**
* Branch to deploy for a custom Git remote.
*/
customGitBranch?: pulumi.Input<string>;
/**
* SSH key used to clone a private custom Git remote.
*/
customGitSshKeyId?: pulumi.Input<string>;
/**
* Git remote URL, when `sourceType` is `git`.
*/
customGitUrl?: pulumi.Input<string>;
/**
* Whether to delete the stack's Docker volumes when this resource is destroyed. Defaults to `false`, which preserves the data.
*/
deleteVolumes?: pulumi.Input<boolean>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Clone Git submodules when checking out the repository.
*/
enableSubmodules?: pulumi.Input<boolean>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this stack belongs to.
*/
environmentId: pulumi.Input<string>;
/**
* Gitea branch to deploy.
*/
giteaBranch?: pulumi.Input<string>;
/**
* ID of the configured Gitea provider connection.
*/
giteaId?: pulumi.Input<string>;
/**
* Gitea repository owner.
*/
giteaOwner?: pulumi.Input<string>;
/**
* Gitea repository name.
*/
giteaRepository?: pulumi.Input<string>;
/**
* ID of the configured GitHub provider connection.
*/
githubId?: pulumi.Input<string>;
/**
* GitLab branch to deploy.
*/
gitlabBranch?: pulumi.Input<string>;
/**
* ID of the configured GitLab provider connection.
*/
gitlabId?: pulumi.Input<string>;
/**
* GitLab repository owner.
*/
gitlabOwner?: pulumi.Input<string>;
/**
* Full GitLab namespace path.
*/
gitlabPathNamespace?: pulumi.Input<string>;
/**
* Numeric GitLab project ID.
*/
gitlabProjectId?: pulumi.Input<number>;
/**
* GitLab repository name.
*/
gitlabRepository?: pulumi.Input<string>;
/**
* Run the stack on its own isolated Docker network.
*/
isolatedDeployment?: pulumi.Input<boolean>;
/**
* Prefix volume names for isolated deployments. Retained for backwards compatibility.
*/
isolatedDeploymentsVolume?: pulumi.Input<boolean>;
/**
* Display name of the stack.
*/
name?: pulumi.Input<string>;
/**
* GitHub repository owner.
*/
owner?: pulumi.Input<string>;
/**
* Append a random suffix to service and volume names.
*/
randomize?: pulumi.Input<boolean>;
/**
* GitHub repository name.
*/
repository?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Where the Compose file comes from. Valid values: `git`, `github`, `gitlab`, `bitbucket`, `gitea`, `raw`.
*/
sourceType?: pulumi.Input<string>;
/**
* Suffix appended to generated resource names.
*/
suffix?: pulumi.Input<string>;
/**
* What triggers an automatic deployment. Valid values: `push`, `tag`.
*/
triggerType?: pulumi.Input<string>;
/**
* Glob patterns that limit which changed paths trigger an automatic deployment.
*/
watchPaths?: pulumi.Input<pulumi.Input<string>[]>;
}

5
sdk/nodejs/config/index.ts generated Normal file
View File

@@ -0,0 +1,5 @@
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// Export members:
export * from "./vars";

53
sdk/nodejs/config/vars.ts generated Normal file
View File

@@ -0,0 +1,53 @@
// *** 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";
declare var exports: any;
const __config = new pulumi.Config("dokploy");
/**
* API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
*/
export declare const apiKey: string | undefined;
Object.defineProperty(exports, "apiKey", {
get() {
return __config.get("apiKey") ?? utilities.getEnv("DOKPLOY_API_KEY");
},
enumerable: true,
});
/**
* Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
*/
export declare const host: string | undefined;
Object.defineProperty(exports, "host", {
get() {
return __config.get("host") ?? utilities.getEnv("DOKPLOY_HOST");
},
enumerable: true,
});
/**
* Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
*/
export declare const insecureSkipVerify: boolean | undefined;
Object.defineProperty(exports, "insecureSkipVerify", {
get() {
return __config.getObject<boolean>("insecureSkipVerify");
},
enumerable: true,
});
/**
* Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
*/
export declare const timeoutSeconds: number | undefined;
Object.defineProperty(exports, "timeoutSeconds", {
get() {
return __config.getObject<number>("timeoutSeconds") ?? utilities.getEnvNumber("DOKPLOY_TIMEOUT_SECONDS");
},
enumerable: true,
});

220
sdk/nodejs/destination.ts generated Normal file
View File

@@ -0,0 +1,220 @@
// *** 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 Destination extends pulumi.CustomResource {
/**
* Get an existing Destination 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?: DestinationState, opts?: pulumi.CustomResourceOptions): Destination {
return new Destination(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/destination:Destination';
/**
* Returns true if the given object is an instance of Destination. 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 Destination {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Destination.__pulumiType;
}
/**
* S3 access key ID.
*/
declare public readonly accessKey: pulumi.Output<string>;
/**
* Extra flags passed to the underlying `rclone` invocation.
*/
declare public readonly additionalFlags: pulumi.Output<string[]>;
/**
* Bucket name.
*/
declare public readonly bucket: pulumi.Output<string>;
/**
* Timestamp of when the destination was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* S3 endpoint URL.
*/
declare public readonly endpoint: pulumi.Output<string>;
/**
* Display name of the destination.
*/
declare public readonly name: pulumi.Output<string>;
/**
* Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
*/
declare public readonly providerName: pulumi.Output<string | undefined>;
/**
* Bucket region, for example `us-east-1`.
*/
declare public readonly region: pulumi.Output<string>;
/**
* S3 secret access key.
*/
declare public readonly secretAccessKey: pulumi.Output<string>;
/**
* Server this destination is scoped to.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Create a Destination 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: DestinationArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: DestinationArgs | DestinationState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as DestinationState | undefined;
resourceInputs["accessKey"] = state?.accessKey;
resourceInputs["additionalFlags"] = state?.additionalFlags;
resourceInputs["bucket"] = state?.bucket;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["endpoint"] = state?.endpoint;
resourceInputs["name"] = state?.name;
resourceInputs["providerName"] = state?.providerName;
resourceInputs["region"] = state?.region;
resourceInputs["secretAccessKey"] = state?.secretAccessKey;
resourceInputs["serverId"] = state?.serverId;
} else {
const args = argsOrState as DestinationArgs | undefined;
if (args?.accessKey === undefined && !opts.urn) {
throw new Error("Missing required property 'accessKey'");
}
if (args?.bucket === undefined && !opts.urn) {
throw new Error("Missing required property 'bucket'");
}
if (args?.endpoint === undefined && !opts.urn) {
throw new Error("Missing required property 'endpoint'");
}
if (args?.region === undefined && !opts.urn) {
throw new Error("Missing required property 'region'");
}
if (args?.secretAccessKey === undefined && !opts.urn) {
throw new Error("Missing required property 'secretAccessKey'");
}
resourceInputs["accessKey"] = args?.accessKey;
resourceInputs["additionalFlags"] = args?.additionalFlags;
resourceInputs["bucket"] = args?.bucket;
resourceInputs["endpoint"] = args?.endpoint;
resourceInputs["name"] = args?.name;
resourceInputs["providerName"] = args?.providerName;
resourceInputs["region"] = args?.region;
resourceInputs["secretAccessKey"] = args?.secretAccessKey ? pulumi.secret(args.secretAccessKey) : undefined;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["secretAccessKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Destination.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Destination resources.
*/
export interface DestinationState {
/**
* S3 access key ID.
*/
accessKey?: pulumi.Input<string>;
/**
* Extra flags passed to the underlying `rclone` invocation.
*/
additionalFlags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Bucket name.
*/
bucket?: pulumi.Input<string>;
/**
* Timestamp of when the destination was created.
*/
createdAt?: pulumi.Input<string>;
/**
* S3 endpoint URL.
*/
endpoint?: pulumi.Input<string>;
/**
* Display name of the destination.
*/
name?: pulumi.Input<string>;
/**
* Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
*/
providerName?: pulumi.Input<string>;
/**
* Bucket region, for example `us-east-1`.
*/
region?: pulumi.Input<string>;
/**
* S3 secret access key.
*/
secretAccessKey?: pulumi.Input<string>;
/**
* Server this destination is scoped to.
*/
serverId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Destination resource.
*/
export interface DestinationArgs {
/**
* S3 access key ID.
*/
accessKey: pulumi.Input<string>;
/**
* Extra flags passed to the underlying `rclone` invocation.
*/
additionalFlags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Bucket name.
*/
bucket: pulumi.Input<string>;
/**
* S3 endpoint URL.
*/
endpoint: pulumi.Input<string>;
/**
* Display name of the destination.
*/
name?: pulumi.Input<string>;
/**
* Provider label, for example `s3` or `cloudflare`. Named `providerName` because `provider` is reserved by Terraform.
*/
providerName?: pulumi.Input<string>;
/**
* Bucket region, for example `us-east-1`.
*/
region: pulumi.Input<string>;
/**
* S3 secret access key.
*/
secretAccessKey: pulumi.Input<string>;
/**
* Server this destination is scoped to.
*/
serverId?: pulumi.Input<string>;
}

304
sdk/nodejs/domain.ts generated Normal file
View File

@@ -0,0 +1,304 @@
// *** 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<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>;
/**
* 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["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<string>;
/**
* How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
*/
certificateType?: pulumi.Input<string>;
/**
* Compose stack this domain routes to.
*/
composeId?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the domain was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Traefik certificate resolver name, when `certificateType` is `custom`.
*/
customCertResolver?: pulumi.Input<string>;
/**
* Traefik entrypoint to bind, when not using the defaults.
*/
customEntrypoint?: pulumi.Input<string>;
/**
* What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
*/
domainType?: pulumi.Input<string>;
/**
* Protect this domain with Dokploy's forward auth.
*/
forwardAuthEnabled?: pulumi.Input<boolean>;
/**
* 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>;
/**
* Path the request is rewritten to before it reaches the container, defaults to `/`.
*/
internalPath?: pulumi.Input<string>;
/**
* Names of Traefik middlewares to apply.
*/
middlewares?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Path prefix this domain routes, defaults to `/`.
*/
path?: pulumi.Input<string>;
/**
* Container port that receives the traffic, defaults to `3000`.
*/
port?: pulumi.Input<number>;
/**
* Preview deployment this domain routes to.
*/
previewDeploymentId?: pulumi.Input<string>;
/**
* Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
*/
serviceName?: pulumi.Input<string>;
/**
* Strip `path` from the request before forwarding it.
*/
stripPath?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a Domain resource.
*/
export interface DomainArgs {
/**
* Application this domain routes to.
*/
applicationId?: pulumi.Input<string>;
/**
* How TLS certificates are obtained. Use `letsencrypt` for automatic certificates. Valid values: `letsencrypt`, `none`, `custom`.
*/
certificateType?: pulumi.Input<string>;
/**
* Compose stack this domain routes to.
*/
composeId?: pulumi.Input<string>;
/**
* Traefik certificate resolver name, when `certificateType` is `custom`.
*/
customCertResolver?: pulumi.Input<string>;
/**
* Traefik entrypoint to bind, when not using the defaults.
*/
customEntrypoint?: pulumi.Input<string>;
/**
* What kind of target this domain points at. Valid values: `compose`, `application`, `preview`.
*/
domainType?: pulumi.Input<string>;
/**
* Protect this domain with Dokploy's forward auth.
*/
forwardAuthEnabled?: pulumi.Input<boolean>;
/**
* 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>;
/**
* Path the request is rewritten to before it reaches the container, defaults to `/`.
*/
internalPath?: pulumi.Input<string>;
/**
* Names of Traefik middlewares to apply.
*/
middlewares?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Path prefix this domain routes, defaults to `/`.
*/
path?: pulumi.Input<string>;
/**
* Container port that receives the traffic, defaults to `3000`.
*/
port?: pulumi.Input<number>;
/**
* Preview deployment this domain routes to.
*/
previewDeploymentId?: pulumi.Input<string>;
/**
* Name of the service inside a Compose stack that receives the traffic. Required when `composeId` is set.
*/
serviceName?: pulumi.Input<string>;
/**
* Strip `path` from the request before forwarding it.
*/
stripPath?: pulumi.Input<boolean>;
}

146
sdk/nodejs/environment.ts generated Normal file
View File

@@ -0,0 +1,146 @@
// *** 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 Environment extends pulumi.CustomResource {
/**
* Get an existing Environment 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?: EnvironmentState, opts?: pulumi.CustomResourceOptions): Environment {
return new Environment(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/environment:Environment';
/**
* Returns true if the given object is an instance of Environment. 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 Environment {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Environment.__pulumiType;
}
/**
* RFC 3339 timestamp of when the environment was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
*/
declare public readonly env: pulumi.Output<string>;
/**
* Whether this is the project's default environment.
*/
declare public /*out*/ readonly isDefault: pulumi.Output<boolean>;
/**
* Environment name, for example `staging`.
*/
declare public readonly name: pulumi.Output<string>;
/**
* Project this environment belongs to.
*/
declare public readonly projectId: pulumi.Output<string>;
/**
* Create a Environment 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: EnvironmentArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: EnvironmentArgs | EnvironmentState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as EnvironmentState | undefined;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["description"] = state?.description;
resourceInputs["env"] = state?.env;
resourceInputs["isDefault"] = state?.isDefault;
resourceInputs["name"] = state?.name;
resourceInputs["projectId"] = state?.projectId;
} else {
const args = argsOrState as EnvironmentArgs | undefined;
if (args?.projectId === undefined && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["description"] = args?.description;
resourceInputs["env"] = args?.env;
resourceInputs["name"] = args?.name;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["isDefault"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Environment.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Environment resources.
*/
export interface EnvironmentState {
/**
* RFC 3339 timestamp of when the environment was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
*/
env?: pulumi.Input<string>;
/**
* Whether this is the project's default environment.
*/
isDefault?: pulumi.Input<boolean>;
/**
* Environment name, for example `staging`.
*/
name?: pulumi.Input<string>;
/**
* Project this environment belongs to.
*/
projectId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Environment resource.
*/
export interface EnvironmentArgs {
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Environment-wide variables in `KEY=value` format, one per line. These are merged into every service in this environment.
*/
env?: pulumi.Input<string>;
/**
* Environment name, for example `staging`.
*/
name?: pulumi.Input<string>;
/**
* Project this environment belongs to.
*/
projectId: pulumi.Input<string>;
}

47
sdk/nodejs/getApplication.ts generated Normal file
View File

@@ -0,0 +1,47 @@
// *** 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 function getApplication(args: GetApplicationArgs, opts?: pulumi.InvokeOptions): Promise<GetApplicationResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("dokploy:index/getApplication:getApplication", {
"id": args.id,
}, opts);
}
/**
* A collection of arguments for invoking getApplication.
*/
export interface GetApplicationArgs {
id: string;
}
/**
* A collection of values returned by getApplication.
*/
export interface GetApplicationResult {
readonly appName: string;
readonly applicationStatus: string;
readonly buildType: string;
readonly createdAt: string;
readonly description: string;
readonly environmentId: string;
readonly id: string;
readonly name: string;
readonly sourceType: string;
}
export function getApplicationOutput(args: GetApplicationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetApplicationResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("dokploy:index/getApplication:getApplication", {
"id": args.id,
}, opts);
}
/**
* A collection of arguments for invoking getApplication.
*/
export interface GetApplicationOutputArgs {
id: pulumi.Input<string>;
}

45
sdk/nodejs/getEnvironment.ts generated Normal file
View File

@@ -0,0 +1,45 @@
// *** 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 function getEnvironment(args: GetEnvironmentArgs, opts?: pulumi.InvokeOptions): Promise<GetEnvironmentResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("dokploy:index/getEnvironment:getEnvironment", {
"id": args.id,
}, opts);
}
/**
* A collection of arguments for invoking getEnvironment.
*/
export interface GetEnvironmentArgs {
id: string;
}
/**
* A collection of values returned by getEnvironment.
*/
export interface GetEnvironmentResult {
readonly createdAt: string;
readonly description: string;
readonly env: string;
readonly id: string;
readonly isDefault: boolean;
readonly name: string;
readonly projectId: string;
}
export function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetEnvironmentResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("dokploy:index/getEnvironment:getEnvironment", {
"id": args.id,
}, opts);
}
/**
* A collection of arguments for invoking getEnvironment.
*/
export interface GetEnvironmentOutputArgs {
id: pulumi.Input<string>;
}

48
sdk/nodejs/getProject.ts generated Normal file
View File

@@ -0,0 +1,48 @@
// *** 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 inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
export function getProject(args: GetProjectArgs, opts?: pulumi.InvokeOptions): Promise<GetProjectResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("dokploy:index/getProject:getProject", {
"id": args.id,
}, opts);
}
/**
* A collection of arguments for invoking getProject.
*/
export interface GetProjectArgs {
id: string;
}
/**
* A collection of values returned by getProject.
*/
export interface GetProjectResult {
readonly createdAt: string;
readonly defaultEnvironmentId: string;
readonly description: string;
readonly env: string;
readonly environments: outputs.GetProjectEnvironment[];
readonly id: string;
readonly name: string;
readonly organizationId: string;
}
export function getProjectOutput(args: GetProjectOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetProjectResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("dokploy:index/getProject:getProject", {
"id": args.id,
}, opts);
}
/**
* A collection of arguments for invoking getProject.
*/
export interface GetProjectOutputArgs {
id: pulumi.Input<string>;
}

25
sdk/nodejs/getProjects.ts generated Normal file
View File

@@ -0,0 +1,25 @@
// *** 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 inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
export function getProjects(opts?: pulumi.InvokeOptions): Promise<GetProjectsResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("dokploy:index/getProjects:getProjects", {
}, opts);
}
/**
* A collection of values returned by getProjects.
*/
export interface GetProjectsResult {
readonly projects: outputs.GetProjectsProject[];
}
export function getProjectsOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetProjectsResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("dokploy:index/getProjects:getProjects", {
}, opts);
}

25
sdk/nodejs/getServers.ts generated Normal file
View File

@@ -0,0 +1,25 @@
// *** 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 inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
export function getServers(opts?: pulumi.InvokeOptions): Promise<GetServersResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("dokploy:index/getServers:getServers", {
}, opts);
}
/**
* A collection of values returned by getServers.
*/
export interface GetServersResult {
readonly servers: outputs.GetServersServer[];
}
export function getServersOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetServersResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("dokploy:index/getServers:getServers", {
}, opts);
}

207
sdk/nodejs/index.ts generated Normal file
View File

@@ -0,0 +1,207 @@
// *** 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 members:
export { ApplicationArgs, ApplicationState } from "./application";
export type Application = import("./application").Application;
export const Application: typeof import("./application").Application = null as any;
utilities.lazyLoad(exports, ["Application"], () => require("./application"));
export { CertificateArgs, CertificateState } from "./certificate";
export type Certificate = import("./certificate").Certificate;
export const Certificate: typeof import("./certificate").Certificate = null as any;
utilities.lazyLoad(exports, ["Certificate"], () => require("./certificate"));
export { ComposeArgs, ComposeState } from "./compose";
export type Compose = import("./compose").Compose;
export const Compose: typeof import("./compose").Compose = null as any;
utilities.lazyLoad(exports, ["Compose"], () => require("./compose"));
export { DestinationArgs, DestinationState } from "./destination";
export type Destination = import("./destination").Destination;
export const Destination: typeof import("./destination").Destination = null as any;
utilities.lazyLoad(exports, ["Destination"], () => require("./destination"));
export { DomainArgs, DomainState } from "./domain";
export type Domain = import("./domain").Domain;
export const Domain: typeof import("./domain").Domain = null as any;
utilities.lazyLoad(exports, ["Domain"], () => require("./domain"));
export { EnvironmentArgs, EnvironmentState } from "./environment";
export type Environment = import("./environment").Environment;
export const Environment: typeof import("./environment").Environment = null as any;
utilities.lazyLoad(exports, ["Environment"], () => require("./environment"));
export { GetApplicationArgs, GetApplicationResult, GetApplicationOutputArgs } from "./getApplication";
export const getApplication: typeof import("./getApplication").getApplication = null as any;
export const getApplicationOutput: typeof import("./getApplication").getApplicationOutput = null as any;
utilities.lazyLoad(exports, ["getApplication","getApplicationOutput"], () => require("./getApplication"));
export { GetEnvironmentArgs, GetEnvironmentResult, GetEnvironmentOutputArgs } from "./getEnvironment";
export const getEnvironment: typeof import("./getEnvironment").getEnvironment = null as any;
export const getEnvironmentOutput: typeof import("./getEnvironment").getEnvironmentOutput = null as any;
utilities.lazyLoad(exports, ["getEnvironment","getEnvironmentOutput"], () => require("./getEnvironment"));
export { GetProjectArgs, GetProjectResult, GetProjectOutputArgs } from "./getProject";
export const getProject: typeof import("./getProject").getProject = null as any;
export const getProjectOutput: typeof import("./getProject").getProjectOutput = null as any;
utilities.lazyLoad(exports, ["getProject","getProjectOutput"], () => require("./getProject"));
export { GetProjectsResult } from "./getProjects";
export const getProjects: typeof import("./getProjects").getProjects = null as any;
export const getProjectsOutput: typeof import("./getProjects").getProjectsOutput = null as any;
utilities.lazyLoad(exports, ["getProjects","getProjectsOutput"], () => require("./getProjects"));
export { GetServersResult } from "./getServers";
export const getServers: typeof import("./getServers").getServers = null as any;
export const getServersOutput: typeof import("./getServers").getServersOutput = null as any;
utilities.lazyLoad(exports, ["getServers","getServersOutput"], () => require("./getServers"));
export { MariaDbArgs, MariaDbState } from "./mariaDb";
export type MariaDb = import("./mariaDb").MariaDb;
export const MariaDb: typeof import("./mariaDb").MariaDb = null as any;
utilities.lazyLoad(exports, ["MariaDb"], () => require("./mariaDb"));
export { MongoArgs, MongoState } from "./mongo";
export type Mongo = import("./mongo").Mongo;
export const Mongo: typeof import("./mongo").Mongo = null as any;
utilities.lazyLoad(exports, ["Mongo"], () => require("./mongo"));
export { MountArgs, MountState } from "./mount";
export type Mount = import("./mount").Mount;
export const Mount: typeof import("./mount").Mount = null as any;
utilities.lazyLoad(exports, ["Mount"], () => require("./mount"));
export { MySqlArgs, MySqlState } from "./mySql";
export type MySql = import("./mySql").MySql;
export const MySql: typeof import("./mySql").MySql = null as any;
utilities.lazyLoad(exports, ["MySql"], () => require("./mySql"));
export { PortArgs, PortState } from "./port";
export type Port = import("./port").Port;
export const Port: typeof import("./port").Port = null as any;
utilities.lazyLoad(exports, ["Port"], () => require("./port"));
export { PostgresArgs, PostgresState } from "./postgres";
export type Postgres = import("./postgres").Postgres;
export const Postgres: typeof import("./postgres").Postgres = null as any;
utilities.lazyLoad(exports, ["Postgres"], () => require("./postgres"));
export { ProjectArgs, ProjectState } from "./project";
export type Project = import("./project").Project;
export const Project: typeof import("./project").Project = null as any;
utilities.lazyLoad(exports, ["Project"], () => require("./project"));
export * from "./provider";
import { Provider } from "./provider";
export { RedirectArgs, RedirectState } from "./redirect";
export type Redirect = import("./redirect").Redirect;
export const Redirect: typeof import("./redirect").Redirect = null as any;
utilities.lazyLoad(exports, ["Redirect"], () => require("./redirect"));
export { RedisArgs, RedisState } from "./redis";
export type Redis = import("./redis").Redis;
export const Redis: typeof import("./redis").Redis = null as any;
utilities.lazyLoad(exports, ["Redis"], () => require("./redis"));
export { RegistryArgs, RegistryState } from "./registry";
export type Registry = import("./registry").Registry;
export const Registry: typeof import("./registry").Registry = null as any;
utilities.lazyLoad(exports, ["Registry"], () => require("./registry"));
export { SecurityArgs, SecurityState } from "./security";
export type Security = import("./security").Security;
export const Security: typeof import("./security").Security = null as any;
utilities.lazyLoad(exports, ["Security"], () => require("./security"));
export { SshKeyArgs, SshKeyState } from "./sshKey";
export type SshKey = import("./sshKey").SshKey;
export const SshKey: typeof import("./sshKey").SshKey = null as any;
utilities.lazyLoad(exports, ["SshKey"], () => require("./sshKey"));
// Export sub-modules:
import * as config from "./config";
import * as types from "./types";
export {
config,
types,
};
const _module = {
version: utilities.getVersion(),
construct: (name: string, type: string, urn: string): pulumi.Resource => {
switch (type) {
case "dokploy:index/application:Application":
return new Application(name, <any>undefined, { urn })
case "dokploy:index/certificate:Certificate":
return new Certificate(name, <any>undefined, { urn })
case "dokploy:index/compose:Compose":
return new Compose(name, <any>undefined, { urn })
case "dokploy:index/destination:Destination":
return new Destination(name, <any>undefined, { urn })
case "dokploy:index/domain:Domain":
return new Domain(name, <any>undefined, { urn })
case "dokploy:index/environment:Environment":
return new Environment(name, <any>undefined, { urn })
case "dokploy:index/mariaDb:MariaDb":
return new MariaDb(name, <any>undefined, { urn })
case "dokploy:index/mongo:Mongo":
return new Mongo(name, <any>undefined, { urn })
case "dokploy:index/mount:Mount":
return new Mount(name, <any>undefined, { urn })
case "dokploy:index/mySql:MySql":
return new MySql(name, <any>undefined, { urn })
case "dokploy:index/port:Port":
return new Port(name, <any>undefined, { urn })
case "dokploy:index/postgres:Postgres":
return new Postgres(name, <any>undefined, { urn })
case "dokploy:index/project:Project":
return new Project(name, <any>undefined, { urn })
case "dokploy:index/redirect:Redirect":
return new Redirect(name, <any>undefined, { urn })
case "dokploy:index/redis:Redis":
return new Redis(name, <any>undefined, { urn })
case "dokploy:index/registry:Registry":
return new Registry(name, <any>undefined, { urn })
case "dokploy:index/security:Security":
return new Security(name, <any>undefined, { urn })
case "dokploy:index/sshKey:SshKey":
return new SshKey(name, <any>undefined, { urn })
default:
throw new Error(`unknown resource type ${type}`);
}
},
};
pulumi.runtime.registerResourceModule("dokploy", "index/application", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/certificate", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/compose", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/destination", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/domain", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/environment", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/mariaDb", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/mongo", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/mount", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/mySql", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/port", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/postgres", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/project", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/redirect", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/redis", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/registry", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/security", _module)
pulumi.runtime.registerResourceModule("dokploy", "index/sshKey", _module)
pulumi.runtime.registerResourcePackage("dokploy", {
version: utilities.getVersion(),
constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => {
if (type !== "pulumi:providers:dokploy") {
throw new Error(`unknown provider type ${type}`);
}
return new Provider(name, <any>undefined, { urn });
},
});

555
sdk/nodejs/mariaDb.ts generated Normal file
View File

@@ -0,0 +1,555 @@
// *** 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 MariaDb extends pulumi.CustomResource {
/**
* Get an existing MariaDb 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?: MariaDbState, opts?: pulumi.CustomResourceOptions): MariaDb {
return new MariaDb(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/mariaDb:MariaDb';
/**
* Returns true if the given object is an instance of MariaDb. 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 MariaDb {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === MariaDb.__pulumiType;
}
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
declare public /*out*/ readonly applicationStatus: pulumi.Output<string>;
/**
* Arguments appended to the container command.
*/
declare public readonly args: pulumi.Output<string[]>;
/**
* Override the container entrypoint command.
*/
declare public readonly command: pulumi.Output<string | undefined>;
/**
* Hard CPU limit, for example `1`.
*/
declare public readonly cpuLimit: pulumi.Output<string | undefined>;
/**
* Soft CPU reservation, for example `0.5`.
*/
declare public readonly cpuReservation: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the database was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Name of the database to create.
*/
declare public readonly databaseName: pulumi.Output<string>;
/**
* Password for the database user.
*/
declare public readonly databasePassword: pulumi.Output<string>;
/**
* Password for the MariaDB `root` user.
*/
declare public readonly databaseRootPassword: pulumi.Output<string>;
/**
* Database user to create.
*/
declare public readonly databaseUser: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Detach the service from the shared `dokploy-network`.
*/
declare public readonly detachDokployNetwork: pulumi.Output<boolean>;
/**
* MariaDB image to run, for example `mariadb:11`.
*/
declare public readonly dockerImage: pulumi.Output<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
declare public readonly endpointSpecSwarm: pulumi.Output<string | undefined>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
declare public readonly env: pulumi.Output<string | undefined>;
/**
* Environment this database belongs to.
*/
declare public readonly environmentId: pulumi.Output<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
declare public readonly externalPort: pulumi.Output<number | undefined>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
declare public readonly healthCheckSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm service labels, as a JSON object.
*/
declare public readonly labelsSwarm: pulumi.Output<string | undefined>;
/**
* Hard memory limit, for example `512m`.
*/
declare public readonly memoryLimit: pulumi.Output<string | undefined>;
/**
* Soft memory reservation, for example `256m`.
*/
declare public readonly memoryReservation: pulumi.Output<string | undefined>;
/**
* Docker Swarm service mode, as a JSON object.
*/
declare public readonly modeSwarm: pulumi.Output<string | undefined>;
/**
* Display name of the database.
*/
declare public readonly name: pulumi.Output<string>;
/**
* IDs of additional Docker networks to attach.
*/
declare public readonly networkIds: pulumi.Output<string[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
declare public readonly networkSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
declare public readonly placementSwarm: pulumi.Output<string | undefined>;
/**
* Number of replicas to run.
*/
declare public readonly replicas: pulumi.Output<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
declare public readonly restartPolicySwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
declare public readonly rollbackConfigSwarm: pulumi.Output<string | undefined>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Grace period in nanoseconds before a container is killed.
*/
declare public readonly stopGracePeriodSwarm: pulumi.Output<number | undefined>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
declare public readonly ulimitsSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
declare public readonly updateConfigSwarm: pulumi.Output<string | undefined>;
/**
* Create a MariaDb 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: MariaDbArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: MariaDbArgs | MariaDbState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as MariaDbState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["applicationStatus"] = state?.applicationStatus;
resourceInputs["args"] = state?.args;
resourceInputs["command"] = state?.command;
resourceInputs["cpuLimit"] = state?.cpuLimit;
resourceInputs["cpuReservation"] = state?.cpuReservation;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["databaseName"] = state?.databaseName;
resourceInputs["databasePassword"] = state?.databasePassword;
resourceInputs["databaseRootPassword"] = state?.databaseRootPassword;
resourceInputs["databaseUser"] = state?.databaseUser;
resourceInputs["description"] = state?.description;
resourceInputs["detachDokployNetwork"] = state?.detachDokployNetwork;
resourceInputs["dockerImage"] = state?.dockerImage;
resourceInputs["endpointSpecSwarm"] = state?.endpointSpecSwarm;
resourceInputs["env"] = state?.env;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["externalPort"] = state?.externalPort;
resourceInputs["healthCheckSwarm"] = state?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = state?.labelsSwarm;
resourceInputs["memoryLimit"] = state?.memoryLimit;
resourceInputs["memoryReservation"] = state?.memoryReservation;
resourceInputs["modeSwarm"] = state?.modeSwarm;
resourceInputs["name"] = state?.name;
resourceInputs["networkIds"] = state?.networkIds;
resourceInputs["networkSwarm"] = state?.networkSwarm;
resourceInputs["placementSwarm"] = state?.placementSwarm;
resourceInputs["replicas"] = state?.replicas;
resourceInputs["restartPolicySwarm"] = state?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = state?.rollbackConfigSwarm;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["stopGracePeriodSwarm"] = state?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = state?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = state?.updateConfigSwarm;
} else {
const args = argsOrState as MariaDbArgs | undefined;
if (args?.databaseName === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseName'");
}
if (args?.databasePassword === undefined && !opts.urn) {
throw new Error("Missing required property 'databasePassword'");
}
if (args?.databaseRootPassword === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseRootPassword'");
}
if (args?.databaseUser === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseUser'");
}
if (args?.dockerImage === undefined && !opts.urn) {
throw new Error("Missing required property 'dockerImage'");
}
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["args"] = args?.args;
resourceInputs["command"] = args?.command;
resourceInputs["cpuLimit"] = args?.cpuLimit;
resourceInputs["cpuReservation"] = args?.cpuReservation;
resourceInputs["databaseName"] = args?.databaseName;
resourceInputs["databasePassword"] = args?.databasePassword ? pulumi.secret(args.databasePassword) : undefined;
resourceInputs["databaseRootPassword"] = args?.databaseRootPassword ? pulumi.secret(args.databaseRootPassword) : undefined;
resourceInputs["databaseUser"] = args?.databaseUser;
resourceInputs["description"] = args?.description;
resourceInputs["detachDokployNetwork"] = args?.detachDokployNetwork;
resourceInputs["dockerImage"] = args?.dockerImage;
resourceInputs["endpointSpecSwarm"] = args?.endpointSpecSwarm;
resourceInputs["env"] = args?.env;
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["externalPort"] = args?.externalPort;
resourceInputs["healthCheckSwarm"] = args?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = args?.labelsSwarm;
resourceInputs["memoryLimit"] = args?.memoryLimit;
resourceInputs["memoryReservation"] = args?.memoryReservation;
resourceInputs["modeSwarm"] = args?.modeSwarm;
resourceInputs["name"] = args?.name;
resourceInputs["networkIds"] = args?.networkIds;
resourceInputs["networkSwarm"] = args?.networkSwarm;
resourceInputs["placementSwarm"] = args?.placementSwarm;
resourceInputs["replicas"] = args?.replicas;
resourceInputs["restartPolicySwarm"] = args?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = args?.rollbackConfigSwarm;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["stopGracePeriodSwarm"] = args?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = args?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = args?.updateConfigSwarm;
resourceInputs["applicationStatus"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["databasePassword", "databaseRootPassword"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(MariaDb.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering MariaDb resources.
*/
export interface MariaDbState {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
applicationStatus?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the database was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Name of the database to create.
*/
databaseName?: pulumi.Input<string>;
/**
* Password for the database user.
*/
databasePassword?: pulumi.Input<string>;
/**
* Password for the MariaDB `root` user.
*/
databaseRootPassword?: pulumi.Input<string>;
/**
* Database user to create.
*/
databaseUser?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* MariaDB image to run, for example `mariadb:11`.
*/
dockerImage?: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId?: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MariaDb resource.
*/
export interface MariaDbArgs {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* Name of the database to create.
*/
databaseName: pulumi.Input<string>;
/**
* Password for the database user.
*/
databasePassword: pulumi.Input<string>;
/**
* Password for the MariaDB `root` user.
*/
databaseRootPassword: pulumi.Input<string>;
/**
* Database user to create.
*/
databaseUser: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* MariaDB image to run, for example `mariadb:11`.
*/
dockerImage: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}

532
sdk/nodejs/mongo.ts generated Normal file
View File

@@ -0,0 +1,532 @@
// *** 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 Mongo extends pulumi.CustomResource {
/**
* Get an existing Mongo 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?: MongoState, opts?: pulumi.CustomResourceOptions): Mongo {
return new Mongo(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/mongo:Mongo';
/**
* Returns true if the given object is an instance of Mongo. 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 Mongo {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Mongo.__pulumiType;
}
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
declare public /*out*/ readonly applicationStatus: pulumi.Output<string>;
/**
* Arguments appended to the container command.
*/
declare public readonly args: pulumi.Output<string[]>;
/**
* Override the container entrypoint command.
*/
declare public readonly command: pulumi.Output<string | undefined>;
/**
* Hard CPU limit, for example `1`.
*/
declare public readonly cpuLimit: pulumi.Output<string | undefined>;
/**
* Soft CPU reservation, for example `0.5`.
*/
declare public readonly cpuReservation: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the database was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Password for the root user.
*/
declare public readonly databasePassword: pulumi.Output<string>;
/**
* Root username to create.
*/
declare public readonly databaseUser: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Detach the service from the shared `dokploy-network`.
*/
declare public readonly detachDokployNetwork: pulumi.Output<boolean>;
/**
* MongoDB image to run. Defaults to `mongo:8`.
*/
declare public readonly dockerImage: pulumi.Output<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
declare public readonly endpointSpecSwarm: pulumi.Output<string | undefined>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
declare public readonly env: pulumi.Output<string | undefined>;
/**
* Environment this database belongs to.
*/
declare public readonly environmentId: pulumi.Output<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
declare public readonly externalPort: pulumi.Output<number | undefined>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
declare public readonly healthCheckSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm service labels, as a JSON object.
*/
declare public readonly labelsSwarm: pulumi.Output<string | undefined>;
/**
* Hard memory limit, for example `512m`.
*/
declare public readonly memoryLimit: pulumi.Output<string | undefined>;
/**
* Soft memory reservation, for example `256m`.
*/
declare public readonly memoryReservation: pulumi.Output<string | undefined>;
/**
* Docker Swarm service mode, as a JSON object.
*/
declare public readonly modeSwarm: pulumi.Output<string | undefined>;
/**
* Display name of the database.
*/
declare public readonly name: pulumi.Output<string>;
/**
* IDs of additional Docker networks to attach.
*/
declare public readonly networkIds: pulumi.Output<string[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
declare public readonly networkSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
declare public readonly placementSwarm: pulumi.Output<string | undefined>;
/**
* Start the instance as a single-node replica set.
*/
declare public readonly replicaSets: pulumi.Output<boolean>;
/**
* Number of replicas to run.
*/
declare public readonly replicas: pulumi.Output<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
declare public readonly restartPolicySwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
declare public readonly rollbackConfigSwarm: pulumi.Output<string | undefined>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Grace period in nanoseconds before a container is killed.
*/
declare public readonly stopGracePeriodSwarm: pulumi.Output<number | undefined>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
declare public readonly ulimitsSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
declare public readonly updateConfigSwarm: pulumi.Output<string | undefined>;
/**
* Create a Mongo 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: MongoArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: MongoArgs | MongoState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as MongoState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["applicationStatus"] = state?.applicationStatus;
resourceInputs["args"] = state?.args;
resourceInputs["command"] = state?.command;
resourceInputs["cpuLimit"] = state?.cpuLimit;
resourceInputs["cpuReservation"] = state?.cpuReservation;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["databasePassword"] = state?.databasePassword;
resourceInputs["databaseUser"] = state?.databaseUser;
resourceInputs["description"] = state?.description;
resourceInputs["detachDokployNetwork"] = state?.detachDokployNetwork;
resourceInputs["dockerImage"] = state?.dockerImage;
resourceInputs["endpointSpecSwarm"] = state?.endpointSpecSwarm;
resourceInputs["env"] = state?.env;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["externalPort"] = state?.externalPort;
resourceInputs["healthCheckSwarm"] = state?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = state?.labelsSwarm;
resourceInputs["memoryLimit"] = state?.memoryLimit;
resourceInputs["memoryReservation"] = state?.memoryReservation;
resourceInputs["modeSwarm"] = state?.modeSwarm;
resourceInputs["name"] = state?.name;
resourceInputs["networkIds"] = state?.networkIds;
resourceInputs["networkSwarm"] = state?.networkSwarm;
resourceInputs["placementSwarm"] = state?.placementSwarm;
resourceInputs["replicaSets"] = state?.replicaSets;
resourceInputs["replicas"] = state?.replicas;
resourceInputs["restartPolicySwarm"] = state?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = state?.rollbackConfigSwarm;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["stopGracePeriodSwarm"] = state?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = state?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = state?.updateConfigSwarm;
} else {
const args = argsOrState as MongoArgs | undefined;
if (args?.databasePassword === undefined && !opts.urn) {
throw new Error("Missing required property 'databasePassword'");
}
if (args?.databaseUser === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseUser'");
}
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["args"] = args?.args;
resourceInputs["command"] = args?.command;
resourceInputs["cpuLimit"] = args?.cpuLimit;
resourceInputs["cpuReservation"] = args?.cpuReservation;
resourceInputs["databasePassword"] = args?.databasePassword ? pulumi.secret(args.databasePassword) : undefined;
resourceInputs["databaseUser"] = args?.databaseUser;
resourceInputs["description"] = args?.description;
resourceInputs["detachDokployNetwork"] = args?.detachDokployNetwork;
resourceInputs["dockerImage"] = args?.dockerImage;
resourceInputs["endpointSpecSwarm"] = args?.endpointSpecSwarm;
resourceInputs["env"] = args?.env;
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["externalPort"] = args?.externalPort;
resourceInputs["healthCheckSwarm"] = args?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = args?.labelsSwarm;
resourceInputs["memoryLimit"] = args?.memoryLimit;
resourceInputs["memoryReservation"] = args?.memoryReservation;
resourceInputs["modeSwarm"] = args?.modeSwarm;
resourceInputs["name"] = args?.name;
resourceInputs["networkIds"] = args?.networkIds;
resourceInputs["networkSwarm"] = args?.networkSwarm;
resourceInputs["placementSwarm"] = args?.placementSwarm;
resourceInputs["replicaSets"] = args?.replicaSets;
resourceInputs["replicas"] = args?.replicas;
resourceInputs["restartPolicySwarm"] = args?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = args?.rollbackConfigSwarm;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["stopGracePeriodSwarm"] = args?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = args?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = args?.updateConfigSwarm;
resourceInputs["applicationStatus"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["databasePassword"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Mongo.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Mongo resources.
*/
export interface MongoState {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
applicationStatus?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the database was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Password for the root user.
*/
databasePassword?: pulumi.Input<string>;
/**
* Root username to create.
*/
databaseUser?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* MongoDB image to run. Defaults to `mongo:8`.
*/
dockerImage?: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId?: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Start the instance as a single-node replica set.
*/
replicaSets?: pulumi.Input<boolean>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Mongo resource.
*/
export interface MongoArgs {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* Password for the root user.
*/
databasePassword: pulumi.Input<string>;
/**
* Root username to create.
*/
databaseUser: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* MongoDB image to run. Defaults to `mongo:8`.
*/
dockerImage?: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Start the instance as a single-node replica set.
*/
replicaSets?: pulumi.Input<boolean>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}

191
sdk/nodejs/mount.ts generated Normal file
View File

@@ -0,0 +1,191 @@
// *** 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 Mount extends pulumi.CustomResource {
/**
* Get an existing Mount 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?: MountState, opts?: pulumi.CustomResourceOptions): Mount {
return new Mount(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/mount:Mount';
/**
* Returns true if the given object is an instance of Mount. 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 Mount {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Mount.__pulumiType;
}
/**
* Contents of the generated file, when `type` is `file`.
*/
declare public readonly content: pulumi.Output<string | undefined>;
/**
* Path of the generated file, when `type` is `file`.
*/
declare public readonly filePath: pulumi.Output<string | undefined>;
/**
* Path on the host, when `type` is `bind`.
*/
declare public readonly hostPath: pulumi.Output<string | undefined>;
/**
* Path inside the container where the mount appears.
*/
declare public readonly mountPath: pulumi.Output<string>;
/**
* ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
*/
declare public readonly serviceId: pulumi.Output<string>;
/**
* The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
*/
declare public readonly serviceType: pulumi.Output<string>;
/**
* The kind of mount to create. Valid values: `bind`, `volume`, `file`.
*/
declare public readonly type: pulumi.Output<string>;
/**
* Name of the Docker volume, when `type` is `volume`.
*/
declare public readonly volumeName: pulumi.Output<string | undefined>;
/**
* Create a Mount 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: MountArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: MountArgs | MountState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as MountState | undefined;
resourceInputs["content"] = state?.content;
resourceInputs["filePath"] = state?.filePath;
resourceInputs["hostPath"] = state?.hostPath;
resourceInputs["mountPath"] = state?.mountPath;
resourceInputs["serviceId"] = state?.serviceId;
resourceInputs["serviceType"] = state?.serviceType;
resourceInputs["type"] = state?.type;
resourceInputs["volumeName"] = state?.volumeName;
} else {
const args = argsOrState as MountArgs | undefined;
if (args?.mountPath === undefined && !opts.urn) {
throw new Error("Missing required property 'mountPath'");
}
if (args?.serviceId === undefined && !opts.urn) {
throw new Error("Missing required property 'serviceId'");
}
if (args?.serviceType === undefined && !opts.urn) {
throw new Error("Missing required property 'serviceType'");
}
if (args?.type === undefined && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["content"] = args?.content;
resourceInputs["filePath"] = args?.filePath;
resourceInputs["hostPath"] = args?.hostPath;
resourceInputs["mountPath"] = args?.mountPath;
resourceInputs["serviceId"] = args?.serviceId;
resourceInputs["serviceType"] = args?.serviceType;
resourceInputs["type"] = args?.type;
resourceInputs["volumeName"] = args?.volumeName;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Mount.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Mount resources.
*/
export interface MountState {
/**
* Contents of the generated file, when `type` is `file`.
*/
content?: pulumi.Input<string>;
/**
* Path of the generated file, when `type` is `file`.
*/
filePath?: pulumi.Input<string>;
/**
* Path on the host, when `type` is `bind`.
*/
hostPath?: pulumi.Input<string>;
/**
* Path inside the container where the mount appears.
*/
mountPath?: pulumi.Input<string>;
/**
* ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
*/
serviceId?: pulumi.Input<string>;
/**
* The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
*/
serviceType?: pulumi.Input<string>;
/**
* The kind of mount to create. Valid values: `bind`, `volume`, `file`.
*/
type?: pulumi.Input<string>;
/**
* Name of the Docker volume, when `type` is `volume`.
*/
volumeName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Mount resource.
*/
export interface MountArgs {
/**
* Contents of the generated file, when `type` is `file`.
*/
content?: pulumi.Input<string>;
/**
* Path of the generated file, when `type` is `file`.
*/
filePath?: pulumi.Input<string>;
/**
* Path on the host, when `type` is `bind`.
*/
hostPath?: pulumi.Input<string>;
/**
* Path inside the container where the mount appears.
*/
mountPath: pulumi.Input<string>;
/**
* ID of the service this mount attaches to. Must match `serviceType` — an application ID, a compose ID, a postgres ID, and so on.
*/
serviceId: pulumi.Input<string>;
/**
* The kind of service this mount attaches to. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`.
*/
serviceType: pulumi.Input<string>;
/**
* The kind of mount to create. Valid values: `bind`, `volume`, `file`.
*/
type: pulumi.Input<string>;
/**
* Name of the Docker volume, when `type` is `volume`.
*/
volumeName?: pulumi.Input<string>;
}

555
sdk/nodejs/mySql.ts generated Normal file
View File

@@ -0,0 +1,555 @@
// *** 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 MySql extends pulumi.CustomResource {
/**
* Get an existing MySql 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?: MySqlState, opts?: pulumi.CustomResourceOptions): MySql {
return new MySql(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/mySql:MySql';
/**
* Returns true if the given object is an instance of MySql. 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 MySql {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === MySql.__pulumiType;
}
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
declare public /*out*/ readonly applicationStatus: pulumi.Output<string>;
/**
* Arguments appended to the container command.
*/
declare public readonly args: pulumi.Output<string[]>;
/**
* Override the container entrypoint command.
*/
declare public readonly command: pulumi.Output<string | undefined>;
/**
* Hard CPU limit, for example `1`.
*/
declare public readonly cpuLimit: pulumi.Output<string | undefined>;
/**
* Soft CPU reservation, for example `0.5`.
*/
declare public readonly cpuReservation: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the database was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Name of the database to create.
*/
declare public readonly databaseName: pulumi.Output<string>;
/**
* Password for the database user.
*/
declare public readonly databasePassword: pulumi.Output<string>;
/**
* Password for the MySQL `root` user.
*/
declare public readonly databaseRootPassword: pulumi.Output<string>;
/**
* Database user to create.
*/
declare public readonly databaseUser: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Detach the service from the shared `dokploy-network`.
*/
declare public readonly detachDokployNetwork: pulumi.Output<boolean>;
/**
* MySQL image to run, for example `mysql:8`.
*/
declare public readonly dockerImage: pulumi.Output<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
declare public readonly endpointSpecSwarm: pulumi.Output<string | undefined>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
declare public readonly env: pulumi.Output<string | undefined>;
/**
* Environment this database belongs to.
*/
declare public readonly environmentId: pulumi.Output<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
declare public readonly externalPort: pulumi.Output<number | undefined>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
declare public readonly healthCheckSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm service labels, as a JSON object.
*/
declare public readonly labelsSwarm: pulumi.Output<string | undefined>;
/**
* Hard memory limit, for example `512m`.
*/
declare public readonly memoryLimit: pulumi.Output<string | undefined>;
/**
* Soft memory reservation, for example `256m`.
*/
declare public readonly memoryReservation: pulumi.Output<string | undefined>;
/**
* Docker Swarm service mode, as a JSON object.
*/
declare public readonly modeSwarm: pulumi.Output<string | undefined>;
/**
* Display name of the database.
*/
declare public readonly name: pulumi.Output<string>;
/**
* IDs of additional Docker networks to attach.
*/
declare public readonly networkIds: pulumi.Output<string[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
declare public readonly networkSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
declare public readonly placementSwarm: pulumi.Output<string | undefined>;
/**
* Number of replicas to run.
*/
declare public readonly replicas: pulumi.Output<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
declare public readonly restartPolicySwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
declare public readonly rollbackConfigSwarm: pulumi.Output<string | undefined>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Grace period in nanoseconds before a container is killed.
*/
declare public readonly stopGracePeriodSwarm: pulumi.Output<number | undefined>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
declare public readonly ulimitsSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
declare public readonly updateConfigSwarm: pulumi.Output<string | undefined>;
/**
* Create a MySql 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: MySqlArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: MySqlArgs | MySqlState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as MySqlState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["applicationStatus"] = state?.applicationStatus;
resourceInputs["args"] = state?.args;
resourceInputs["command"] = state?.command;
resourceInputs["cpuLimit"] = state?.cpuLimit;
resourceInputs["cpuReservation"] = state?.cpuReservation;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["databaseName"] = state?.databaseName;
resourceInputs["databasePassword"] = state?.databasePassword;
resourceInputs["databaseRootPassword"] = state?.databaseRootPassword;
resourceInputs["databaseUser"] = state?.databaseUser;
resourceInputs["description"] = state?.description;
resourceInputs["detachDokployNetwork"] = state?.detachDokployNetwork;
resourceInputs["dockerImage"] = state?.dockerImage;
resourceInputs["endpointSpecSwarm"] = state?.endpointSpecSwarm;
resourceInputs["env"] = state?.env;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["externalPort"] = state?.externalPort;
resourceInputs["healthCheckSwarm"] = state?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = state?.labelsSwarm;
resourceInputs["memoryLimit"] = state?.memoryLimit;
resourceInputs["memoryReservation"] = state?.memoryReservation;
resourceInputs["modeSwarm"] = state?.modeSwarm;
resourceInputs["name"] = state?.name;
resourceInputs["networkIds"] = state?.networkIds;
resourceInputs["networkSwarm"] = state?.networkSwarm;
resourceInputs["placementSwarm"] = state?.placementSwarm;
resourceInputs["replicas"] = state?.replicas;
resourceInputs["restartPolicySwarm"] = state?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = state?.rollbackConfigSwarm;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["stopGracePeriodSwarm"] = state?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = state?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = state?.updateConfigSwarm;
} else {
const args = argsOrState as MySqlArgs | undefined;
if (args?.databaseName === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseName'");
}
if (args?.databasePassword === undefined && !opts.urn) {
throw new Error("Missing required property 'databasePassword'");
}
if (args?.databaseRootPassword === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseRootPassword'");
}
if (args?.databaseUser === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseUser'");
}
if (args?.dockerImage === undefined && !opts.urn) {
throw new Error("Missing required property 'dockerImage'");
}
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["args"] = args?.args;
resourceInputs["command"] = args?.command;
resourceInputs["cpuLimit"] = args?.cpuLimit;
resourceInputs["cpuReservation"] = args?.cpuReservation;
resourceInputs["databaseName"] = args?.databaseName;
resourceInputs["databasePassword"] = args?.databasePassword ? pulumi.secret(args.databasePassword) : undefined;
resourceInputs["databaseRootPassword"] = args?.databaseRootPassword ? pulumi.secret(args.databaseRootPassword) : undefined;
resourceInputs["databaseUser"] = args?.databaseUser;
resourceInputs["description"] = args?.description;
resourceInputs["detachDokployNetwork"] = args?.detachDokployNetwork;
resourceInputs["dockerImage"] = args?.dockerImage;
resourceInputs["endpointSpecSwarm"] = args?.endpointSpecSwarm;
resourceInputs["env"] = args?.env;
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["externalPort"] = args?.externalPort;
resourceInputs["healthCheckSwarm"] = args?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = args?.labelsSwarm;
resourceInputs["memoryLimit"] = args?.memoryLimit;
resourceInputs["memoryReservation"] = args?.memoryReservation;
resourceInputs["modeSwarm"] = args?.modeSwarm;
resourceInputs["name"] = args?.name;
resourceInputs["networkIds"] = args?.networkIds;
resourceInputs["networkSwarm"] = args?.networkSwarm;
resourceInputs["placementSwarm"] = args?.placementSwarm;
resourceInputs["replicas"] = args?.replicas;
resourceInputs["restartPolicySwarm"] = args?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = args?.rollbackConfigSwarm;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["stopGracePeriodSwarm"] = args?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = args?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = args?.updateConfigSwarm;
resourceInputs["applicationStatus"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["databasePassword", "databaseRootPassword"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(MySql.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering MySql resources.
*/
export interface MySqlState {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
applicationStatus?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the database was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Name of the database to create.
*/
databaseName?: pulumi.Input<string>;
/**
* Password for the database user.
*/
databasePassword?: pulumi.Input<string>;
/**
* Password for the MySQL `root` user.
*/
databaseRootPassword?: pulumi.Input<string>;
/**
* Database user to create.
*/
databaseUser?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* MySQL image to run, for example `mysql:8`.
*/
dockerImage?: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId?: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MySql resource.
*/
export interface MySqlArgs {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* Name of the database to create.
*/
databaseName: pulumi.Input<string>;
/**
* Password for the database user.
*/
databasePassword: pulumi.Input<string>;
/**
* Password for the MySQL `root` user.
*/
databaseRootPassword: pulumi.Input<string>;
/**
* Database user to create.
*/
databaseUser: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* MySQL image to run, for example `mysql:8`.
*/
dockerImage: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}

2683
sdk/nodejs/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

33
sdk/nodejs/package.json generated Normal file
View File

@@ -0,0 +1,33 @@
{
"name": "@maxvojtkov/pulumi-dokploy",
"version": "0.1.0",
"description": "A Pulumi package for creating and managing Dokploy resources. Based on terraform-provider-dokploy: version v0.1.0",
"keywords": [
"pulumi",
"dokploy",
"paas",
"docker",
"deployment",
"category/cloud",
"category/infrastructure"
],
"homepage": "https://github.com/maxvojtkov/pulumi-dokploy",
"repository": "https://github.com/maxvojtkov/pulumi-dokploy",
"license": "MPL-2.0",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
},
"devDependencies": {
"@types/node": "^18",
"typescript": "^4.6.0"
},
"pulumi": {
"resource": true,
"name": "dokploy",
"version": "0.1.0",
"server": "github://api.github.com/maxvojtkov/pulumi-dokploy"
}
}

149
sdk/nodejs/port.ts generated Normal file
View File

@@ -0,0 +1,149 @@
// *** 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 Port extends pulumi.CustomResource {
/**
* Get an existing Port 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?: PortState, opts?: pulumi.CustomResourceOptions): Port {
return new Port(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/port:Port';
/**
* Returns true if the given object is an instance of Port. 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 Port {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Port.__pulumiType;
}
/**
* Application this port belongs to.
*/
declare public readonly applicationId: pulumi.Output<string>;
/**
* Transport protocol. Valid values: `tcp`, `udp`.
*/
declare public readonly protocol: pulumi.Output<string>;
/**
* Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
*/
declare public readonly publishMode: pulumi.Output<string>;
/**
* Port exposed on the host.
*/
declare public readonly publishedPort: pulumi.Output<number>;
/**
* Port the container listens on.
*/
declare public readonly targetPort: pulumi.Output<number>;
/**
* Create a Port 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: PortArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: PortArgs | PortState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as PortState | undefined;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["protocol"] = state?.protocol;
resourceInputs["publishMode"] = state?.publishMode;
resourceInputs["publishedPort"] = state?.publishedPort;
resourceInputs["targetPort"] = state?.targetPort;
} else {
const args = argsOrState as PortArgs | undefined;
if (args?.applicationId === undefined && !opts.urn) {
throw new Error("Missing required property 'applicationId'");
}
if (args?.protocol === undefined && !opts.urn) {
throw new Error("Missing required property 'protocol'");
}
if (args?.publishedPort === undefined && !opts.urn) {
throw new Error("Missing required property 'publishedPort'");
}
if (args?.targetPort === undefined && !opts.urn) {
throw new Error("Missing required property 'targetPort'");
}
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["protocol"] = args?.protocol;
resourceInputs["publishMode"] = args?.publishMode;
resourceInputs["publishedPort"] = args?.publishedPort;
resourceInputs["targetPort"] = args?.targetPort;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Port.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Port resources.
*/
export interface PortState {
/**
* Application this port belongs to.
*/
applicationId?: pulumi.Input<string>;
/**
* Transport protocol. Valid values: `tcp`, `udp`.
*/
protocol?: pulumi.Input<string>;
/**
* Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
*/
publishMode?: pulumi.Input<string>;
/**
* Port exposed on the host.
*/
publishedPort?: pulumi.Input<number>;
/**
* Port the container listens on.
*/
targetPort?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Port resource.
*/
export interface PortArgs {
/**
* Application this port belongs to.
*/
applicationId: pulumi.Input<string>;
/**
* Transport protocol. Valid values: `tcp`, `udp`.
*/
protocol: pulumi.Input<string>;
/**
* Docker Swarm publish mode. `host` binds directly to the node; `ingress` uses the swarm routing mesh. Valid values: `ingress`, `host`.
*/
publishMode?: pulumi.Input<string>;
/**
* Port exposed on the host.
*/
publishedPort: pulumi.Input<number>;
/**
* Port the container listens on.
*/
targetPort: pulumi.Input<number>;
}

538
sdk/nodejs/postgres.ts generated Normal file
View File

@@ -0,0 +1,538 @@
// *** 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 Postgres extends pulumi.CustomResource {
/**
* Get an existing Postgres 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?: PostgresState, opts?: pulumi.CustomResourceOptions): Postgres {
return new Postgres(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/postgres:Postgres';
/**
* Returns true if the given object is an instance of Postgres. 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 Postgres {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Postgres.__pulumiType;
}
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
declare public /*out*/ readonly applicationStatus: pulumi.Output<string>;
/**
* Arguments appended to the container command.
*/
declare public readonly args: pulumi.Output<string[]>;
/**
* Override the container entrypoint command.
*/
declare public readonly command: pulumi.Output<string | undefined>;
/**
* Hard CPU limit, for example `1`.
*/
declare public readonly cpuLimit: pulumi.Output<string | undefined>;
/**
* Soft CPU reservation, for example `0.5`.
*/
declare public readonly cpuReservation: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the database was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Name of the database to create.
*/
declare public readonly databaseName: pulumi.Output<string>;
/**
* Password for the database user.
*/
declare public readonly databasePassword: pulumi.Output<string>;
/**
* Database user to create.
*/
declare public readonly databaseUser: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Detach the service from the shared `dokploy-network`.
*/
declare public readonly detachDokployNetwork: pulumi.Output<boolean>;
/**
* PostgreSQL image to run, for example `postgres:16`.
*/
declare public readonly dockerImage: pulumi.Output<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
declare public readonly endpointSpecSwarm: pulumi.Output<string | undefined>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
declare public readonly env: pulumi.Output<string | undefined>;
/**
* Environment this database belongs to.
*/
declare public readonly environmentId: pulumi.Output<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
declare public readonly externalPort: pulumi.Output<number | undefined>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
declare public readonly healthCheckSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm service labels, as a JSON object.
*/
declare public readonly labelsSwarm: pulumi.Output<string | undefined>;
/**
* Hard memory limit, for example `512m`.
*/
declare public readonly memoryLimit: pulumi.Output<string | undefined>;
/**
* Soft memory reservation, for example `256m`.
*/
declare public readonly memoryReservation: pulumi.Output<string | undefined>;
/**
* Docker Swarm service mode, as a JSON object.
*/
declare public readonly modeSwarm: pulumi.Output<string | undefined>;
/**
* Display name of the database.
*/
declare public readonly name: pulumi.Output<string>;
/**
* IDs of additional Docker networks to attach.
*/
declare public readonly networkIds: pulumi.Output<string[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
declare public readonly networkSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
declare public readonly placementSwarm: pulumi.Output<string | undefined>;
/**
* Number of replicas to run.
*/
declare public readonly replicas: pulumi.Output<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
declare public readonly restartPolicySwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
declare public readonly rollbackConfigSwarm: pulumi.Output<string | undefined>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Grace period in nanoseconds before a container is killed.
*/
declare public readonly stopGracePeriodSwarm: pulumi.Output<number | undefined>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
declare public readonly ulimitsSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
declare public readonly updateConfigSwarm: pulumi.Output<string | undefined>;
/**
* Create a Postgres 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: PostgresArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: PostgresArgs | PostgresState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as PostgresState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["applicationStatus"] = state?.applicationStatus;
resourceInputs["args"] = state?.args;
resourceInputs["command"] = state?.command;
resourceInputs["cpuLimit"] = state?.cpuLimit;
resourceInputs["cpuReservation"] = state?.cpuReservation;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["databaseName"] = state?.databaseName;
resourceInputs["databasePassword"] = state?.databasePassword;
resourceInputs["databaseUser"] = state?.databaseUser;
resourceInputs["description"] = state?.description;
resourceInputs["detachDokployNetwork"] = state?.detachDokployNetwork;
resourceInputs["dockerImage"] = state?.dockerImage;
resourceInputs["endpointSpecSwarm"] = state?.endpointSpecSwarm;
resourceInputs["env"] = state?.env;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["externalPort"] = state?.externalPort;
resourceInputs["healthCheckSwarm"] = state?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = state?.labelsSwarm;
resourceInputs["memoryLimit"] = state?.memoryLimit;
resourceInputs["memoryReservation"] = state?.memoryReservation;
resourceInputs["modeSwarm"] = state?.modeSwarm;
resourceInputs["name"] = state?.name;
resourceInputs["networkIds"] = state?.networkIds;
resourceInputs["networkSwarm"] = state?.networkSwarm;
resourceInputs["placementSwarm"] = state?.placementSwarm;
resourceInputs["replicas"] = state?.replicas;
resourceInputs["restartPolicySwarm"] = state?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = state?.rollbackConfigSwarm;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["stopGracePeriodSwarm"] = state?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = state?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = state?.updateConfigSwarm;
} else {
const args = argsOrState as PostgresArgs | undefined;
if (args?.databaseName === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseName'");
}
if (args?.databasePassword === undefined && !opts.urn) {
throw new Error("Missing required property 'databasePassword'");
}
if (args?.databaseUser === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseUser'");
}
if (args?.dockerImage === undefined && !opts.urn) {
throw new Error("Missing required property 'dockerImage'");
}
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["args"] = args?.args;
resourceInputs["command"] = args?.command;
resourceInputs["cpuLimit"] = args?.cpuLimit;
resourceInputs["cpuReservation"] = args?.cpuReservation;
resourceInputs["databaseName"] = args?.databaseName;
resourceInputs["databasePassword"] = args?.databasePassword ? pulumi.secret(args.databasePassword) : undefined;
resourceInputs["databaseUser"] = args?.databaseUser;
resourceInputs["description"] = args?.description;
resourceInputs["detachDokployNetwork"] = args?.detachDokployNetwork;
resourceInputs["dockerImage"] = args?.dockerImage;
resourceInputs["endpointSpecSwarm"] = args?.endpointSpecSwarm;
resourceInputs["env"] = args?.env;
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["externalPort"] = args?.externalPort;
resourceInputs["healthCheckSwarm"] = args?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = args?.labelsSwarm;
resourceInputs["memoryLimit"] = args?.memoryLimit;
resourceInputs["memoryReservation"] = args?.memoryReservation;
resourceInputs["modeSwarm"] = args?.modeSwarm;
resourceInputs["name"] = args?.name;
resourceInputs["networkIds"] = args?.networkIds;
resourceInputs["networkSwarm"] = args?.networkSwarm;
resourceInputs["placementSwarm"] = args?.placementSwarm;
resourceInputs["replicas"] = args?.replicas;
resourceInputs["restartPolicySwarm"] = args?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = args?.rollbackConfigSwarm;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["stopGracePeriodSwarm"] = args?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = args?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = args?.updateConfigSwarm;
resourceInputs["applicationStatus"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["databasePassword"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Postgres.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Postgres resources.
*/
export interface PostgresState {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
applicationStatus?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the database was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Name of the database to create.
*/
databaseName?: pulumi.Input<string>;
/**
* Password for the database user.
*/
databasePassword?: pulumi.Input<string>;
/**
* Database user to create.
*/
databaseUser?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* PostgreSQL image to run, for example `postgres:16`.
*/
dockerImage?: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId?: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Postgres resource.
*/
export interface PostgresArgs {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* Name of the database to create.
*/
databaseName: pulumi.Input<string>;
/**
* Password for the database user.
*/
databasePassword: pulumi.Input<string>;
/**
* Database user to create.
*/
databaseUser: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* PostgreSQL image to run, for example `postgres:16`.
*/
dockerImage: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}

139
sdk/nodejs/project.ts generated Normal file
View File

@@ -0,0 +1,139 @@
// *** 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 Project extends pulumi.CustomResource {
/**
* Get an existing Project 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?: ProjectState, opts?: pulumi.CustomResourceOptions): Project {
return new Project(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/project:Project';
/**
* Returns true if the given object is an instance of Project. 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 Project {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Project.__pulumiType;
}
/**
* RFC 3339 timestamp of when the project was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* ID of the `production` environment that Dokploy creates automatically with the project.
*/
declare public /*out*/ readonly defaultEnvironmentId: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
*/
declare public readonly env: pulumi.Output<string>;
/**
* Display name of the project.
*/
declare public readonly name: pulumi.Output<string>;
/**
* Organization that owns the project.
*/
declare public /*out*/ readonly organizationId: pulumi.Output<string>;
/**
* Create a Project 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?: ProjectArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: ProjectArgs | ProjectState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as ProjectState | undefined;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["defaultEnvironmentId"] = state?.defaultEnvironmentId;
resourceInputs["description"] = state?.description;
resourceInputs["env"] = state?.env;
resourceInputs["name"] = state?.name;
resourceInputs["organizationId"] = state?.organizationId;
} else {
const args = argsOrState as ProjectArgs | undefined;
resourceInputs["description"] = args?.description;
resourceInputs["env"] = args?.env;
resourceInputs["name"] = args?.name;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["defaultEnvironmentId"] = undefined /*out*/;
resourceInputs["organizationId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Project.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Project resources.
*/
export interface ProjectState {
/**
* RFC 3339 timestamp of when the project was created.
*/
createdAt?: pulumi.Input<string>;
/**
* ID of the `production` environment that Dokploy creates automatically with the project.
*/
defaultEnvironmentId?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
*/
env?: pulumi.Input<string>;
/**
* Display name of the project.
*/
name?: pulumi.Input<string>;
/**
* Organization that owns the project.
*/
organizationId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Project resource.
*/
export interface ProjectArgs {
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Project-wide environment variables in `KEY=value` format, one per line. These are shared with every service in the project.
*/
env?: pulumi.Input<string>;
/**
* Display name of the project.
*/
name?: pulumi.Input<string>;
}

99
sdk/nodejs/provider.ts generated Normal file
View File

@@ -0,0 +1,99 @@
// *** 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";
/**
* The provider type for the dokploy package. By default, resources use package-wide configuration
* settings, however an explicit `Provider` instance may be created and passed during resource
* construction to achieve fine-grained programmatic control over provider settings. See the
* [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
*/
export class Provider extends pulumi.ProviderResource {
/** @internal */
public static readonly __pulumiType = 'dokploy';
/**
* Returns true if the given object is an instance of Provider. 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 Provider {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
}
/**
* API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
*/
declare public readonly apiKey: pulumi.Output<string | undefined>;
/**
* Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
*/
declare public readonly host: pulumi.Output<string | undefined>;
/**
* Create a Provider 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?: ProviderArgs, opts?: pulumi.ResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
{
resourceInputs["apiKey"] = (args?.apiKey ? pulumi.secret(args.apiKey) : undefined) ?? utilities.getEnv("DOKPLOY_API_KEY");
resourceInputs["host"] = (args?.host) ?? utilities.getEnv("DOKPLOY_HOST");
resourceInputs["insecureSkipVerify"] = pulumi.output(args?.insecureSkipVerify).apply(JSON.stringify);
resourceInputs["timeoutSeconds"] = pulumi.output((args?.timeoutSeconds) ?? utilities.getEnvNumber("DOKPLOY_TIMEOUT_SECONDS")).apply(JSON.stringify);
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["apiKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Provider.__pulumiType, name, resourceInputs, opts);
}
/**
* This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
*/
terraformConfig(): pulumi.Output<Provider.TerraformConfigResult> {
return pulumi.runtime.call("pulumi:providers:dokploy/terraformConfig", {
"__self__": this,
}, this);
}
}
/**
* The set of arguments for constructing a Provider resource.
*/
export interface ProviderArgs {
/**
* API token generated in Dokploy under *Settings > Profile > API/CLI*. May also be set with the `DOKPLOY_API_KEY` environment variable.
*/
apiKey?: pulumi.Input<string>;
/**
* Base URL of the Dokploy instance, for example `https://dokploy.example.com`. A trailing `/api` is optional. May also be set with the `DOKPLOY_HOST` environment variable.
*/
host?: pulumi.Input<string>;
/**
* Skip TLS certificate verification. Only use this for instances behind a self-signed certificate. Defaults to `false`.
*/
insecureSkipVerify?: pulumi.Input<boolean>;
/**
* Per-request timeout in seconds. Defaults to `60`. May also be set with the `DOKPLOY_TIMEOUT_SECONDS` environment variable.
*/
timeoutSeconds?: pulumi.Input<number>;
}
export namespace Provider {
/**
* The results of the Provider.terraformConfig method.
*/
export interface TerraformConfigResult {
readonly result: {[key: string]: any};
}
}

142
sdk/nodejs/redirect.ts generated Normal file
View File

@@ -0,0 +1,142 @@
// *** 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 Redirect extends pulumi.CustomResource {
/**
* Get an existing Redirect 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?: RedirectState, opts?: pulumi.CustomResourceOptions): Redirect {
return new Redirect(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/redirect:Redirect';
/**
* Returns true if the given object is an instance of Redirect. 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 Redirect {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Redirect.__pulumiType;
}
/**
* Application this redirect belongs to.
*/
declare public readonly applicationId: pulumi.Output<string>;
/**
* RFC 3339 timestamp of when the redirect was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Issue a permanent (301) redirect instead of a temporary (302) one.
*/
declare public readonly permanent: pulumi.Output<boolean>;
/**
* Regular expression matched against the incoming URL.
*/
declare public readonly regex: pulumi.Output<string>;
/**
* Replacement URL, which may reference capture groups such as `${1}`.
*/
declare public readonly replacement: pulumi.Output<string>;
/**
* Create a Redirect 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: RedirectArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: RedirectArgs | RedirectState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as RedirectState | undefined;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["permanent"] = state?.permanent;
resourceInputs["regex"] = state?.regex;
resourceInputs["replacement"] = state?.replacement;
} else {
const args = argsOrState as RedirectArgs | undefined;
if (args?.applicationId === undefined && !opts.urn) {
throw new Error("Missing required property 'applicationId'");
}
if (args?.regex === undefined && !opts.urn) {
throw new Error("Missing required property 'regex'");
}
if (args?.replacement === undefined && !opts.urn) {
throw new Error("Missing required property 'replacement'");
}
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["permanent"] = args?.permanent;
resourceInputs["regex"] = args?.regex;
resourceInputs["replacement"] = args?.replacement;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Redirect.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Redirect resources.
*/
export interface RedirectState {
/**
* Application this redirect belongs to.
*/
applicationId?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the redirect was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Issue a permanent (301) redirect instead of a temporary (302) one.
*/
permanent?: pulumi.Input<boolean>;
/**
* Regular expression matched against the incoming URL.
*/
regex?: pulumi.Input<string>;
/**
* Replacement URL, which may reference capture groups such as `${1}`.
*/
replacement?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Redirect resource.
*/
export interface RedirectArgs {
/**
* Application this redirect belongs to.
*/
applicationId: pulumi.Input<string>;
/**
* Issue a permanent (301) redirect instead of a temporary (302) one.
*/
permanent?: pulumi.Input<boolean>;
/**
* Regular expression matched against the incoming URL.
*/
regex: pulumi.Input<string>;
/**
* Replacement URL, which may reference capture groups such as `${1}`.
*/
replacement: pulumi.Input<string>;
}

504
sdk/nodejs/redis.ts generated Normal file
View File

@@ -0,0 +1,504 @@
// *** 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 Redis extends pulumi.CustomResource {
/**
* Get an existing Redis 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?: RedisState, opts?: pulumi.CustomResourceOptions): Redis {
return new Redis(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/redis:Redis';
/**
* Returns true if the given object is an instance of Redis. 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 Redis {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Redis.__pulumiType;
}
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
declare public readonly appName: pulumi.Output<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
declare public /*out*/ readonly applicationStatus: pulumi.Output<string>;
/**
* Arguments appended to the container command.
*/
declare public readonly args: pulumi.Output<string[]>;
/**
* Override the container entrypoint command.
*/
declare public readonly command: pulumi.Output<string | undefined>;
/**
* Hard CPU limit, for example `1`.
*/
declare public readonly cpuLimit: pulumi.Output<string | undefined>;
/**
* Soft CPU reservation, for example `0.5`.
*/
declare public readonly cpuReservation: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the database was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Password used to authenticate to Redis.
*/
declare public readonly databasePassword: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* Detach the service from the shared `dokploy-network`.
*/
declare public readonly detachDokployNetwork: pulumi.Output<boolean>;
/**
* Redis image to run, for example `redis:7`.
*/
declare public readonly dockerImage: pulumi.Output<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
declare public readonly endpointSpecSwarm: pulumi.Output<string | undefined>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
declare public readonly env: pulumi.Output<string | undefined>;
/**
* Environment this database belongs to.
*/
declare public readonly environmentId: pulumi.Output<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
declare public readonly externalPort: pulumi.Output<number | undefined>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
declare public readonly healthCheckSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm service labels, as a JSON object.
*/
declare public readonly labelsSwarm: pulumi.Output<string | undefined>;
/**
* Hard memory limit, for example `512m`.
*/
declare public readonly memoryLimit: pulumi.Output<string | undefined>;
/**
* Soft memory reservation, for example `256m`.
*/
declare public readonly memoryReservation: pulumi.Output<string | undefined>;
/**
* Docker Swarm service mode, as a JSON object.
*/
declare public readonly modeSwarm: pulumi.Output<string | undefined>;
/**
* Display name of the database.
*/
declare public readonly name: pulumi.Output<string>;
/**
* IDs of additional Docker networks to attach.
*/
declare public readonly networkIds: pulumi.Output<string[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
declare public readonly networkSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
declare public readonly placementSwarm: pulumi.Output<string | undefined>;
/**
* Number of replicas to run.
*/
declare public readonly replicas: pulumi.Output<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
declare public readonly restartPolicySwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
declare public readonly rollbackConfigSwarm: pulumi.Output<string | undefined>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Grace period in nanoseconds before a container is killed.
*/
declare public readonly stopGracePeriodSwarm: pulumi.Output<number | undefined>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
declare public readonly ulimitsSwarm: pulumi.Output<string | undefined>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
declare public readonly updateConfigSwarm: pulumi.Output<string | undefined>;
/**
* Create a Redis 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: RedisArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: RedisArgs | RedisState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as RedisState | undefined;
resourceInputs["appName"] = state?.appName;
resourceInputs["applicationStatus"] = state?.applicationStatus;
resourceInputs["args"] = state?.args;
resourceInputs["command"] = state?.command;
resourceInputs["cpuLimit"] = state?.cpuLimit;
resourceInputs["cpuReservation"] = state?.cpuReservation;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["databasePassword"] = state?.databasePassword;
resourceInputs["description"] = state?.description;
resourceInputs["detachDokployNetwork"] = state?.detachDokployNetwork;
resourceInputs["dockerImage"] = state?.dockerImage;
resourceInputs["endpointSpecSwarm"] = state?.endpointSpecSwarm;
resourceInputs["env"] = state?.env;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["externalPort"] = state?.externalPort;
resourceInputs["healthCheckSwarm"] = state?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = state?.labelsSwarm;
resourceInputs["memoryLimit"] = state?.memoryLimit;
resourceInputs["memoryReservation"] = state?.memoryReservation;
resourceInputs["modeSwarm"] = state?.modeSwarm;
resourceInputs["name"] = state?.name;
resourceInputs["networkIds"] = state?.networkIds;
resourceInputs["networkSwarm"] = state?.networkSwarm;
resourceInputs["placementSwarm"] = state?.placementSwarm;
resourceInputs["replicas"] = state?.replicas;
resourceInputs["restartPolicySwarm"] = state?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = state?.rollbackConfigSwarm;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["stopGracePeriodSwarm"] = state?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = state?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = state?.updateConfigSwarm;
} else {
const args = argsOrState as RedisArgs | undefined;
if (args?.databasePassword === undefined && !opts.urn) {
throw new Error("Missing required property 'databasePassword'");
}
if (args?.dockerImage === undefined && !opts.urn) {
throw new Error("Missing required property 'dockerImage'");
}
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["args"] = args?.args;
resourceInputs["command"] = args?.command;
resourceInputs["cpuLimit"] = args?.cpuLimit;
resourceInputs["cpuReservation"] = args?.cpuReservation;
resourceInputs["databasePassword"] = args?.databasePassword ? pulumi.secret(args.databasePassword) : undefined;
resourceInputs["description"] = args?.description;
resourceInputs["detachDokployNetwork"] = args?.detachDokployNetwork;
resourceInputs["dockerImage"] = args?.dockerImage;
resourceInputs["endpointSpecSwarm"] = args?.endpointSpecSwarm;
resourceInputs["env"] = args?.env;
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["externalPort"] = args?.externalPort;
resourceInputs["healthCheckSwarm"] = args?.healthCheckSwarm;
resourceInputs["labelsSwarm"] = args?.labelsSwarm;
resourceInputs["memoryLimit"] = args?.memoryLimit;
resourceInputs["memoryReservation"] = args?.memoryReservation;
resourceInputs["modeSwarm"] = args?.modeSwarm;
resourceInputs["name"] = args?.name;
resourceInputs["networkIds"] = args?.networkIds;
resourceInputs["networkSwarm"] = args?.networkSwarm;
resourceInputs["placementSwarm"] = args?.placementSwarm;
resourceInputs["replicas"] = args?.replicas;
resourceInputs["restartPolicySwarm"] = args?.restartPolicySwarm;
resourceInputs["rollbackConfigSwarm"] = args?.rollbackConfigSwarm;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["stopGracePeriodSwarm"] = args?.stopGracePeriodSwarm;
resourceInputs["ulimitsSwarm"] = args?.ulimitsSwarm;
resourceInputs["updateConfigSwarm"] = args?.updateConfigSwarm;
resourceInputs["applicationStatus"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["databasePassword"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Redis.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Redis resources.
*/
export interface RedisState {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Current status reported by Dokploy: `idle`, `running`, `done` or `error`.
*/
applicationStatus?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the database was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Password used to authenticate to Redis.
*/
databasePassword?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* Redis image to run, for example `redis:7`.
*/
dockerImage?: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId?: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Redis resource.
*/
export interface RedisArgs {
/**
* Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new database.
*/
appName?: pulumi.Input<string>;
/**
* Arguments appended to the container command.
*/
args?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Override the container entrypoint command.
*/
command?: pulumi.Input<string>;
/**
* Hard CPU limit, for example `1`.
*/
cpuLimit?: pulumi.Input<string>;
/**
* Soft CPU reservation, for example `0.5`.
*/
cpuReservation?: pulumi.Input<string>;
/**
* Password used to authenticate to Redis.
*/
databasePassword: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Detach the service from the shared `dokploy-network`.
*/
detachDokployNetwork?: pulumi.Input<boolean>;
/**
* Redis image to run, for example `redis:7`.
*/
dockerImage: pulumi.Input<string>;
/**
* Docker Swarm endpoint specification, as a JSON object.
*/
endpointSpecSwarm?: pulumi.Input<string>;
/**
* Environment variables in `KEY=value` format, one per line.
*/
env?: pulumi.Input<string>;
/**
* Environment this database belongs to.
*/
environmentId: pulumi.Input<string>;
/**
* Host port to expose the database on. Leave unset to keep the database reachable only from inside the Docker network.
*/
externalPort?: pulumi.Input<number>;
/**
* Docker Swarm health check configuration, as a JSON object.
*/
healthCheckSwarm?: pulumi.Input<string>;
/**
* Docker Swarm service labels, as a JSON object.
*/
labelsSwarm?: pulumi.Input<string>;
/**
* Hard memory limit, for example `512m`.
*/
memoryLimit?: pulumi.Input<string>;
/**
* Soft memory reservation, for example `256m`.
*/
memoryReservation?: pulumi.Input<string>;
/**
* Docker Swarm service mode, as a JSON object.
*/
modeSwarm?: pulumi.Input<string>;
/**
* Display name of the database.
*/
name?: pulumi.Input<string>;
/**
* IDs of additional Docker networks to attach.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Docker Swarm network attachments, as a JSON array.
*/
networkSwarm?: pulumi.Input<string>;
/**
* Docker Swarm placement constraints, as a JSON object.
*/
placementSwarm?: pulumi.Input<string>;
/**
* Number of replicas to run.
*/
replicas?: pulumi.Input<number>;
/**
* Docker Swarm restart policy, as a JSON object.
*/
restartPolicySwarm?: pulumi.Input<string>;
/**
* Docker Swarm rollback configuration, as a JSON object.
*/
rollbackConfigSwarm?: pulumi.Input<string>;
/**
* Remote server to deploy on. Omit to use the Dokploy host itself.
*/
serverId?: pulumi.Input<string>;
/**
* Grace period in nanoseconds before a container is killed.
*/
stopGracePeriodSwarm?: pulumi.Input<number>;
/**
* Docker Swarm ulimits, as a JSON object.
*/
ulimitsSwarm?: pulumi.Input<string>;
/**
* Docker Swarm rolling update configuration, as a JSON object.
*/
updateConfigSwarm?: pulumi.Input<string>;
}

189
sdk/nodejs/registry.ts generated Normal file
View File

@@ -0,0 +1,189 @@
// *** 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 Registry extends pulumi.CustomResource {
/**
* Get an existing Registry 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?: RegistryState, opts?: pulumi.CustomResourceOptions): Registry {
return new Registry(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/registry:Registry';
/**
* Returns true if the given object is an instance of Registry. 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 Registry {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Registry.__pulumiType;
}
/**
* RFC 3339 timestamp of when the registry was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Prefix prepended to pushed image names, for example an organization or namespace.
*/
declare public readonly imagePrefix: pulumi.Output<string | undefined>;
/**
* Password or access token used to authenticate.
*/
declare public readonly password: pulumi.Output<string>;
/**
* Display name of the registry.
*/
declare public readonly registryName: pulumi.Output<string>;
/**
* Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
*/
declare public readonly registryType: pulumi.Output<string>;
/**
* Registry hostname, for example `ghcr.io`.
*/
declare public readonly registryUrl: pulumi.Output<string>;
/**
* Server this registry is scoped to.
*/
declare public readonly serverId: pulumi.Output<string | undefined>;
/**
* Username used to authenticate to the registry.
*/
declare public readonly username: pulumi.Output<string>;
/**
* Create a Registry 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: RegistryArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: RegistryArgs | RegistryState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as RegistryState | undefined;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["imagePrefix"] = state?.imagePrefix;
resourceInputs["password"] = state?.password;
resourceInputs["registryName"] = state?.registryName;
resourceInputs["registryType"] = state?.registryType;
resourceInputs["registryUrl"] = state?.registryUrl;
resourceInputs["serverId"] = state?.serverId;
resourceInputs["username"] = state?.username;
} else {
const args = argsOrState as RegistryArgs | undefined;
if (args?.password === undefined && !opts.urn) {
throw new Error("Missing required property 'password'");
}
if (args?.registryName === undefined && !opts.urn) {
throw new Error("Missing required property 'registryName'");
}
if (args?.registryUrl === undefined && !opts.urn) {
throw new Error("Missing required property 'registryUrl'");
}
if (args?.username === undefined && !opts.urn) {
throw new Error("Missing required property 'username'");
}
resourceInputs["imagePrefix"] = args?.imagePrefix;
resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
resourceInputs["registryName"] = args?.registryName;
resourceInputs["registryType"] = args?.registryType;
resourceInputs["registryUrl"] = args?.registryUrl;
resourceInputs["serverId"] = args?.serverId;
resourceInputs["username"] = args?.username;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Registry.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Registry resources.
*/
export interface RegistryState {
/**
* RFC 3339 timestamp of when the registry was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Prefix prepended to pushed image names, for example an organization or namespace.
*/
imagePrefix?: pulumi.Input<string>;
/**
* Password or access token used to authenticate.
*/
password?: pulumi.Input<string>;
/**
* Display name of the registry.
*/
registryName?: pulumi.Input<string>;
/**
* Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
*/
registryType?: pulumi.Input<string>;
/**
* Registry hostname, for example `ghcr.io`.
*/
registryUrl?: pulumi.Input<string>;
/**
* Server this registry is scoped to.
*/
serverId?: pulumi.Input<string>;
/**
* Username used to authenticate to the registry.
*/
username?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Registry resource.
*/
export interface RegistryArgs {
/**
* Prefix prepended to pushed image names, for example an organization or namespace.
*/
imagePrefix?: pulumi.Input<string>;
/**
* Password or access token used to authenticate.
*/
password: pulumi.Input<string>;
/**
* Display name of the registry.
*/
registryName: pulumi.Input<string>;
/**
* Registry kind. Dokploy currently accepts only `cloud`. Valid values: `cloud`. Defaults to `cloud`.
*/
registryType?: pulumi.Input<string>;
/**
* Registry hostname, for example `ghcr.io`.
*/
registryUrl: pulumi.Input<string>;
/**
* Server this registry is scoped to.
*/
serverId?: pulumi.Input<string>;
/**
* Username used to authenticate to the registry.
*/
username: pulumi.Input<string>;
}

130
sdk/nodejs/security.ts generated Normal file
View File

@@ -0,0 +1,130 @@
// *** 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 Security extends pulumi.CustomResource {
/**
* Get an existing Security 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?: SecurityState, opts?: pulumi.CustomResourceOptions): Security {
return new Security(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/security:Security';
/**
* Returns true if the given object is an instance of Security. 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 Security {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Security.__pulumiType;
}
/**
* Application these credentials protect.
*/
declare public readonly applicationId: pulumi.Output<string>;
/**
* RFC 3339 timestamp of when the credentials were created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Basic auth password.
*/
declare public readonly password: pulumi.Output<string>;
/**
* Basic auth username.
*/
declare public readonly username: pulumi.Output<string>;
/**
* Create a Security 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: SecurityArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: SecurityArgs | SecurityState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as SecurityState | undefined;
resourceInputs["applicationId"] = state?.applicationId;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["password"] = state?.password;
resourceInputs["username"] = state?.username;
} else {
const args = argsOrState as SecurityArgs | undefined;
if (args?.applicationId === undefined && !opts.urn) {
throw new Error("Missing required property 'applicationId'");
}
if (args?.password === undefined && !opts.urn) {
throw new Error("Missing required property 'password'");
}
if (args?.username === undefined && !opts.urn) {
throw new Error("Missing required property 'username'");
}
resourceInputs["applicationId"] = args?.applicationId;
resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
resourceInputs["username"] = args?.username;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["password"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Security.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering Security resources.
*/
export interface SecurityState {
/**
* Application these credentials protect.
*/
applicationId?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the credentials were created.
*/
createdAt?: pulumi.Input<string>;
/**
* Basic auth password.
*/
password?: pulumi.Input<string>;
/**
* Basic auth username.
*/
username?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Security resource.
*/
export interface SecurityArgs {
/**
* Application these credentials protect.
*/
applicationId: pulumi.Input<string>;
/**
* Basic auth password.
*/
password: pulumi.Input<string>;
/**
* Basic auth username.
*/
username: pulumi.Input<string>;
}

151
sdk/nodejs/sshKey.ts generated Normal file
View File

@@ -0,0 +1,151 @@
// *** 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 SshKey extends pulumi.CustomResource {
/**
* Get an existing SshKey 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?: SshKeyState, opts?: pulumi.CustomResourceOptions): SshKey {
return new SshKey(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'dokploy:index/sshKey:SshKey';
/**
* Returns true if the given object is an instance of SshKey. 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 SshKey {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === SshKey.__pulumiType;
}
/**
* RFC 3339 timestamp of when the key was created.
*/
declare public /*out*/ readonly createdAt: pulumi.Output<string>;
/**
* Free-form description.
*/
declare public readonly description: pulumi.Output<string | undefined>;
/**
* RFC 3339 timestamp of when the key was last used, if ever.
*/
declare public /*out*/ readonly lastUsedAt: pulumi.Output<string>;
/**
* Display name of the key pair.
*/
declare public readonly name: pulumi.Output<string>;
/**
* PEM-encoded private key.
*/
declare public readonly privateKey: pulumi.Output<string>;
/**
* OpenSSH-formatted public key.
*/
declare public readonly publicKey: pulumi.Output<string>;
/**
* Create a SshKey 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: SshKeyArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: SshKeyArgs | SshKeyState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as SshKeyState | undefined;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["description"] = state?.description;
resourceInputs["lastUsedAt"] = state?.lastUsedAt;
resourceInputs["name"] = state?.name;
resourceInputs["privateKey"] = state?.privateKey;
resourceInputs["publicKey"] = state?.publicKey;
} else {
const args = argsOrState as SshKeyArgs | undefined;
if (args?.privateKey === undefined && !opts.urn) {
throw new Error("Missing required property 'privateKey'");
}
if (args?.publicKey === undefined && !opts.urn) {
throw new Error("Missing required property 'publicKey'");
}
resourceInputs["description"] = args?.description;
resourceInputs["name"] = args?.name;
resourceInputs["privateKey"] = args?.privateKey ? pulumi.secret(args.privateKey) : undefined;
resourceInputs["publicKey"] = args?.publicKey;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["lastUsedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["privateKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(SshKey.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering SshKey resources.
*/
export interface SshKeyState {
/**
* RFC 3339 timestamp of when the key was created.
*/
createdAt?: pulumi.Input<string>;
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* RFC 3339 timestamp of when the key was last used, if ever.
*/
lastUsedAt?: pulumi.Input<string>;
/**
* Display name of the key pair.
*/
name?: pulumi.Input<string>;
/**
* PEM-encoded private key.
*/
privateKey?: pulumi.Input<string>;
/**
* OpenSSH-formatted public key.
*/
publicKey?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a SshKey resource.
*/
export interface SshKeyArgs {
/**
* Free-form description.
*/
description?: pulumi.Input<string>;
/**
* Display name of the key pair.
*/
name?: pulumi.Input<string>;
/**
* PEM-encoded private key.
*/
privateKey: pulumi.Input<string>;
/**
* OpenSSH-formatted public key.
*/
publicKey: pulumi.Input<string>;
}

48
sdk/nodejs/tsconfig.json generated Normal file
View File

@@ -0,0 +1,48 @@
{
"compilerOptions": {
"outDir": "bin",
"target": "ES2020",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"stripInternal": true,
"experimentalDecorators": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"strict": true
},
"files": [
"application.ts",
"certificate.ts",
"compose.ts",
"config/index.ts",
"config/vars.ts",
"destination.ts",
"domain.ts",
"environment.ts",
"getApplication.ts",
"getEnvironment.ts",
"getProject.ts",
"getProjects.ts",
"getServers.ts",
"index.ts",
"mariaDb.ts",
"mongo.ts",
"mount.ts",
"mySql.ts",
"port.ts",
"postgres.ts",
"project.ts",
"provider.ts",
"redirect.ts",
"redis.ts",
"registry.ts",
"security.ts",
"sshKey.ts",
"types/index.ts",
"types/input.ts",
"types/output.ts",
"utilities.ts"
]
}

13
sdk/nodejs/types/index.ts generated Normal file
View File

@@ -0,0 +1,13 @@
// *** 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 utilities from "../utilities";
// Export sub-modules:
import * as input from "./input";
import * as output from "./output";
export {
input,
output,
};

7
sdk/nodejs/types/input.ts generated Normal file
View File

@@ -0,0 +1,7 @@
// *** 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 inputs from "../types/input";
import * as outputs from "../types/output";

27
sdk/nodejs/types/output.ts generated Normal file
View File

@@ -0,0 +1,27 @@
// *** 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 inputs from "../types/input";
import * as outputs from "../types/output";
export interface GetProjectEnvironment {
id: string;
isDefault: boolean;
name: string;
}
export interface GetProjectsProject {
defaultEnvironmentId: string;
description: string;
id: string;
name: string;
}
export interface GetServersServer {
id: string;
ipAddress: string;
name: string;
serverStatus: string;
}

96
sdk/nodejs/utilities.ts generated Normal file
View File

@@ -0,0 +1,96 @@
// *** 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 runtime from "@pulumi/pulumi/runtime";
import * as pulumi from "@pulumi/pulumi";
export function getEnv(...vars: string[]): string | undefined {
for (const v of vars) {
const value = process.env[v];
if (value) {
return value;
}
}
return undefined;
}
export function getEnvBoolean(...vars: string[]): boolean | undefined {
const s = getEnv(...vars);
if (s !== undefined) {
// NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
// Terraform uses internally when parsing boolean values.
if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
return true;
}
if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
return false;
}
}
return undefined;
}
export function getEnvNumber(...vars: string[]): number | undefined {
const s = getEnv(...vars);
if (s !== undefined) {
const f = parseFloat(s);
if (!isNaN(f)) {
return f;
}
}
return undefined;
}
export function getVersion(): string {
let version = require('./package.json').version;
// Node allows for the version to be prefixed by a "v", while semver doesn't.
// If there is a v, strip it off.
if (version.indexOf('v') === 0) {
version = version.slice(1);
}
return version;
}
/** @internal */
export function resourceOptsDefaults(): any {
return { version: getVersion(), pluginDownloadURL: "github://api.github.com/maxvojtkov/pulumi-dokploy" };
}
/** @internal */
export function lazyLoad(exports: any, props: string[], loadModule: any) {
for (let property of props) {
Object.defineProperty(exports, property, {
enumerable: true,
get: function() {
return loadModule()[property];
},
});
}
}
/** @internal */
export async function callAsync<T>(
tok: string,
props: pulumi.Inputs,
res?: pulumi.Resource,
opts?: {property?: string},
): Promise<T> {
const o: any = runtime.call<T>(tok, props, res);
const value = await o.promise(true /*withUnknowns*/);
const isKnown = await o.isKnown;
const isSecret = await o.isSecret;
const problem: string|undefined =
!isKnown ? "an unknown value"
: isSecret ? "a secret value"
: undefined;
// Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
if (problem) {
throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
"This is an error in the provider, please report this to the provider developer.");
}
// Extract a single property if requested.
if (opts && opts.property) {
return value[opts.property];
}
return value;
}