digitalocean_app
Generated on 16 Jun 2025
from Terraform version
v2.56.0
Get information on a DigitalOcean App.
Example Usage
Get the account:
data "digitalocean_app" "example" {
app_id = "e665d18d-7b56-44a9-92ce-31979174d544"
}
output "default_ingress" {
value = data.digitalocean_app.example.default_ingress
}
Argument Reference
app_id
- (Required) The ID of the app to retrieve information about.
Attributes Reference
The following attributes are exported:
default_ingress
- The default URL to access the app.dedicated_ips
- A list of dedicated egress IP addresses associated with the app.ip
- The IP address of the dedicated egress IP.id
- The ID of the dedicated egress IP.status
- The status of the dedicated egress IP.
live_url
- The live URL of the app.live_domain
- The live domain of the app.active_deployment_id
- The ID the app’s currently active deployment.urn
- The uniform resource identifier for the app.updated_at
- The date and time of when the app was last updated.created_at
- The date and time of when the app was created.spec
- A DigitalOcean App spec describing the app.project_id
- The ID of the project that the app is assigned to.
A spec can contain multiple components.
A service
can contain:
name
- The name of the componentbuild_command
- An optional build command to run while building this component from source.dockerfile_path
- The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.source_dir
- An optional path to the working directory to use for the build.run_command
- An optional run command to override the component’s default.environment_slug
- An environment slug describing the type of this app.instance_size_slug
- The instance size to use for this component.instance_count
- The amount of instances that this component should be scaled to.http_port
- The internal port on which this service’s run command will listen.internal_ports
- A list of ports on which this service will listen for internal traffic.git
- A Git repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.repo_clone_url
- The clone URL of the repo.branch
- The name of the branch to use.
github
- A GitHub repo to use as component’s source. Only one ofgit
,github
orgitlab
may be set. To read your repo, App Platform must be authorized to access your GitHub account. Go to this URL to link App Platform to your GitHub account:https://cloud.digitalocean.com/apps/github/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
bitbucket
- A Bitbucket repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your Bitbucket account. Go to this URL to link App Platform to your Bitbucket account:https://cloud.digitalocean.com/apps/bitbucket/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
gitlab
- A Gitlab repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your GitLab account. Go to this URL to link App Platform to your GitLab account:https://cloud.digitalocean.com/apps/gitlab/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
image
- An image to use as the component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.registry_type
- The registry type. One ofDOCR
(DigitalOcean container registry) orDOCKER_HUB
.registry
- The registry name. Must be left empty for theDOCR
registry type. Required for theDOCKER_HUB
registry type.repository
- The repository name.tag
- The repository tag. Defaults tolatest
if not provided.digest
- The image digest. Cannot be specified iftag
is provided.deploy_on_push
- Configures automatically deploying images pushed to DOCR.enabled
- Whether to automatically deploy images pushed to DOCR.
env
- Describes an environment variable made available to an app competent.key
- The name of the environment variable.value
- The value of the environment variable.scope
- The visibility scope of the environment variable. One ofRUN_TIME
,BUILD_TIME
, orRUN_AND_BUILD_TIME
(default).type
- The type of the environment variable,GENERAL
orSECRET
.
route
- An HTTP paths that should be routed to this component.path
- Paths must start with/
and must be unique within the app.preserve_path_prefix
- An optional flag to preserve the path that is forwarded to the backend service.
health_check
- A health check to determine the availability of this component.http_path
- The route path used for the HTTP health check ping.initial_delay_seconds
- The number of seconds to wait before beginning health checks.period_seconds
- The number of seconds to wait between health checks.timeout_seconds
- The number of seconds after which the check times out.success_threshold
- The number of successful health checks before considered healthy.failure_threshold
- The number of failed health checks before considered unhealthy.
autoscaling
- Configuration for automatically scaling this component based on metrics.min_instance_count
- The minimum amount of instances for this component. Must be less than max_instance_count.max_instance_count
- The maximum amount of instances for this component. Must be more than min_instance_count.metrics
- The metrics that the component is scaled on.cpu
- Settings for scaling the component based on CPU utilization.percent
- The average target CPU utilization for the component.
log_destination
- Describes a log forwarding destination.name
- Name of the log destination. Minimum length: 2. Maximum length: 42.papertrail
- Papertrail configuration.endpoint
- Papertrail syslog endpoint.
datadog
- Datadog configuration.endpoint
- Datadog HTTP log intake endpoint.api_key
- Datadog API key.
logtail
- Logtail configuration.token
- Logtail token.
opensearch
- OpenSearch configurationendpoint
- OpenSearch API Endpoint. Only HTTPS is supported. Format: https://: . basic_auth
- OpenSearch basic authuser
- Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.password
- Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.
index_name
- The index name to use for the logs. If not set, the default index name islogs
.cluster_name
- The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.
termination
- Contains a component’s termination parameters.grace_period_seconds
- The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. Default: 120, Minimum 1, Maximum 600.drain_seconds
- The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. Default: 15 seconds, Minimum 1, Maximum 110.
A static_site
can contain:
name
- The name of the component.build_command
- An optional build command to run while building this component from source.dockerfile_path
- The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.source_dir
- An optional path to the working directory to use for the build.environment_slug
- An environment slug describing the type of this app.output_dir
- An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names:_static
,dist
,public
.index_document
- The name of the index document to use when serving this static site.error_document
- The name of the error document to use when serving this static site.catchall_document
- The name of the document to use as the fallback for any requests to documents that are not found when serving this static site.git
- A Git repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.repo_clone_url
- The clone URL of the repo.branch
- The name of the branch to use.
github
- A GitHub repo to use as component’s source. Only one ofgit
,github
orgitlab
may be set. To read your repo, App Platform must be authorized to access your GitHub account. Go to this URL to link App Platform to your GitHub account:https://cloud.digitalocean.com/apps/github/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
bitbucket
- A Bitbucket repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your Bitbucket account. Go to this URL to link App Platform to your Bitbucket account:https://cloud.digitalocean.com/apps/bitbucket/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
gitlab
- A Gitlab repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your GitLab account. Go to this URL to link App Platform to your GitLab account:https://cloud.digitalocean.com/apps/gitlab/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
env
- Describes an environment variable made available to an app competent.key
- The name of the environment variable.value
- The value of the environment variable.scope
- The visibility scope of the environment variable. One ofRUN_TIME
,BUILD_TIME
, orRUN_AND_BUILD_TIME
(default).type
- The type of the environment variable,GENERAL
orSECRET
.
route
- An HTTP paths that should be routed to this component.path
- Paths must start with/
and must be unique within the app.preserve_path_prefix
- An optional flag to preserve the path that is forwarded to the backend service.
A worker
can contain:
name
- The name of the componentbuild_command
- An optional build command to run while building this component from source.dockerfile_path
- The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.source_dir
- An optional path to the working directory to use for the build.run_command
- An optional run command to override the component’s default.environment_slug
- An environment slug describing the type of this app.instance_size_slug
- The instance size to use for this component.instance_count
- The amount of instances that this component should be scaled to.git
- A Git repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.repo_clone_url
- The clone URL of the repo.branch
- The name of the branch to use.
github
- A GitHub repo to use as component’s source. Only one ofgit
,github
orgitlab
may be set. To read your repo, App Platform must be authorized to access your GitHub account. Go to this URL to link App Platform to your GitHub account:https://cloud.digitalocean.com/apps/github/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
bitbucket
- A Bitbucket repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your Bitbucket account. Go to this URL to link App Platform to your Bitbucket account:https://cloud.digitalocean.com/apps/bitbucket/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
gitlab
- A Gitlab repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your GitLab account. Go to this URL to link App Platform to your GitLab account:https://cloud.digitalocean.com/apps/gitlab/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
image
- An image to use as the component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.registry_type
- The registry type. One ofDOCR
(DigitalOcean container registry) orDOCKER_HUB
.registry
- The registry name. Must be left empty for theDOCR
registry type. Required for theDOCKER_HUB
registry type.repository
- The repository name.tag
- The repository tag. Defaults tolatest
if not provided.digest
- The image digest. Cannot be specified iftag
is provided.deploy_on_push
- Configures automatically deploying images pushed to DOCR.enabled
- Whether to automatically deploy images pushed to DOCR.
env
- Describes an environment variable made available to an app competent.key
- The name of the environment variable.value
- The value of the environment variable.scope
- The visibility scope of the environment variable. One ofRUN_TIME
,BUILD_TIME
, orRUN_AND_BUILD_TIME
(default).type
- The type of the environment variable,GENERAL
orSECRET
.
log_destination
- Describes a log forwarding destination.name
- Name of the log destination. Minimum length: 2. Maximum length: 42.papertrail
- Papertrail configuration.endpoint
- Papertrail syslog endpoint.
datadog
- Datadog configuration.endpoint
- Datadog HTTP log intake endpoint.api_key
- Datadog API key.
logtail
- Logtail configuration.token
- Logtail token.
opensearch
- OpenSearch configurationendpoint
- OpenSearch API Endpoint. Only HTTPS is supported. Format: https://: . basic_auth
- OpenSearch basic authuser
- Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.password
- Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.
index_name
- The index name to use for the logs. If not set, the default index name islogs
.cluster_name
- The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.
autoscaling
- Configuration for automatically scaling this component based on metrics.min_instance_count
- The minimum amount of instances for this component. Must be less than max_instance_count.max_instance_count
- The maximum amount of instances for this component. Must be more than min_instance_count.metrics
- The metrics that the component is scaled on.cpu
- Settings for scaling the component based on CPU utilization.percent
- The average target CPU utilization for the component.
termination
- Contains a component’s termination parameters.grace_period_seconds
- The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. Default: 120, Minimum 1, Maximum 600.
A job
can contain:
name
- The name of the componentkind
- The type of job and when it will be run during the deployment process. It may be one of:UNSPECIFIED
: Default job type, will auto-complete to POST_DEPLOY kind.PRE_DEPLOY
: Indicates a job that runs before an app deployment.POST_DEPLOY
: Indicates a job that runs after an app deployment.FAILED_DEPLOY
: Indicates a job that runs after a component fails to deploy.
build_command
- An optional build command to run while building this component from source.dockerfile_path
- The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks.source_dir
- An optional path to the working directory to use for the build.run_command
- An optional run command to override the component’s default.environment_slug
- An environment slug describing the type of this app.instance_size_slug
- The instance size to use for this component.instance_count
- The amount of instances that this component should be scaled to.git
- A Git repo to use as the component’s source. The repository must be able to be cloned without authentication. Only one ofgit
,github
orgitlab
may be set.repo_clone_url
- The clone URL of the repo.branch
- The name of the branch to use.
github
- A GitHub repo to use as the component’s source. DigitalOcean App Platform must have access to the repository. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
bitbucket
- A Bitbucket repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your Bitbucket account. Go to this URL to link App Platform to your Bitbucket account:https://cloud.digitalocean.com/apps/bitbucket/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
gitlab
- A Gitlab repo to use as the component’s source. DigitalOcean App Platform must have access to the repository. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
image
- An image to use as the component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.registry_type
- The registry type. One ofDOCR
(DigitalOcean container registry) orDOCKER_HUB
.registry
- The registry name. Must be left empty for theDOCR
registry type. Required for theDOCKER_HUB
registry type.repository
- The repository name.tag
- The repository tag. Defaults tolatest
if not provided.digest
- The image digest. Cannot be specified iftag
is provided.deploy_on_push
- Configures automatically deploying images pushed to DOCR.enabled
- Whether to automatically deploy images pushed to DOCR.
env
- Describes an environment variable made available to an app competent.key
- The name of the environment variable.value
- The value of the environment variable.scope
- The visibility scope of the environment variable. One ofRUN_TIME
,BUILD_TIME
, orRUN_AND_BUILD_TIME
(default).type
- The type of the environment variable,GENERAL
orSECRET
.
log_destination
- Describes a log forwarding destination.name
- Name of the log destination. Minimum length: 2. Maximum length: 42.papertrail
- Papertrail configuration.endpoint
- Papertrail syslog endpoint.
datadog
- Datadog configuration.endpoint
- Datadog HTTP log intake endpoint.api_key
- Datadog API key.
logtail
- Logtail configuration.token
- Logtail token.
opensearch
- OpenSearch configurationendpoint
- OpenSearch API Endpoint. Only HTTPS is supported. Format: https://: . basic_auth
- OpenSearch basic authuser
- Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.password
- Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.
index_name
- The index name to use for the logs. If not set, the default index name islogs
.cluster_name
- The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.
termination
- Contains a component’s termination parameters.grace_period_seconds
- The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. Default: 120, Minimum 1, Maximum 600.
A function
component can contain:
name
- The name of the component.source_dir
- An optional path to the working directory to use for the build.git
- A Git repo to use as the component’s source. The repository must be able to be cloned without authentication. Only one ofgit
,github
orgitlab
may be set.repo_clone_url
- The clone URL of the repo.branch
- The name of the branch to use.
github
- A GitHub repo to use as the component’s source. DigitalOcean App Platform must have access to the repository. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
bitbucket
- A Bitbucket repo to use as component’s source. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set. To read your repo, App Platform must be authorized to access your Bitbucket account. Go to this URL to link App Platform to your Bitbucket account:https://cloud.digitalocean.com/apps/bitbucket/install
.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
gitlab
- A Gitlab repo to use as the component’s source. DigitalOcean App Platform must have access to the repository. Only one ofgit
,github
,bitbucket
,gitlab
, orimage
may be set.repo
- The name of the repo in the formatowner/repo
.branch
- The name of the branch to use.deploy_on_push
- Whether to automatically deploy new commits made to the repo.
env
- Describes an environment variable made available to an app competent.key
- The name of the environment variable.value
- The value of the environment variable.scope
- The visibility scope of the environment variable. One ofRUN_TIME
,BUILD_TIME
, orRUN_AND_BUILD_TIME
(default).type
- The type of the environment variable,GENERAL
orSECRET
.
route
- An HTTP paths that should be routed to this component.path
- Paths must start with/
and must be unique within the app.preserve_path_prefix
- An optional flag to preserve the path that is forwarded to the backend service.
cors
- The CORS policies of the app.allow_origins
- TheAccess-Control-Allow-Origin
can beexact
- TheAccess-Control-Allow-Origin
header will be set to the client’s origin only if the client’s origin exactly matches the value you provide.prefix
- TheAccess-Control-Allow-Origin
header will be set to the client’s origin if the beginning of the client’s origin matches the value you provide.regex
- TheAccess-Control-Allow-Origin
header will be set to the client’s origin if the client’s origin matches the regex you provide, in RE2 style syntax.allow_headers
- The set of allowed HTTP request headers. This configures theAccess-Control-Allow-Headers
header.max_age
- An optional duration specifying how long browsers can cache the results of a preflight request. This configures the Access-Control-Max-Age header. Example:5h30m
.expose_headers
- The set of HTTP response headers that browsers are allowed to access. This configures theAccess-Control-Expose-Headers
header.allow_methods
- The set of allowed HTTP methods. This configures theAccess-Control-Allow-Methods
header.allow_credentials
- Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode isinclude
. This configures theAccess-Control-Allow-Credentials
header.
alert
- Describes an alert policy for the component.rule
- The type of the alert to configure. Component app alert policies can be:CPU_UTILIZATION
,MEM_UTILIZATION
, orRESTART_COUNT
.value
- The threshold for the type of the warning.operator
- The operator to use. This is either ofGREATER_THAN
orLESS_THAN
.window
- The time before alerts should be triggered. This is may be one of:FIVE_MINUTES
,TEN_MINUTES
,THIRTY_MINUTES
,ONE_HOUR
.disabled
- Determines whether or not the alert is disabled (default:false
).
log_destination
- Describes a log forwarding destination.name
- Name of the log destination. Minimum length: 2. Maximum length: 42.papertrail
- Papertrail configuration.endpoint
- Papertrail syslog endpoint.
datadog
- Datadog configuration.endpoint
- Datadog HTTP log intake endpoint.api_key
- Datadog API key.
logtail
- Logtail configuration.token
- Logtail token.
opensearch
- OpenSearch configurationendpoint
- OpenSearch API Endpoint. Only HTTPS is supported. Format: https://: . basic_auth
- OpenSearch basic authuser
- Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.password
- Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.
index_name
- The index name to use for the logs. If not set, the default index name islogs
.cluster_name
- The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.
A database
can contain:
name
- The name of the component.engine
- The database engine to use (MYSQL
,PG
,REDIS
, orMONGODB
).version
- The version of the database engine.production
- Whether this is a production or dev database.cluster_name
- The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, ifcluster_name
is not set, a new cluster will be provisioned.db_name
- The name of the MySQL or PostgreSQL database to configure.db_user
- The name of the MySQL or PostgreSQL user to configure.