Skip to main content

DigitalOcean App - Terraform

Requirements

NameVersion
terraform>= 1.9
digitalocean~> 2.40

Providers

NameVersion
digitalocean~> 2.40

Modules

No modules.

Resources

NameType
digitalocean_app.thisresource

Inputs

NameDescriptionTypeDefaultRequired
domainThe domain to use for the application
object({
name = string
type = string
wildcard = optional(bool)
zone = optional(string)
})
nullno
egressThe egress rules to use for the applicationstring"AUTOASSIGN"no
envThe environment variables to set for the application
list(object({
key = string
value = string
scope = optional(string)
type = optional(string)
}))
[]no
featuresThe features to enable for the applicationlist(string)[]no
functionsThe services to deploy as part of the application
map(object({
source_dir = string
env = optional(list(object({
key = string
value = string
scope = string
type = string
})))
alert = optional(list(object({
rule = string
value = number
operator = string
window = string
})))
git = object({
repo_clone_url = string
branch = string
})
log_destination = optional(object({
name = string
papertrail = optional(object({
endpoint = string
}))
datadog = optional(object({
api_key = string
}))
logtail = optional(object({
token = string
}))
}))
}))
\{}no
health_checkThe health check to use for the application
object({
http_path = string
initial_delay_seconds = number
period_seconds = number
timeout_seconds = number
success_threshold = number
failure_threshold = number
port = number
})
nullno
ingressThe ingress rules to use for the application
list(object({
path = string
type = string
component_name = optional(string)
options = optional(object({
preserve_path_prefix = bool
}))
uri = optional(string)
authority = optional(string)
port = optional(number)
scheme = optional(string)
redirect_code = optional(number)
cors = optional(object({
allow_origins = object({
exact = string
regex = string
})
allow_methods = list(string)
allow_headers = list(string)
max_age = string
expose_headers = list(string)
allow_credentials = bool
}))
}))
[]no
jobsThe services to deploy as part of the application
map(object({
kind = string
run_command = string
environment_slug = string
instance_count = optional(number)
instance_size_slug = string
env = optional(list(object({
key = string
value = string
scope = string
type = string
})))
image = object({
registry_type = string
registry = optional(string)
repository = string
registry_credentials = string
tag = string
})
alert = optional(list(object({
rule = string
value = number
operator = string
window = string
})))
git = object({
repo_clone_url = string
branch = string
})
log_destination = optional(object({
name = string
papertrail = optional(object({
endpoint = string
}))
datadog = optional(object({
api_key = string
}))
logtail = optional(object({
token = string
}))
}))
}))
\{}no
nameThe name of the applicationstringn/ayes
regionThe region to deploy the application tostringn/ayes
servicesThe services to deploy as part of the application
map(object({
environment_slug = string
instance_count = optional(number)
instance_size_slug = string
http_port = number
internal_ports = list(number)
env = optional(list(object({
key = string
value = string
scope = string
type = string
})))
image = object({
registry_type = string
registry = optional(string)
repository = string
registry_credentials = string
tag = string
})
alert = optional(list(object({
rule = string
value = number
operator = string
window = string
})))
git = object({
repo_clone_url = string
branch = string
})
health_check = optional(object({
http_path = string
initial_delay_seconds = number
period_seconds = number
timeout_seconds = number
success_threshold = number
failure_threshold = number
port = number
}))
log_destination = optional(object({
name = string
papertrail = optional(object({
endpoint = string
}))
datadog = optional(object({
api_key = string
}))
logtail = optional(object({
token = string
}))
}))
autoscaling = optional(object({
min_instance_count = number
max_instance_count = number
metrics = object({
cpu = object({
percent = number
})
})
}))
}))
\{}no
static_sitesThe static sites to deploy as part of the application
map(object({
build_command = string
source_dir = string
environment_slug = string
output_dir = string
index_document = string
error_document = string
catchall_document = string
git = object({
repo_clone_url = string
branch = string
})
env = optional(list(object({
key = string
value = string
scope = string
type = string
})))
}))
\{}no
workersThe services to deploy as part of the application
map(object({
environment_slug = string
instance_count = optional(number)
instance_size_slug = string
env = optional(list(object({
key = string
value = string
scope = string
type = string
})))
image = object({
registry_type = string
registry = optional(string)
repository = string
registry_credentials = string
tag = string
})
alert = optional(list(object({
rule = string
value = number
operator = string
window = string
})))
git = object({
repo_clone_url = string
branch = string
})
log_destination = optional(object({
name = string
papertrail = optional(object({
endpoint = string
}))
datadog = optional(object({
api_key = string
}))
logtail = optional(object({
token = string
}))
}))
}))
\{}no

Outputs

NameDescription
app_default_ingressThe default ingress for the application
app_idThe ID of the application
app_live_urlThe live URL of the application
app_urnThe URN of the application