UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

1,529 lines 244 kB
import * as outputs from "../types/output"; export interface AppDedicatedIp { /** * The ID of the app. */ id: string; /** * The IP address of the dedicated egress IP. */ ip: string; /** * The status of the dedicated egress IP: 'UNKNOWN', 'ASSIGNING', 'ASSIGNED', or 'REMOVED' */ status: string; } export interface AppSpec { /** * Describes an alert policy for the component. */ alerts?: outputs.AppSpecAlert[]; databases?: outputs.AppSpecDatabase[]; /** * A boolean indicating whether to disable the edge cache for this app. Default: `false`. Available only for non-static sites. Requires custom domains and applies to all the domains of the app. */ disableEdgeCache?: boolean; /** * A boolean indicating whether to disable email obfuscation for this app. Default: `false`. Requires custom domains and applies to all the domains of the app. */ disableEmailObfuscation?: boolean; /** * Describes a domain where the application will be made available. */ domainNames: outputs.AppSpecDomainName[]; /** * @deprecated This attribute has been replaced by `domain` which supports additional functionality. */ domains: string[]; /** * Specification for app egress configurations. */ egresses?: outputs.AppSpecEgress[]; /** * A boolean, when set to `true`, enables enhanced analyzing of incoming traffic to prevent layer 7 DDoS attacks. Default: `false`. Requires custom domains and applies to all the domains of the app. */ enhancedThreatControlEnabled?: boolean; /** * Describes an environment variable made available to an app competent. */ envs?: outputs.AppSpecEnv[]; /** * A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/) */ features: string[]; functions?: outputs.AppSpecFunction[]; /** * Specification for component routing, rewrites, and redirects. */ ingress: outputs.AppSpecIngress; jobs?: outputs.AppSpecJob[]; /** * The name of the component. */ name: string; /** * The slug for the DigitalOcean data center region hosting the app. */ region?: string; services?: outputs.AppSpecService[]; staticSites?: outputs.AppSpecStaticSite[]; workers?: outputs.AppSpecWorker[]; } export interface AppSpecAlert { /** * Determines whether or not the alert is disabled (default: `false`). */ disabled?: boolean; /** * The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`. */ rule: string; } export interface AppSpecDatabase { /** * The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if `clusterName` is not set, a new cluster will be provisioned. */ clusterName?: string; /** * The name of the MySQL or PostgreSQL database to configure. */ dbName?: string; /** * The name of the MySQL or PostgreSQL user to configure. * * This resource supports customized create timeouts. The default timeout is 30 minutes. */ dbUser?: string; /** * The database engine to use (`MYSQL`, `PG`, `REDIS`, `MONGODB`, `KAFKA`, or `OPENSEARCH`). */ engine?: string; /** * The name of the component. */ name?: string; /** * Whether this is a production or dev database. */ production?: boolean; /** * The version of the database engine. */ version?: string; } export interface AppSpecDomainName { /** * The hostname for the domain. */ name: string; /** * The domain type, which can be one of the following: * - `DEFAULT`: The default .ondigitalocean.app domain assigned to this app. * - `PRIMARY`: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. * - `ALIAS`: A non-primary domain. */ type: string; /** * A boolean indicating whether the domain includes all sub-domains, in addition to the given domain. */ wildcard: boolean; /** * If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. */ zone?: string; } export interface AppSpecEgress { /** * The app egress type: `AUTOASSIGN`, `DEDICATED_IP` */ type?: string; } export interface AppSpecEnv { /** * The name of the environment variable. */ key?: string; /** * The visibility scope of the environment variable. One of `RUN_TIME`, `BUILD_TIME`, or `RUN_AND_BUILD_TIME` (default). */ scope?: string; /** * The type of the environment variable, `GENERAL` or `SECRET`. */ type: string; /** * The value of the environment variable. */ value?: string; } export interface AppSpecFunction { /** * Describes an alert policy for the component. */ alerts?: outputs.AppSpecFunctionAlert[]; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/bitbucket/install). Only one of `git`, `github`, `bitbucket`, `gitlab`, or `image` may be set. */ bitbucket?: outputs.AppSpecFunctionBitbucket; /** * The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app. * * @deprecated Service level CORS rules are deprecated in favor of ingresses */ cors?: outputs.AppSpecFunctionCors; /** * Describes an environment variable made available to an app competent. */ envs?: outputs.AppSpecFunctionEnv[]; /** * A Git repo to use as the component's source. The repository must be able to be cloned without authentication. Only one of `git`, `github` or `gitlab` may be set. */ git?: outputs.AppSpecFunctionGit; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ github?: outputs.AppSpecFunctionGithub; /** * A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ gitlab?: outputs.AppSpecFunctionGitlab; /** * Describes a log forwarding destination. */ logDestinations?: outputs.AppSpecFunctionLogDestination[]; /** * The name of the component. */ name: string; /** * An HTTP paths that should be routed to this component. * * @deprecated Service level routes are deprecated in favor of ingresses */ routes: outputs.AppSpecFunctionRoute[]; /** * An optional path to the working directory to use for the build. */ sourceDir?: string; } export interface AppSpecFunctionAlert { /** * Determines whether or not the alert is disabled (default: `false`). */ disabled?: boolean; /** * The operator to use. This is either of `GREATER_THAN` or `LESS_THAN`. */ operator: string; /** * The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`. */ rule: string; /** * The threshold for the type of the warning. */ value: number; /** * The time before alerts should be triggered. This is may be one of: `FIVE_MINUTES`, `TEN_MINUTES`, `THIRTY_MINUTES`, `ONE_HOUR`. */ window: string; } export interface AppSpecFunctionBitbucket { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecFunctionCors { /** * Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is `include`. This configures the Access-Control-Allow-Credentials header. */ allowCredentials?: boolean; /** * The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header. */ allowHeaders?: string[]; /** * The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header. */ allowMethods?: string[]; /** * The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header. */ allowOrigins?: outputs.AppSpecFunctionCorsAllowOrigins; /** * The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header. */ exposeHeaders?: string[]; /** * 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`. */ maxAge?: string; } export interface AppSpecFunctionCorsAllowOrigins { /** * Exact string match. */ exact?: string; /** * Prefix-based match. * * @deprecated Prefix-based matching has been deprecated in favor of regex-based matching. */ prefix?: string; /** * RE2 style regex-based match. */ regex?: string; } export interface AppSpecFunctionEnv { /** * The name of the environment variable. */ key?: string; /** * The visibility scope of the environment variable. One of `RUN_TIME`, `BUILD_TIME`, or `RUN_AND_BUILD_TIME` (default). */ scope?: string; /** * The type of the environment variable, `GENERAL` or `SECRET`. */ type: string; /** * The value of the environment variable. */ value?: string; } export interface AppSpecFunctionGit { /** * The name of the branch to use. */ branch?: string; /** * The clone URL of the repo. */ repoCloneUrl?: string; } export interface AppSpecFunctionGithub { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecFunctionGitlab { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecFunctionLogDestination { /** * Datadog configuration. */ datadog?: outputs.AppSpecFunctionLogDestinationDatadog; /** * Logtail configuration. */ logtail?: outputs.AppSpecFunctionLogDestinationLogtail; /** * Name of the log destination. Minimum length: 2. Maximum length: 42. */ name: string; /** * OpenSearch configuration. */ openSearch?: outputs.AppSpecFunctionLogDestinationOpenSearch; /** * Papertrail configuration. */ papertrail?: outputs.AppSpecFunctionLogDestinationPapertrail; } export interface AppSpecFunctionLogDestinationDatadog { /** * Datadog API key. */ apiKey: string; /** * Datadog HTTP log intake endpoint. */ endpoint?: string; } export interface AppSpecFunctionLogDestinationLogtail { /** * Logtail token. */ token: string; } export interface AppSpecFunctionLogDestinationOpenSearch { /** * Basic authentication details. */ basicAuth: outputs.AppSpecFunctionLogDestinationOpenSearchBasicAuth; /** * The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if `clusterName` is not set, a new cluster will be provisioned. */ clusterName?: string; /** * OpenSearch endpoint. */ endpoint?: string; /** * OpenSearch index name. */ indexName?: string; } export interface AppSpecFunctionLogDestinationOpenSearchBasicAuth { /** * Password for basic authentication. */ password?: string; /** * user for basic authentication. */ user?: string; } export interface AppSpecFunctionLogDestinationPapertrail { /** * Papertrail syslog endpoint. */ endpoint: string; } export interface AppSpecFunctionRoute { /** * Paths must start with `/` and must be unique within the app. */ path?: string; /** * An optional flag to preserve the path that is forwarded to the backend service. */ preservePathPrefix?: boolean; } export interface AppSpecIngress { /** * Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. */ rules?: outputs.AppSpecIngressRule[]; } export interface AppSpecIngressRule { /** * The component to route to. Only one of `component` or `redirect` may be set. */ component: outputs.AppSpecIngressRuleComponent; /** * The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app. */ cors: outputs.AppSpecIngressRuleCors; /** * The match configuration for the rule */ match: outputs.AppSpecIngressRuleMatch; /** * The redirect configuration for the rule. Only one of `component` or `redirect` may be set. */ redirect?: outputs.AppSpecIngressRuleRedirect; } export interface AppSpecIngressRuleComponent { /** * The name of the component to route to. */ name: string; /** * An optional boolean flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. */ preservePathPrefix: boolean; /** * An optional field that will rewrite the path of the component to be what is specified here. This is mutually exclusive with `preservePathPrefix`. */ rewrite: string; } export interface AppSpecIngressRuleCors { /** * Whether browsers should expose the response to the client-side JavaScript code when the request's credentials mode is `include`. This configures the `Access-Control-Allow-Credentials` header. */ allowCredentials?: boolean; /** * The set of allowed HTTP request headers. This configures the `Access-Control-Allow-Headers` header. */ allowHeaders?: string[]; /** * The set of allowed HTTP methods. This configures the `Access-Control-Allow-Methods` header. */ allowMethods?: string[]; /** * The `Access-Control-Allow-Origin` can be */ allowOrigins?: outputs.AppSpecIngressRuleCorsAllowOrigins; /** * The set of HTTP response headers that browsers are allowed to access. This configures the `Access-Control-Expose-Headers` header. */ exposeHeaders?: string[]; /** * 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`. */ maxAge?: string; } export interface AppSpecIngressRuleCorsAllowOrigins { /** * The `Access-Control-Allow-Origin` header will be set to the client's origin only if the client's origin exactly matches the value you provide. */ exact?: string; /** * The `Access-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. * * @deprecated Prefix-based matching has been deprecated in favor of regex-based matching. */ prefix?: string; /** * The `Access-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](https://github.com/google/re2/wiki/Syntax). */ regex?: string; } export interface AppSpecIngressRuleMatch { /** * The path to match on. */ path: outputs.AppSpecIngressRuleMatchPath; } export interface AppSpecIngressRuleMatchPath { /** * Prefix-based match. */ prefix: string; } export interface AppSpecIngressRuleRedirect { /** * The authority/host to redirect to. This can be a hostname or IP address. */ authority?: string; /** * The port to redirect to. */ port?: number; /** * The redirect code to use. Supported values are `300`, `301`, `302`, `303`, `304`, `307`, `308`. */ redirectCode?: number; /** * The scheme to redirect to. Supported values are `http` or `https` */ scheme?: string; /** * An optional URI path to redirect to. */ uri?: string; } export interface AppSpecJob { /** * Describes an alert policy for the component. */ alerts?: outputs.AppSpecJobAlert[]; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/bitbucket/install). Only one of `git`, `github`, `bitbucket`, `gitlab`, or `image` may be set. */ bitbucket?: outputs.AppSpecJobBitbucket; /** * An optional build command to run while building this component from source. */ buildCommand?: string; /** * The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks. */ dockerfilePath?: string; /** * An environment slug describing the type of this app. */ environmentSlug?: string; /** * Describes an environment variable made available to an app competent. */ envs?: outputs.AppSpecJobEnv[]; /** * A Git repo to use as the component's source. The repository must be able to be cloned without authentication. Only one of `git`, `github` or `gitlab` may be set. */ git?: outputs.AppSpecJobGit; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ github?: outputs.AppSpecJobGithub; /** * A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ gitlab?: outputs.AppSpecJobGitlab; /** * An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set. */ image?: outputs.AppSpecJobImage; /** * The amount of instances that this component should be scaled to. */ instanceCount?: number; /** * The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/digitalocean/#tag/Apps/operation/apps_list_instanceSizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs` */ instanceSizeSlug?: string; /** * 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. */ kind?: string; /** * Describes a log forwarding destination. */ logDestinations?: outputs.AppSpecJobLogDestination[]; /** * The name of the component. */ name: string; /** * An optional run command to override the component's default. */ runCommand?: string; /** * An optional path to the working directory to use for the build. */ sourceDir?: string; /** * Contains a component's termination parameters. */ termination?: outputs.AppSpecJobTermination; } export interface AppSpecJobAlert { /** * Determines whether or not the alert is disabled (default: `false`). */ disabled?: boolean; /** * The operator to use. This is either of `GREATER_THAN` or `LESS_THAN`. */ operator: string; /** * The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`. */ rule: string; /** * The threshold for the type of the warning. */ value: number; /** * The time before alerts should be triggered. This is may be one of: `FIVE_MINUTES`, `TEN_MINUTES`, `THIRTY_MINUTES`, `ONE_HOUR`. */ window: string; } export interface AppSpecJobBitbucket { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecJobEnv { /** * The name of the environment variable. */ key?: string; /** * The visibility scope of the environment variable. One of `RUN_TIME`, `BUILD_TIME`, or `RUN_AND_BUILD_TIME` (default). */ scope?: string; /** * The type of the environment variable, `GENERAL` or `SECRET`. */ type: string; /** * The value of the environment variable. */ value?: string; } export interface AppSpecJobGit { /** * The name of the branch to use. */ branch?: string; /** * The clone URL of the repo. */ repoCloneUrl?: string; } export interface AppSpecJobGithub { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecJobGitlab { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecJobImage { /** * Configures automatically deploying images pushed to DOCR. */ deployOnPushes: outputs.AppSpecJobImageDeployOnPush[]; /** * The image digest. Cannot be specified if `tag` is provided. */ digest?: string; /** * The registry name. Must be left empty for the `DOCR` registry type. Required for the `DOCKER_HUB` registry type. */ registry?: string; /** * The credentials required to access a private Docker Hub or GitHub registry, in the following syntax `<username>:<token>`. */ registryCredentials?: string; /** * The registry type. One of `DOCR` (DigitalOcean container registry) or `DOCKER_HUB`. */ registryType: string; /** * The repository name. */ repository: string; /** * The repository tag. Defaults to `latest` if not provided. */ tag?: string; } export interface AppSpecJobImageDeployOnPush { /** * Whether to automatically deploy images pushed to DOCR. */ enabled?: boolean; } export interface AppSpecJobLogDestination { /** * Datadog configuration. */ datadog?: outputs.AppSpecJobLogDestinationDatadog; /** * Logtail configuration. */ logtail?: outputs.AppSpecJobLogDestinationLogtail; /** * Name of the log destination. Minimum length: 2. Maximum length: 42. */ name: string; /** * OpenSearch configuration. */ openSearch?: outputs.AppSpecJobLogDestinationOpenSearch; /** * Papertrail configuration. */ papertrail?: outputs.AppSpecJobLogDestinationPapertrail; } export interface AppSpecJobLogDestinationDatadog { /** * Datadog API key. */ apiKey: string; /** * Datadog HTTP log intake endpoint. */ endpoint?: string; } export interface AppSpecJobLogDestinationLogtail { /** * Logtail token. */ token: string; } export interface AppSpecJobLogDestinationOpenSearch { /** * Basic authentication details. */ basicAuth: outputs.AppSpecJobLogDestinationOpenSearchBasicAuth; /** * The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if `clusterName` is not set, a new cluster will be provisioned. */ clusterName?: string; /** * OpenSearch endpoint. */ endpoint?: string; /** * OpenSearch index name. */ indexName?: string; } export interface AppSpecJobLogDestinationOpenSearchBasicAuth { /** * Password for basic authentication. */ password?: string; /** * user for basic authentication. */ user?: string; } export interface AppSpecJobLogDestinationPapertrail { /** * Papertrail syslog endpoint. */ endpoint: string; } export interface AppSpecJobTermination { /** * 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: */ gracePeriodSeconds?: number; } export interface AppSpecService { /** * Describes an alert policy for the component. */ alerts?: outputs.AppSpecServiceAlert[]; /** * Configuration for automatically scaling this component based on metrics. */ autoscaling?: outputs.AppSpecServiceAutoscaling; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/bitbucket/install). Only one of `git`, `github`, `bitbucket`, `gitlab`, or `image` may be set. */ bitbucket?: outputs.AppSpecServiceBitbucket; /** * An optional build command to run while building this component from source. */ buildCommand?: string; /** * The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app. * * @deprecated Service level CORS rules are deprecated in favor of ingresses */ cors?: outputs.AppSpecServiceCors; /** * The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks. */ dockerfilePath?: string; /** * An environment slug describing the type of this app. */ environmentSlug?: string; /** * Describes an environment variable made available to an app competent. */ envs?: outputs.AppSpecServiceEnv[]; /** * A Git repo to use as the component's source. The repository must be able to be cloned without authentication. Only one of `git`, `github` or `gitlab` may be set. */ git?: outputs.AppSpecServiceGit; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ github?: outputs.AppSpecServiceGithub; /** * A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ gitlab?: outputs.AppSpecServiceGitlab; /** * A health check to determine the availability of this component. */ healthCheck?: outputs.AppSpecServiceHealthCheck; /** * The internal port on which this service's run command will listen. */ httpPort: number; /** * An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set. */ image?: outputs.AppSpecServiceImage; /** * The amount of instances that this component should be scaled to. */ instanceCount?: number; /** * The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/digitalocean/#tag/Apps/operation/apps_list_instanceSizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs` */ instanceSizeSlug?: string; /** * A list of ports on which this service will listen for internal traffic. */ internalPorts: number[]; /** * Describes a log forwarding destination. */ logDestinations?: outputs.AppSpecServiceLogDestination[]; /** * The name of the component. */ name: string; /** * An HTTP paths that should be routed to this component. * * @deprecated Service level routes are deprecated in favor of ingresses */ routes: outputs.AppSpecServiceRoute[]; /** * An optional run command to override the component's default. */ runCommand: string; /** * An optional path to the working directory to use for the build. */ sourceDir?: string; /** * Contains a component's termination parameters. */ termination?: outputs.AppSpecServiceTermination; } export interface AppSpecServiceAlert { /** * Determines whether or not the alert is disabled (default: `false`). */ disabled?: boolean; /** * The operator to use. This is either of `GREATER_THAN` or `LESS_THAN`. */ operator: string; /** * The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`. */ rule: string; /** * The threshold for the type of the warning. */ value: number; /** * The time before alerts should be triggered. This is may be one of: `FIVE_MINUTES`, `TEN_MINUTES`, `THIRTY_MINUTES`, `ONE_HOUR`. */ window: string; } export interface AppSpecServiceAutoscaling { /** * The maximum amount of instances for this component. Must be more than min_instance_count. */ maxInstanceCount: number; /** * The metrics that the component is scaled on. */ metrics: outputs.AppSpecServiceAutoscalingMetrics; /** * The minimum amount of instances for this component. Must be less than max_instance_count. */ minInstanceCount: number; } export interface AppSpecServiceAutoscalingMetrics { /** * Settings for scaling the component based on CPU utilization. */ cpu?: outputs.AppSpecServiceAutoscalingMetricsCpu; } export interface AppSpecServiceAutoscalingMetricsCpu { /** * The average target CPU utilization for the component. */ percent: number; } export interface AppSpecServiceBitbucket { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecServiceCors { /** * Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is `include`. This configures the Access-Control-Allow-Credentials header. */ allowCredentials?: boolean; /** * The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header. */ allowHeaders?: string[]; /** * The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header. */ allowMethods?: string[]; /** * The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header. */ allowOrigins?: outputs.AppSpecServiceCorsAllowOrigins; /** * The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header. */ exposeHeaders?: string[]; /** * 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`. */ maxAge?: string; } export interface AppSpecServiceCorsAllowOrigins { /** * Exact string match. */ exact?: string; /** * Prefix-based match. * * @deprecated Prefix-based matching has been deprecated in favor of regex-based matching. */ prefix?: string; /** * RE2 style regex-based match. */ regex?: string; } export interface AppSpecServiceEnv { /** * The name of the environment variable. */ key?: string; /** * The visibility scope of the environment variable. One of `RUN_TIME`, `BUILD_TIME`, or `RUN_AND_BUILD_TIME` (default). */ scope?: string; /** * The type of the environment variable, `GENERAL` or `SECRET`. */ type: string; /** * The value of the environment variable. */ value?: string; } export interface AppSpecServiceGit { /** * The name of the branch to use. */ branch?: string; /** * The clone URL of the repo. */ repoCloneUrl?: string; } export interface AppSpecServiceGithub { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecServiceGitlab { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecServiceHealthCheck { /** * The number of failed health checks before considered unhealthy. */ failureThreshold?: number; /** * The route path used for the HTTP health check ping. */ httpPath?: string; /** * The number of seconds to wait before beginning health checks. */ initialDelaySeconds?: number; /** * The number of seconds to wait between health checks. */ periodSeconds?: number; /** * The health check will be performed on this port instead of component's HTTP port. */ port?: number; /** * The number of successful health checks before considered healthy. */ successThreshold?: number; /** * The number of seconds after which the check times out. */ timeoutSeconds?: number; } export interface AppSpecServiceImage { /** * Configures automatically deploying images pushed to DOCR. */ deployOnPushes: outputs.AppSpecServiceImageDeployOnPush[]; /** * The image digest. Cannot be specified if `tag` is provided. */ digest?: string; /** * The registry name. Must be left empty for the `DOCR` registry type. Required for the `DOCKER_HUB` registry type. */ registry?: string; /** * The credentials required to access a private Docker Hub or GitHub registry, in the following syntax `<username>:<token>`. */ registryCredentials?: string; /** * The registry type. One of `DOCR` (DigitalOcean container registry) or `DOCKER_HUB`. */ registryType: string; /** * The repository name. */ repository: string; /** * The repository tag. Defaults to `latest` if not provided. */ tag?: string; } export interface AppSpecServiceImageDeployOnPush { /** * Whether to automatically deploy images pushed to DOCR. */ enabled?: boolean; } export interface AppSpecServiceLogDestination { /** * Datadog configuration. */ datadog?: outputs.AppSpecServiceLogDestinationDatadog; /** * Logtail configuration. */ logtail?: outputs.AppSpecServiceLogDestinationLogtail; /** * Name of the log destination. Minimum length: 2. Maximum length: 42. */ name: string; /** * OpenSearch configuration. */ openSearch?: outputs.AppSpecServiceLogDestinationOpenSearch; /** * Papertrail configuration. */ papertrail?: outputs.AppSpecServiceLogDestinationPapertrail; } export interface AppSpecServiceLogDestinationDatadog { /** * Datadog API key. */ apiKey: string; /** * Datadog HTTP log intake endpoint. */ endpoint?: string; } export interface AppSpecServiceLogDestinationLogtail { /** * Logtail token. */ token: string; } export interface AppSpecServiceLogDestinationOpenSearch { /** * Basic authentication details. */ basicAuth: outputs.AppSpecServiceLogDestinationOpenSearchBasicAuth; /** * The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if `clusterName` is not set, a new cluster will be provisioned. */ clusterName?: string; /** * OpenSearch endpoint. */ endpoint?: string; /** * OpenSearch index name. */ indexName?: string; } export interface AppSpecServiceLogDestinationOpenSearchBasicAuth { /** * Password for basic authentication. */ password?: string; /** * user for basic authentication. */ user?: string; } export interface AppSpecServiceLogDestinationPapertrail { /** * Papertrail syslog endpoint. */ endpoint: string; } export interface AppSpecServiceRoute { /** * Paths must start with `/` and must be unique within the app. */ path?: string; /** * An optional flag to preserve the path that is forwarded to the backend service. */ preservePathPrefix?: boolean; } export interface AppSpecServiceTermination { /** * 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 `staticSite` can contain: */ drainSeconds?: number; /** * 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: */ gracePeriodSeconds?: number; } export interface AppSpecStaticSite { /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/bitbucket/install). Only one of `git`, `github`, `bitbucket`, `gitlab`, or `image` may be set. */ bitbucket?: outputs.AppSpecStaticSiteBitbucket; /** * An optional build command to run while building this component from source. */ buildCommand?: string; /** * The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. */ catchallDocument?: string; /** * The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app. * * @deprecated Service level CORS rules are deprecated in favor of ingresses */ cors?: outputs.AppSpecStaticSiteCors; /** * The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks. */ dockerfilePath?: string; /** * An environment slug describing the type of this app. */ environmentSlug?: string; /** * Describes an environment variable made available to an app competent. */ envs?: outputs.AppSpecStaticSiteEnv[]; /** * The name of the error document to use when serving this static site. */ errorDocument?: string; /** * A Git repo to use as the component's source. The repository must be able to be cloned without authentication. Only one of `git`, `github` or `gitlab` may be set. */ git?: outputs.AppSpecStaticSiteGit; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ github?: outputs.AppSpecStaticSiteGithub; /** * A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ gitlab?: outputs.AppSpecStaticSiteGitlab; /** * The name of the index document to use when serving this static site. */ indexDocument?: string; /** * The name of the component. */ name: string; /** * 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`. */ outputDir?: string; /** * An HTTP paths that should be routed to this component. * * @deprecated Service level routes are deprecated in favor of ingresses */ routes: outputs.AppSpecStaticSiteRoute[]; /** * An optional path to the working directory to use for the build. */ sourceDir?: string; } export interface AppSpecStaticSiteBitbucket { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecStaticSiteCors { /** * Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is `include`. This configures the Access-Control-Allow-Credentials header. */ allowCredentials?: boolean; /** * The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header. */ allowHeaders?: string[]; /** * The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header. */ allowMethods?: string[]; /** * The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header. */ allowOrigins?: outputs.AppSpecStaticSiteCorsAllowOrigins; /** * The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header. */ exposeHeaders?: string[]; /** * 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`. */ maxAge?: string; } export interface AppSpecStaticSiteCorsAllowOrigins { /** * Exact string match. */ exact?: string; /** * Prefix-based match. * * @deprecated Prefix-based matching has been deprecated in favor of regex-based matching. */ prefix?: string; /** * RE2 style regex-based match. */ regex?: string; } export interface AppSpecStaticSiteEnv { /** * The name of the environment variable. */ key?: string; /** * The visibility scope of the environment variable. One of `RUN_TIME`, `BUILD_TIME`, or `RUN_AND_BUILD_TIME` (default). */ scope?: string; /** * The type of the environment variable, `GENERAL` or `SECRET`. */ type: string; /** * The value of the environment variable. */ value?: string; } export interface AppSpecStaticSiteGit { /** * The name of the branch to use. */ branch?: string; /** * The clone URL of the repo. */ repoCloneUrl?: string; } export interface AppSpecStaticSiteGithub { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecStaticSiteGitlab { /** * The name of the branch to use. */ branch?: string; /** * Whether to automatically deploy new commits made to the repo. */ deployOnPush?: boolean; /** * The name of the repo in the format `owner/repo`. */ repo?: string; } export interface AppSpecStaticSiteRoute { /** * Paths must start with `/` and must be unique within the app. */ path?: string; /** * An optional flag to preserve the path that is forwarded to the backend service. */ preservePathPrefix?: boolean; } export interface AppSpecWorker { /** * Describes an alert policy for the component. */ alerts?: outputs.AppSpecWorkerAlert[]; /** * Configuration for automatically scaling this component based on metrics. */ autoscaling?: outputs.AppSpecWorkerAutoscaling; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/bitbucket/install). Only one of `git`, `github`, `bitbucket`, `gitlab`, or `image` may be set. */ bitbucket?: outputs.AppSpecWorkerBitbucket; /** * An optional build command to run while building this component from source. */ buildCommand?: string; /** * The path to a Dockerfile relative to the root of the repo. If set, overrides usage of buildpacks. */ dockerfilePath?: string; /** * An environment slug describing the type of this app. */ environmentSlug?: string; /** * Describes an environment variable made available to an app competent. */ envs?: outputs.AppSpecWorkerEnv[]; /** * A Git repo to use as the component's source. The repository must be able to be cloned without authentication. Only one of `git`, `github` or `gitlab` may be set. */ git?: outputs.AppSpecWorkerGit; /** * A GitHub repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/github/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ github?: outputs.AppSpecWorkerGithub; /** * A Gitlab repo to use as the component's source. DigitalOcean App Platform must have [access to the repository](https://cloud.digitalocean.com/apps/gitlab/install). Only one of `git`, `github`, `gitlab`, or `image` may be set. */ gitlab?: outputs.AppSpecWorkerGitlab; /** * An image to use as the component's source. Only one of `git`, `github`, `gitlab`, or `image` may be set. */ image?: outputs.AppSpecWorkerImage; /** * The amount of instances that this component should be scaled to. */ instanceCount?: number; /** * The instance size to use for this component. This determines the plan (basic or professional) and the available CPU and memory. The list of available instance sizes can be [found with the API](https://docs.digitalocean.com/reference/api/digitalocean/#tag/Apps/operation/apps_list_instanceSizes) or using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/) (`doctl apps tier instance-size list`). Default: `basic-xxs` */ instanceSizeSlug?: string; /** * Describes a log forwarding destination. */ logDestinations?: outputs.AppSpecWorkerLogDestination[]; /** * The name of the component. */ name: string; /** * An optional run command to override the component's default. */ runCommand?: string; /** * An optional path to the working directory to use for the build. */ sourceDir?: string; /** * Contains a component's termination parameters. */ termination?: outputs.AppSpecWorkerTermination; } export interface AppSpecWorkerAlert { /** * Determines whether or not the alert is disabled (default: `false`). */ disabled?: boolean; /** * The operator to use. This is either of `GREATER_THAN` or `LESS_THAN`. */ operator: string; /** * The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`. */ rule: string; /** * The threshold for the type of the warning. */ value: number; /** * The time before alerts should be triggered. This is may be