Files
Max Vojtkov a6d8aa8b52 A Terraform provider for Dokploy
Plugin-framework provider covering projects, environments, applications,
Compose stacks, managed databases, domains, mounts, ports, redirects,
basic auth, registries, SSH keys, certificates and backup destinations,
over Dokploy's tRPC-over-REST API.

The shim package exposes the provider to other Go modules, which is how
pulumi-dokploy bridges it.
2026-08-09 12:17:26 +03:00

8.4 KiB

page_title, subcategory, description
page_title subcategory description
dokploy_application Resource - dokploy A Dokploy application: a single service built from a Git repository, a Docker image, or an uploaded artifact. Dokploy's application.create endpoint accepts only a handful of fields, so this resource creates the application and then applies the rest of the configuration through application.update. ~> Creating this resource does not deploy the application. Trigger a deployment from the Dokploy UI, the CLI, or a terraform_data provisioner calling application.deploy.

dokploy_application (Resource)

A Dokploy application: a single service built from a Git repository, a Docker image, or an uploaded artifact.

Dokploy's application.create endpoint accepts only a handful of fields, so this resource creates the application and then applies the rest of the configuration through application.update.

~> Creating this resource does not deploy the application. Trigger a deployment from the Dokploy UI, the CLI, or a terraform_data provisioner calling application.deploy.

Schema

Required

  • environment_id (String) Environment this application belongs to.
  • name (String) Display name of the application.

Optional

  • app_name (String) Unique Docker service name. Generated by Dokploy when omitted. Changing it forces a new application.
  • args (List of String) Arguments appended to the container command.
  • auto_deploy (Boolean) Deploy automatically when the configured trigger fires.
  • bitbucket_branch (String) Bitbucket branch to build.
  • bitbucket_build_path (String) Path within the Bitbucket repository to build from.
  • bitbucket_id (String) ID of the configured Bitbucket provider connection.
  • bitbucket_owner (String) Bitbucket repository owner.
  • bitbucket_repository (String) Bitbucket repository name.
  • bitbucket_repository_slug (String) Bitbucket repository slug.
  • branch (String) GitHub branch to build.
  • build_args (String) Docker build arguments in KEY=value format, one per line.
  • build_path (String) Path within the GitHub repository to build from.
  • build_registry_id (String) Registry used by a dedicated build server.
  • build_secrets (String, Sensitive) Docker build secrets in KEY=value format, one per line.
  • build_server_id (String) Server that performs builds, when separate from the deploy server.
  • build_type (String) How the application is built. Valid values: dockerfile, heroku_buildpacks, paketo_buildpacks, nixpacks, static, railpack.
  • clean_cache (Boolean) Discard the build cache on the next deployment.
  • command (String) Override the container entrypoint command.
  • cpu_limit (String) Hard CPU limit, for example 1.
  • cpu_reservation (String) Soft CPU reservation, for example 0.5.
  • create_env_file (Boolean) Write the environment variables to a .env file in the container.
  • custom_git_branch (String) Branch to build for a custom Git remote.
  • custom_git_build_path (String) Path within a custom Git repository to build from.
  • custom_git_ssh_key_id (String) SSH key used to clone a private custom Git remote.
  • custom_git_url (String) Git remote URL, when source_type is git.
  • description (String) Free-form description.
  • detach_dokploy_network (Boolean) Detach the service from the shared dokploy-network.
  • docker_build_stage (String) Target stage for a multi-stage Docker build.
  • docker_context_path (String) Docker build context path.
  • docker_image (String) Docker image reference, when source_type is docker.
  • dockerfile (String) Path to the Dockerfile, when build_type is dockerfile.
  • enable_submodules (Boolean) Clone Git submodules when checking out the repository.
  • enabled (Boolean) Whether the application is enabled.
  • endpoint_spec_swarm (String) Docker Swarm endpoint specification, as a JSON object.
  • env (String) Runtime environment variables in KEY=value format, one per line.
  • gitea_branch (String) Gitea branch to build.
  • gitea_build_path (String) Path within the Gitea repository to build from.
  • gitea_id (String) ID of the configured Gitea provider connection.
  • gitea_owner (String) Gitea repository owner.
  • gitea_repository (String) Gitea repository name.
  • github_id (String) ID of the configured GitHub provider connection.
  • gitlab_branch (String) GitLab branch to build.
  • gitlab_build_path (String) Path within the GitLab repository to build from.
  • gitlab_id (String) ID of the configured GitLab provider connection.
  • gitlab_owner (String) GitLab repository owner.
  • gitlab_path_namespace (String) Full GitLab namespace path.
  • gitlab_project_id (Number) Numeric GitLab project ID.
  • gitlab_repository (String) GitLab repository name.
  • health_check_swarm (String) Docker Swarm health check configuration, as a JSON object.
  • heroku_version (String) Heroku buildpack stack version.
  • is_preview_deployments_active (Boolean) Build a preview deployment for each pull request.
  • is_static_spa (Boolean) Serve a static build as a single-page application.
  • labels_swarm (String) Docker Swarm service labels, as a JSON object.
  • memory_limit (String) Hard memory limit, for example 512m.
  • memory_reservation (String) Soft memory reservation, for example 256m.
  • mode_swarm (String) Docker Swarm service mode, as a JSON object.
  • network_ids (List of String) IDs of additional Docker networks to attach.
  • network_swarm (String) Docker Swarm network attachments, as a JSON array.
  • owner (String) GitHub repository owner.
  • password (String, Sensitive) Registry password, when pulling a private image.
  • placement_swarm (String) Docker Swarm placement constraints, as a JSON object.
  • preview_build_args (String) Build arguments applied to preview deployments.
  • preview_build_secrets (String, Sensitive) Build secrets applied to preview deployments.
  • preview_certificate_type (String) Certificate strategy for preview deployments. Valid values: letsencrypt, none, custom.
  • preview_custom_cert_resolver (String) Traefik certificate resolver for preview deployments.
  • preview_env (String) Environment variables applied to preview deployments.
  • preview_https (Boolean) Serve preview deployments over HTTPS.
  • preview_labels (List of String) Pull request labels that opt into preview deployments.
  • preview_limit (Number) Maximum number of concurrent preview deployments.
  • preview_path (String) Base path for preview deployments.
  • preview_port (Number) Container port exposed by preview deployments.
  • preview_wildcard (String) Wildcard domain used to expose preview deployments.
  • publish_directory (String) Directory served when build_type is static.
  • railpack_version (String) Railpack version.
  • registry_id (String) Registry used to push the built image.
  • registry_url (String) Registry URL, when pulling a private image.
  • replicas (Number) Number of replicas to run.
  • repository (String) GitHub repository name.
  • restart_policy_swarm (String) Docker Swarm restart policy, as a JSON object.
  • rollback_active (Boolean) Keep previous images so deployments can be rolled back.
  • rollback_config_swarm (String) Docker Swarm rollback configuration, as a JSON object.
  • rollback_registry_id (String) Registry used to store rollback images.
  • server_id (String) Remote server to deploy on. Omit to use the Dokploy host itself.
  • source_type (String) Where the application's code or image comes from. Valid values: docker, git, github, gitlab, bitbucket, gitea, drop.
  • stop_grace_period_swarm (Number) Grace period in nanoseconds before a container is killed.
  • subtitle (String) Display subtitle shown in the Dokploy UI.
  • title (String) Display title shown in the Dokploy UI.
  • trigger_type (String) What triggers an automatic GitHub deployment. Valid values: push, tag.
  • ulimits_swarm (String) Docker Swarm ulimits, as a JSON object.
  • update_config_swarm (String) Docker Swarm rolling update configuration, as a JSON object.
  • username (String) Registry username, when pulling a private image.
  • watch_paths (List of String) Glob patterns that limit which changed paths trigger an automatic deployment.

Read-Only

  • application_status (String) Current status reported by Dokploy: idle, running, done or error.
  • created_at (String) RFC 3339 timestamp of when the application was created.
  • id (String) Unique application identifier.